From 9177bd0488fdecaf7107daec7946f5ccfa898ed2 Mon Sep 17 00:00:00 2001 From: wano <55907021+wanlce@users.noreply.github.com> Date: Mon, 11 Nov 2024 23:04:24 +0800 Subject: [PATCH] fix(graphql): correct syntax for `general` and `user` fields --- graphql/root_schema.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/graphql/root_schema.go b/graphql/root_schema.go index c9daad3..21b334e 100644 --- a/graphql/root_schema.go +++ b/graphql/root_schema.go @@ -29,7 +29,7 @@ type Query { numberUsers: Int! # jsonStorage get given paths from user related json storage. Empty paths is to get all. Refer to https://github.com/tidwall/gjson jsonStorage(paths: [String!]): [String!]! @hasRole(role: ADMIN) - user(): User! @hasRole(role: ADMIN) + user: User! @hasRole(role: ADMIN) configFlatDesc: [ConfigFlatDesc!]! @hasRole(role: ADMIN) configs(id: ID, selected: Boolean): [Config!]! @hasRole(role: ADMIN) dnss(id: ID, selected: Boolean): [Dns!]! @hasRole(role: ADMIN) @@ -40,7 +40,7 @@ type Query { groups(id: ID): [Group!]! @hasRole(role: ADMIN) group(name: String!): Group! @hasRole(role: ADMIN) nodes(id: ID, subscriptionId: ID, first: Int, after: ID): NodesConnection! @hasRole(role: ADMIN) - general(): General! @hasRole(role: ADMIN) + general: General! @hasRole(role: ADMIN) } type Mutation { # createUser creates a user if there is no user. @@ -145,7 +145,7 @@ type Mutation { removeGroup(id: ID!): Int! @hasRole(role: ADMIN) } enum Role { - admin + ADMIN } input ImportArgument { link: String!