Files
speckle-server/packages/server/test/graphql/apiTokens.ts
T
Kristaps Fabians Geikins 37d51072fb feat(server): resource limits on app tokens (#1959)
* WIP new mutation arg

* limited resource token creation done

* token resource rule creation validation

* updated authorizeResolver implementation

* introduced resource access rule checks in authorizeResolver everywhere

* more checks added

* updated projects resolvers

* updated stream resolvers

* more checks added

* error page theme resolution fix

* WIP testss

* more tests

* implemented checks in REST auth pipeline

* REST API coverage & tests

* some tests fixed

* test fixess

* added tests

* feat(server): new automation result reporting scope (#1976)

* feat(server): new automation result reporting scope

* tests fix
2024-01-19 18:14:49 +01:00

29 lines
564 B
TypeScript

import { gql } from 'apollo-server-express'
export const createTokenMutation = gql`
mutation CreateToken($token: ApiTokenCreateInput!) {
apiTokenCreate(token: $token)
}
`
export const revokeTokenMutation = gql`
mutation RevokeToken($token: String!) {
apiTokenRevoke(token: $token)
}
`
export const tokenAppInfoQuery = gql`
query TokenAppInfo {
authenticatedAsApp {
id
name
}
}
`
export const appTokenCreateMutation = gql`
mutation AppTokenCreate($token: AppTokenCreateInput!) {
appTokenCreate(token: $token)
}
`