1. Websocket, Socket.IO & more
Pet Store
  • Store API
    • Start your Apidog journey
    • Pet
      • List Pets
      • Create Pet
      • Get Pet
      • Update Pet
      • Delete Pet
      • Upload Pet Image
    • Chat
      • Pet Care AI Consultation
    • Store
      • Get Store Inventory
      • List all inventories
      • Create Order
      • Get Order
      • Cancel Order
      • Callback Example
    • Payments
      • Pay Order
    • User
      • Create User
      • Update User
      • Get User
      • Delete User Account
      • Create Authentication Token
    • Webhooks
      • Order Status Changed Event
      • Payment Succeeded Event
    • Websocket, Socket.IO & more
      • gRPC API
      • Other protocol API example
        DEMO
      • WebSocket example
      • Socket.IO example
      • Webhook example
      • GraphQL example
        POST
      • SSE example
        POST
      • SOAP example
        POST
    • Schemas
      • Pet
      • User
      • PetCollection
      • OrderPayment
      • Bank Card
      • Order
      • Bank Account
      • ApiResponse
      • Error
  • Admin API
    • Dashboard
      • Get Dashboard Stats
    • User Management
      • List Users
      • Get User Details
      • Update User Status
    • Order Management
      • List All Orders
      • Force Cancel Order
    • Audit Logs
      • Get Audit Log Details
    • Schemas
      • AuditLog
  1. Websocket, Socket.IO & more

GraphQL example

POST
/

Key Features#

Free and public: No API key or authentication required.
GraphQL Schema: Explore relationships between countries, continents, and languages easily.
Use cases: Testing GraphQL clients, learning schema navigation, building demos, etc.

Usage Instructions#

In the "success" debug base under this endpoint, you can directly make requests to the GraphQL API.
The query field has already been filled out.
Click the refresh button next to "Schema fetched" to fetch the schema.
Click send to directly send the request and receive a response.

Endpoint#

GraphQL Endpoint:
https://countries.trevorblades.com/

Main Schema Objects#

Country
Fields: code, name, native (native name), phone (country calling code), continent, capital, currency, languages, emoji, etc.
Continent
Fields: code, name, countries (list of countries in the continent)
Language
Fields: code, name, native (native name)

Example Queries#

Get all countries with their code and name:
Get details of a single country:
List all continents and the countries in each:

How to Use#

You can access the API via your own GraphQL client, curl, or visit the GraphQL Explorer for Countries API in your browser.
Supports introspection, so you can see the full schema and documentation directly in the GraphQL Playground.

Common Use-Cases#

Frontend prototyping: For dropdowns (countries, continents, etc.)
Demo apps: Populate select inputs without backend work.
GraphQL learning: Practice writing queries and navigating relationships with real data.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
OAuth 2.0
Authorization Code
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Authorize URL: https://auth.petstoreapi.com/authorize
Token URL: https://auth.petstoreapi.com/token
Refresh URL: https://auth.petstoreapi.com/refresh
or
Body Params application/json

Responses

🟢200OK
application/json
successful GraphQL response
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "query": "string",
    "variables": {
        "property1": "string",
        "property2": "string"
    }
}'
Response Response Example
{}
Modified at 2026-05-13 03:16:01
Previous
Webhook example
Next
SSE example
Built with