add apiKey schema

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

View File

@@ -0,0 +1,21 @@
input apiKeyInput {
password: String!
}
type Query {
"""Get all apikeys"""
apiKeys: [ApiKey] @func(module: "get-apikeys")
}
type Mutation {
"""Get user apikey"""
authenticate(name: String, input: apiKeyInput): ApiKey @func(module: "apikeys/name/get-apikey")
}
type ApiKey {
name: String!
key: String!
description: String
scopes: JSON!
expiresAt: Long!
}