GraphQL Schema Documentation

Auth GraphQL API

Execute fake JWT login, registration mutations, and profile inspection via GraphQL.

Execute login mutation

Simulate user login with username/email and password to receive signed JWT access and refresh tokens.

Query / Mutation
graphql
1
mutation LoginUser {
2
login(username: "kminchelle", password: "password123") {
3
access_token
4
refresh_token
5
token_type
6
expires_in
7
user {
8
id
9
name
10
username
11
email
12
}
13
}
14
}
Response JSON
json
1
{
2
"data": {
3
"login": {
4
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEs...",
5
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEs...",
6
"token_type": "Bearer",
7
"expires_in": 900,
8
"user": {
9
"id": "1",
10
"name": "Leanne Graham",
11
"username": "kminchelle",
12
"email": "kminchelle@qq.com"
13
}
14
}
15
}
16
}

Execute register mutation

Register a new mock user in your identity sandbox overlay and receive an authentication payload.

Query / Mutation
graphql
1
mutation RegisterUser {
2
register(name: "John Developer", username: "johndev", email: "john@playground.dev", password: "securepassword") {
3
access_token
4
refresh_token
5
token_type
6
expires_in
7
user {
8
id
9
name
10
username
11
email
12
}
13
}
14
}
Response JSON
json
1
{
2
"data": {
3
"register": {
4
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJsb2NhbC0xMjMi...",
5
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
6
"token_type": "Bearer",
7
"expires_in": 900,
8
"user": {
9
"id": "local-9b1deb4d-3b7d-4bad",
10
"name": "John Developer",
11
"username": "johndev",
12
"email": "john@playground.dev"
13
}
14
}
15
}
16
}

Schema Auth Type

FieldTypeDescription
access_tokenString!15-minute signed JWT access token.
refresh_tokenString!7-day signed JWT refresh token.
token_typeString!Token type string ("Bearer").
expires_inInt!Token lifetime in seconds (900s).
userUser!Authenticated User profile record.