Subgraph ID#
/v1/proxy/
subgraphs/id/:subgraph_id
#
POST#
Make a graphql request to the subgraph identified by the id subgraph_id
.
Important
This endpoint only works with subgraphs deployed on The Graph's Ethereum decentralized service and not the Arbitrum decentralized service.
If you want to query a subgraph hosted on the Arbitrum decentralized service, use the proxy by deployment id endpoint.
URL Parameters#
subgraph_id string
The decentralized network subgraph ID you are querying
Request Body (JSON)#
query string
The GraphQL query itself
variables dict?
Values for the variables used within the GraphQL query (if any)
Example#
curl https://api.playgrounds.network/v1/proxy/subgraphs/id/ELUcwgpm14LKPLrBRuVvPvNKHQ9HvwmtKgKSH6123cr7 \
-H 'Content-Type: application/json' \
-H 'Playgrounds-Api-Key: PG_API_KEY' \
-d '{"query":"{protocols {name totalPoolCount}}"}'
Response:
{
"data": {
"protocols": [
{
"name": "Uniswap V3",
"totalPoolCount": 13767
}
]
}
}