feat(api): splits auth and apps gql schemas into separate files

This commit is contained in:
Dimitrie Stefanescu
2020-09-16 16:58:02 +01:00
parent ffcca1126d
commit 348a81aab2
2 changed files with 47 additions and 37 deletions
+44
View File
@@ -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]!
}
+3 -37
View File
@@ -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]!
}