sondahub / Public GraphQL API
Public GraphQL APIs to test against
Seven schemas over 78,076 related records — e-commerce, IoT, banking, social, helpdesk, flights and a company directory — with introspection, nested relations both ways, real filters and typed mutations. Free, no key.
The endpoints
POST {"query", "variables", "operationName"} as JSON, or GET with ?query=. No key; CORS open.
| Schema | Endpoint | SDL |
|---|---|---|
| Store (9 types) | https://api.sondahub.com/v1/store/graphql | sdl |
| Fleet (5 types) | https://api.sondahub.com/v1/fleet/graphql | sdl |
| Bank (6 types) | https://api.sondahub.com/v1/bank/graphql | sdl |
| Social (5 types) | https://api.sondahub.com/v1/social/graphql | sdl |
| Helpdesk (5 types) | https://api.sondahub.com/v1/helpdesk/graphql | sdl |
| Flights (4 types) | https://api.sondahub.com/v1/flights/graphql | sdl |
| Identity (3 types) | https://api.sondahub.com/v1/identity/graphql | sdl |
Nested relations in one query
The Social API is the deeply related one: a user, their posts, each post's comments and each comment's author, in one round trip.
{
user(id: 1) {
username
display_name
posts(limit: 2, sort: "-published_at") {
body
likes_count
comments(limit: 2) {
body
author { username }
}
}
}
}
curl https://api.sondahub.com/v1/social/graphql -H "Content-Type: application/json" \
-d '{"query": "{ user(id: 1) { username display_name posts(limit: 2, sort: \"-published_at\") { body likes_count comments(limit: 2) { body author { username } } } } }"}'
Filters, sorting, paging, search
Every collection is a list query taking filter (field names with the REST operator suffixes: _ne _gt _gte _lt _lte _like _in _null), sort, page, limit, q and ids, answering { total, data } — plus a by-id query named after the singular (product(id: 1)). A relation to many records (a user's posts) is a plain list that takes the same arguments.
{
products(filter: { price_lt: 20, in_stock: true }, sort: "price", limit: 5) {
total
data { id name price category { name } }
}
}
curl https://api.sondahub.com/v1/store/graphql -H "Content-Type: application/json" \
-d '{"query": "{ products(filter: { price_lt: 20, in_stock: true }, sort: \"price\", limit: 5) { total data { id name price category { name } } } }"}'
Mutations
Each collection has createX, updateX, replaceX and deleteX, with typed inputs. They run the same rules as REST — a review recomputes the product's rating in the answer — and keep to the session token like every write.
mutation {
createReview(input: { product_id: 1, customer_id: 1, rating: 5, title: "Great", body: "Works every day." }) {
id
rating
product { rating review_count }
}
}
curl https://api.sondahub.com/v1/store/graphql -H "Content-Type: application/json" \
-d '{"query": "mutation { createReview(input: { product_id: 1, customer_id: 1, rating: 5, title: \"Great\", body: \"Works every day.\" }) { id rating product { rating review_count } } }"}'
Questions
Is there a public GraphQL API with introspection?
Seven of them, one per API, at https://api.sondahub.com/v1/{api}/graphql. Introspection answers the standard query, so GraphQL IDEs, Sonda's GraphQL mode and code generators load the schema; ?sdl returns the schema as SDL text.
Are subscriptions supported?
No — subscriptions need a long-lived connection per client, and the same events already flow over the WebSocket and SSE streams of each API.
Can I use GET instead of POST?
Yes: GET …/graphql?query=…, with &variables= as JSON when the query takes any.
What happens on a mutation?
It is validated against the schema and the collection's rules, run, and answered with the record as a real server would return it. The HTTP answer carries an X-Sondahub-Session token with the change; send it back and later queries — GraphQL or REST — see it. The response's extensions carry the note.