Generated reference / v1

GraphQL schema

Versioned contracts generated from actual source.

Resolver-generated SDL

Generated directly from async-graphql resolvers. Public privileged mutations additionally require a fresh action-bound proof; an optional SDL argument does not waive runtime policy.

input AssignRoleInput {
	userId: ID!
	roleId: ID!
}

input CreateOAuthClientInput {
	name: String!
	clientId: String!
	clientSecret: String!
	"""
	SEC-06: required owner binding — an active `customer_accounts` row.
	"""
	ownerAccountId: ID!
	"""
	SEC-06: an active `customer_applications` row owned by the account.
	"""
	applicationId: ID!
	"""
	SEC-06: audiences this client may reach; closed default (must be
	non-empty) unless bound to the platform account
	(`legacy-platform-internal` exception).
	"""
	allowedResources: [String!]
	allowedScopes: [String!]
	redirectUris: [String!]
}

type Mutation {
	register(input: RegisterInput!): UserType!
	verifyEmail(userId: ID!, proofId: ID): UserType!
	"""
	Lift every failed-login delay on an account (WP-17 R-17.8): all its addresses and the
	account-wide counter, and its link-proof delays and wrong-answer budget (INC-18). An
	administrator action, with a fresh proof, audited.
	"""
	unlockLogin(userId: ID!, proofId: ID): Boolean!
	"""
	Reset a user's second factor (WP-17 R-17.3): their authenticators and recovery codes are
	removed and their sessions and tokens ended, so they must sign in and enrol again. For a
	user who has lost both the app and the recovery codes. An administrator action, with a
	fresh proof, audited.
	"""
	resetAuthenticator(userId: ID!, proofId: ID): Int!
	resetPassword(userId: ID!, newPassword: String!, proofId: ID): Boolean!
	assignRole(input: AssignRoleInput!, proofId: ID): Boolean!
	createOauthClient(input: CreateOAuthClientInput!, proofId: ID): OauthClientType!
}

type OauthClientType {
	id: ID!
	clientId: String!
	name: String!
	allowedScopes: [String!]!
	redirectUris: [String!]!
}

type PermissionType {
	id: ID!
	name: String!
	description: String
}

type Query {
	"""
	Current user, resolved from the optional bearer identity in context.
	"""
	me: UserType
	user(id: ID!): UserType
	users(cursor: String, limit: Int! = 20): UserPage!
	roles: [RoleType!]!
	permissions: [PermissionType!]!
}

input RegisterInput {
	email: String!
	password: String!
}

type RoleType {
	id: ID!
	name: String!
	description: String
}

type UserPage {
	items: [UserType!]!
	nextCursor: String
	hasNextPage: Boolean!
	totalCount: Int!
}

type UserType {
	id: ID!
	email: String!
	isActive: Boolean!
	isVerified: Boolean!
}

"""
Directs the executor to include this field or fragment only when the `if` argument is true.
"""
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
"""
Directs the executor to skip this field or fragment when the `if` argument is true.
"""
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
schema {
	query: Query
	mutation: Mutation
}