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
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
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
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
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
}
Pagination & Filtering
Inspect currently authenticated user profile via me query resolver using Authorization: Bearer header.
Paginated Query
1
query GetMeProfile {
2
me {
3
id
4
name
5
username
6
email
7
phone
8
website
9
}
10
}
Paginated Response
1
{
2
"data": {
3
"me": {
4
"id": "1",
5
"name": "Leanne Graham",
6
"username": "Bret",
7
"email": "Sincere@april.biz",
8
"phone": "1-770-736-8031 x56442",
9
"website": "hildegard.org"
10
}
11
}
12
}
Query Arguments
| Argument | Type | Description |
|---|---|---|
| username | String | Username handle for login mutation. |
| String | Email address for login or register mutation. | |
| password | String | Password secret. |
| name | String! | Full display name for registration. |
Schema Auth Type
| Field | Type | Description |
|---|---|---|
| access_token | String! | 15-minute signed JWT access token. |
| refresh_token | String! | 7-day signed JWT refresh token. |
| token_type | String! | Token type string ("Bearer"). |
| expires_in | Int! | Token lifetime in seconds (900s). |
| user | User! | Authenticated User profile record. |