Playground API Logo
Playground API
v1.0
Sandbox Active
๐Ÿ“š Dev Portal ๐Ÿฅ Health
โšก GRAPHQL GATEWAY STATEFUL SANDBOX

GraphQL Sandbox Gateway

Query baseline and sandboxed datasets using GraphQL queries, perform mutations with instant session persistence, and test Apollo, Relay, or Urql clients without account creation.

โšก Single Request Fetching
Fetch users, nested posts, and comments in a single GraphQL query without over-fetching or multiple round-trips.
๐Ÿ”’ Isolated State Persistence
GraphQL mutations (`createPost`, `deleteUser`) share the exact same per-session sandbox as REST API calls.
๐Ÿ” Search, Filter & Sort
Pass `q: "search"`, `_sort: "title"`, `page: 1`, and `limit: 10` directly as GraphQL query arguments.
๐ŸŽฎ Self-Documenting IDE
Integrated GraphiQL browser playground with auto-completing query editor and schema explorer.

๐Ÿ“‹ GraphQL Schema & Types Reference

Type Scalar Fields Relational Resolvers
User id, name, username, email, avatar, phone, website, address, company posts: [Post], todos: [Todo]
Post id, user_id, title, body, thumbnail user: User, comments: [Comment]
Comment id, post_id, name, email, body post: Post
Todo id, user_id, title, completed user: User
AuthPayload access_token, refresh_token, token_type, expires_in user: User
POST /graphql

Execute GraphQL Queries & Mutations against Session Sandbox

Request Parameters
Name Type Required Location Description
query String (Required) Optional
variables Object (Optional) Optional
operationName String (Optional) Optional
curl -X POST 'http://playground-api-xi.vercel.app/graphql' \
 -H 'Content-Type: application/json'
  \
 -b "pg_identity=your_cookie_uuid" \
 -d '{
  "query": "query GetUsersWithPosts($limit: Int) {\n users(limit: $limit) {\n id\n name\n email\n posts\n  {\n id\n title\n }\n }\n}",
  "variables": {
    "limit": 3
  }
}' 

Request Payload Example

{
  "query": "query GetUsersWithPosts($limit: Int) {\n users(limit: $limit) {\n id\n name\n email\n posts\n  {\n id\n title\n }\n }\n}",
  "variables": {
    "limit": 3
  }
}

Response Schema Example

{
  "data": {
    "users": [
      {
        "id": "1",
        "name": "Leanne Graham",
        "email": "Sincere@april.biz",
        "posts": [
          {
            "id": "1",
            "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit"
          },
          {
            "id": "2",
            "title": "qui est esse"
          }
        ]
      }
    ]
  }
}
โšก Try it out โ€” Test endpoint live Test now
POST /graphql

Create Sandboxed Post via GraphQL Mutation

Request Parameters
Name Type Required Location Description
query String (Required) Optional
variables Object (Optional) Optional
curl -X POST 'http://playground-api-xi.vercel.app/graphql' \
 -H 'Content-Type: application/json'
  \
 -b "pg_identity=your_cookie_uuid" \
 -d '{
  "query": "mutation CreatePost($userId: ID!,\n    $title: String!, $body: String) {\n createPost(user_id: $userId, title: $title, body: $body) {\n id\n user_id\n\n    title\n body\n }\n}",
  "variables": {
    "userId": "1",
    "title": "New GraphQL Post",
    "body": "Created via GraphQL Gateway!"
  }
}' 

Request Payload Example

{
  "query": "mutation CreatePost($userId: ID!,\n    $title: String!, $body: String) {\n createPost(user_id: $userId, title: $title, body: $body) {\n id\n user_id\n\n    title\n body\n }\n}",
  "variables": {
    "userId": "1",
    "title": "New GraphQL Post",
    "body": "Created via GraphQL Gateway!"
  }
}

Response Schema Example

{
  "data": {
    "createPost": {
      "id": "local-a1b2c3d4-5678-90ef",
      "user_id": "1",
      "title": "New GraphQL Post",
      "body": "Created via GraphQL Gateway!"
    }
  }
}
โšก Try it out โ€” Test endpoint live Test now
POST /graphql

Authenticate via GraphQL login mutation & query authenticated profile (me)

Request Parameters
Name Type Required Location Description
query String (Required) Optional
variables Object (Optional) Optional
curl -X POST 'http://playground-api-xi.vercel.app/graphql' \
 -H 'Content-Type: application/json'
  \
 -b "pg_identity=your_cookie_uuid" \
 -d '{
  "query": "mutation Login($username: String!) {\n login(username: $username) {\n access_token\n refresh_token\n token_type\n user {\n id\n name\n email\n }\n }\n}",
  "variables": {
    "username": "Bret"
  }
}' 

Request Payload Example

{
  "query": "mutation Login($username: String!) {\n login(username: $username) {\n access_token\n refresh_token\n token_type\n user {\n id\n name\n email\n }\n }\n}",
  "variables": {
    "username": "Bret"
  }
}

Response Schema Example

{
  "data": {
    "login": {
      "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6...",
      "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6...",
      "token_type": "Bearer",
      "user": {
        "id": "1",
        "name": "Leanne Graham",
        "email": "sincere@april.biz"
      }
    }
  }
}
โšก Try it out โ€” Test endpoint live Test now