Retrict some query and mutation to only session

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-06-02 17:43:00 -07:00
parent 9c4b6aff18
commit 383ea5a2d4
25 changed files with 268 additions and 190 deletions

View File

@@ -5,11 +5,15 @@ type PersonalAPIKey implements Node {
lastUsedAt: Datetime
createdAt: Datetime!
token: String @goField(forceResolver: true)
token: String
@goField(forceResolver: true)
@authentication(required: PRESENT)
@sessionOnly
permission(action: String!): Boolean!
@goField(forceResolver: true)
@session(required: PRESENT)
@authentication(required: PRESENT)
@sessionOnly
}
type PersonalAPIKeyConnection
@@ -29,10 +33,14 @@ type PersonalAPIKeyEdge {
extend type Mutation {
createPersonalAPIKey(
input: CreatePersonalAPIKeyInput!
): CreatePersonalAPIKeyPayload @session(required: PRESENT)
): CreatePersonalAPIKeyPayload
@authentication(required: PRESENT)
@sessionOnly
revokePersonalAPIKey(
input: RevokePersonalAPIKeyInput!
): RevokePersonalAPIKeyPayload @session(required: PRESENT)
): RevokePersonalAPIKeyPayload
@authentication(required: PRESENT)
@sessionOnly
}
input CreatePersonalAPIKeyInput {