File size: 887 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
extend type Query {
gqlAPIKeys: [GQLAPIKey!]!
}
extend type Mutation {
createGQLAPIKey(input: CreateGQLAPIKeyInput!): CreatedGQLAPIKey!
updateGQLAPIKey(input: UpdateGQLAPIKeyInput!): Boolean!
deleteGQLAPIKey(id: ID!): Boolean!
}
type CreatedGQLAPIKey {
id: ID!
token: String!
}
input CreateGQLAPIKeyInput {
name: String!
description: String!
expiresAt: ISOTimestamp!
role: UserRole!
query: String!
}
input UpdateGQLAPIKeyInput {
id: ID!
name: String
description: String
}
type GQLAPIKey {
id: ID!
name: String!
description: String!
createdAt: ISOTimestamp!
createdBy: User @goField(forceResolver: true)
updatedAt: ISOTimestamp!
updatedBy: User @goField(forceResolver: true)
lastUsed: GQLAPIKeyUsage
expiresAt: ISOTimestamp!
query: String!
role: UserRole!
}
type GQLAPIKeyUsage {
time: ISOTimestamp!
ua: String!
ip: String!
}
|