add updateApiKey mutation

Signed-off-by: Alexis Tyler <xo@wvvw.me>
This commit is contained in:
Alexis Tyler
2019-08-11 14:33:24 +09:30
parent 89ea2c6d5b
commit 8ae8c83a0b

View File

@@ -1,7 +1,12 @@
input apiKeyInput {
input authenticateInput {
password: String!
}
input updateApikeyInput {
description: String
expiresAt: Long!
}
type Query {
"""Get all apikeys"""
apiKeys: [ApiKey] @func(module: "get-apikeys")
@@ -9,7 +14,10 @@ type Query {
type Mutation {
"""Get user apikey"""
authenticate(name: String, input: apiKeyInput): ApiKey @func(module: "apikeys/name/get-apikey")
getApiKey(name: String!, input: authenticateInput): ApiKey @func(module: "apikeys/name/get-apikey")
"""Update apikey"""
updateApikey(name: String!, input: updateApikeyInput): ApiKey @func(module: "apikeys/name/update-apikey")
}
type ApiKey {