add scopes schema

Signed-off-by: Alexis Tyler <xo@wvvw.me>
This commit is contained in:
Alexis Tyler
2019-08-02 14:41:33 +09:30
parent 4137646f28
commit 4e13ab9f60

View File

@@ -0,0 +1,35 @@
input scopesInput {
apiKey: String!
}
type Query {
scopes: JSON @func(module: "get-scopes")
}
input addScopeInput {
"""Scope name"""
name: String!
"""Scope description"""
description: String
}
input addScopeToApiKeyInput {
"""Scope name"""
name: String!
apiKey: String!
}
type Mutation {
"""Add a new permission scope"""
addScope(input: addScopeInput!): Scope @func(module: "add-scope")
"""Add a new permission scope to apiKey"""
addScopeToApiKey(input: addScopeToApiKeyInput!): Scope @func(module: "apikeys/name/add-scope")
}
"""A permission scope"""
type Scope {
"""A unique name for the scope"""
name: String
"""A user friendly description"""
description: String
}