type PersonalAPIKey implements Node { id: ID! name: String! expiresAt: Datetime! lastUsedAt: Datetime createdAt: Datetime! token: String @goField(forceResolver: true) @authentication(required: PRESENT) @sessionOnly permission(action: String!): Boolean! @goField(forceResolver: true) @authentication(required: PRESENT) @sessionOnly } type PersonalAPIKeyConnection @goModel( model: "go.probo.inc/probo/pkg/server/api/connect/v1/types.PersonalAPIKeyConnection" ) { edges: [PersonalAPIKeyEdge!]! pageInfo: PageInfo! totalCount: Int @goField(forceResolver: true) } type PersonalAPIKeyEdge { node: PersonalAPIKey! cursor: CursorKey! } extend type Mutation { createPersonalAPIKey( input: CreatePersonalAPIKeyInput! ): CreatePersonalAPIKeyPayload @authentication(required: PRESENT) @sessionOnly revokePersonalAPIKey( input: RevokePersonalAPIKeyInput! ): RevokePersonalAPIKeyPayload @authentication(required: PRESENT) @sessionOnly } input CreatePersonalAPIKeyInput { name: String! expiresAt: Datetime! } input RevokePersonalAPIKeyInput { personalAPIKeyId: ID! } type CreatePersonalAPIKeyPayload { personalAPIKeyEdge: PersonalAPIKeyEdge! token: String! } type RevokePersonalAPIKeyPayload { personalAPIKeyId: ID! }