diff --git a/modules/auth/graph/schemas/apps.graphql b/modules/auth/graph/schemas/apps.graphql new file mode 100644 index 000000000..0fdb6b8d9 --- /dev/null +++ b/modules/auth/graph/schemas/apps.graphql @@ -0,0 +1,44 @@ +extend type Query { + """ + Gets a specific app from the server. + """ + app( id: String! ): ServerApp + + """ + Returns all the publicly available apps on this server. + """ + apps: [ServerApp] +} + +type ServerApp { + id: String! + secret: String! + name: String! + description: String + termsAndConditionsLink: String + logo: String + authorId: User + createdAt: String! + redirectUrl: String! + scopes: [Scope]! +} + +extend type User { + authorizedApps: [ServerApp] + createdApps: [ServerApp] +} + +extend type Mutation { + appCreate(app: AppCreateUpdateInput): String! + appUpdate(app: AppCreateUpdateInput): Boolean! + appDelete(appId: String!): Boolean! +} + +input AppCreateUpdateInput { + name: String! + description: String! + termsAndConditionsLink: String + logo: String + redirectUrl: String! + scopes: [String]! +} diff --git a/modules/auth/graph/schemas/auth.graphql b/modules/auth/graph/schemas/auth.graphql index ea4665549..094742609 100644 --- a/modules/auth/graph/schemas/auth.graphql +++ b/modules/auth/graph/schemas/auth.graphql @@ -1,26 +1,7 @@ -extend type Query { - app( id: String! ): ServerApp -} - -type ServerApp { - id: String! - secret: String! - name: String! - description: String - termsAndConditionsLink: String - logo: String - authorId: User - createdAt: String! - redirectUrl: String! - scopes: [Scope]! -} - -extend type User { - authorizedApps: [ServerApp] - createdApps: [ServerApp] -} - extend type ServerInfo { + """ + The authentication strategies available on this server. + """ authStrategies: [AuthStrategy] } @@ -31,18 +12,3 @@ type AuthStrategy { url: String!, color: String } - -extend type Mutation { - appCreate(app: AppCreateUpdateInput): String! - appUpdate(app: AppCreateUpdateInput): Boolean - appDelete(appId: String): Boolean -} - -input AppCreateUpdateInput { - name: String! - description: String! - termsAndConditionsLink: String - logo: String - redirectUrl: String! - scopes: [String]! -}