Hexagraph provides a code-first GraphQL gateway at https://hexagraph-core.onrender.com/graphql. The same URL doubles as an interactive browser playground powered by Apollo Sandbox, so you can explore the schema, write queries, and inspect responses without leaving your browser — no client setup required. For programmatic access, send a standard POST request with a JSON body.
The GraphQL Playground
Navigate to https://hexagraph-core.onrender.com/graphql in your browser to open the Apollo Sandbox. The playground gives you:
- Schema explorer — browse all available query types, arguments, and return fields in the left-hand panel.
- Autocomplete — the query editor surfaces field suggestions as you type, so you can discover the full data model interactively.
- Live execution — click Run to fire a query against the live Hexagraph API and inspect the response inline.
No sign-in or API key is needed. The playground is the fastest way to prototype a query before wiring it into your application.
Making GraphQL Requests
All GraphQL operations use a single endpoint and HTTP method. Send your query as the query property of a JSON body in a POST request:
curl -X POST https://hexagraph-core.onrender.com/graphql \
-H "Content-Type: application/json" \
-d '{"query": "{ output(id: \"OA:W2107277218\") { id title year } }"}'
Example response
{
"data": {
"output": {
"id": "OA:W2107277218",
"title": "Artificial Intelligence in Clinical Decision Support",
"year": 2022
}
}
}
Because you asked only for id, title, and year, those are the only three fields returned — the response is exactly as wide as you declared, no more.
Available Queries
output(id)
Fetch a single scholarly work by its OA:ID. Use this when you have a known identifier and need its full metadata record.
query GetOutput {
output(id: "OA:W2107277218") {
id
doi
title
year
date
citations
authors {
name
}
}
}
Example response
{
"data": {
"output": {
"id": "OA:W2107277218",
"doi": "https://doi.org/10.1016/j.artint.2022.103751",
"title": "Artificial Intelligence in Clinical Decision Support",
"year": 2022,
"date": "2022-04-15",
"citations": 148,
"authors": [
{ "name": "Jordan Rivera" },
{ "name": "Priya Nambiar" }
]
}
}
}
outputs(query)
Search and filter the full outputs index. The query argument mirrors the REST endpoint’s search, filter, page, and per_page parameters, but returns only the fields you declare.
query SearchPublications {
outputs(query: {
search: "artificial intelligence"
filter: "has_doi:true"
page: 1
per_page: 3
}) {
id
doi
title
date
source
citations
authors {
name
affiliations
}
}
}
Example response
{
"data": {
"outputs": [
{
"id": "OA:W2107277218",
"doi": "https://doi.org/10.1016/j.artint.2022.103751",
"title": "Artificial Intelligence in Clinical Decision Support",
"date": "2022-04-15",
"source": "Artificial Intelligence",
"citations": 148,
"authors": [
{ "name": "Jordan Rivera", "affiliations": ["Massachusetts Institute of Technology"] }
]
}
]
}
}
author(id)
Fetch a complete researcher profile by OA:ID, including citation metrics and institutional affiliations.
query GetAuthorProfile {
author(id: "OA:A5086208034") {
id
orcid
name
citations
outputs
affiliations {
institution {
name
}
}
}
}
Example response
{
"data": {
"author": {
"id": "OA:A5086208034",
"orcid": "https://orcid.org/0000-0002-1825-0097",
"name": "Jordan Rivera",
"citations": 6201,
"outputs": 84,
"affiliations": [
{ "institution": { "name": "Massachusetts Institute of Technology" } },
{ "institution": { "name": "Stanford University" } }
]
}
}
}
Batching Multiple Lookups
One of GraphQL’s most practical advantages is the ability to resolve multiple independent entities in a single HTTP request. The example below fetches both a scholarly output and an author profile in one round trip, using aliases to give each field a distinct key in the response:
query BatchLookup {
paper: output(id: "OA:W2107277218") {
id
title
year
citations
}
researcher: author(id: "OA:A5086208034") {
id
name
citations
outputs
}
}
Example response
{
"data": {
"paper": {
"id": "OA:W2107277218",
"title": "Artificial Intelligence in Clinical Decision Support",
"year": 2022,
"citations": 148
},
"researcher": {
"id": "OA:A5086208034",
"name": "Jordan Rivera",
"citations": 6201,
"outputs": 84
}
}
}
Two records retrieved — one API call charged against your rate limit quota.
Benefits over REST
| Capability | REST | GraphQL |
|---|
| Request only specific fields | ❌ Full object always returned | ✅ Declare exactly what you need |
| Combine multiple entity lookups | ❌ One request per entity | ✅ Batch in a single request |
| Interactive exploration | ❌ Requires external tooling | ✅ Built-in browser playground |
| Precise rate-limit efficiency | ❌ Each entity = one request | ✅ Many entities = one request |
Using GraphQL to batch multiple entity lookups into a single request is the most efficient way to stay within Hexagraph’s rate limits (30 requests/min, 1,000/day) when building integrations. A single query that fetches ten outputs and five author profiles counts as just one request against your quota.