Subgraph Querying

The HTTP endpoint for GraphQL queries can be found on the subgraph page in the dashboard.

Authentication and API restrictions

Query keys

All GraphQL queries are authenticated using a query key. Your organization can have multiple query keys with the following settings:
  • Origins: Permitted origins for queries. Wildcard matching is supported (e.g. *
  • Rate limits (Coming soon): Queries per second allowed.
Example use cases:
  • From your backend - Create a query key with no origin restrictions and no rate limit.
  • From your frontend - Create a query key that allows origins from your domain(s) and has no rate limit.
  • For your community - Create a query key with a rate limit and no origin restrictions.

Using query keys

We currently support two ways of passing in query keys into queries — by path and by header.
The query key can be included as part of the URL path. For example:
curl -v \
--data-raw '{"query":"{entities(first:1){id}}"}'
The query key can be attached with a x-api-key header. For example:
curl -v \
-H 'x-api-key: <QUERY_KEY>' \
--data-raw '{"query":"{entities(first:1){id}}"}'