uniswap-v3-base/1.0.0
subgraph with a tag of prod
.
This subgraph has a public endpoint
and the tag prod
also has a public endpoint.
https://api.goldsky.com/api/public/<project_id>/subgraphs/<subgraph name>/<version or tag>/gn
Goldsky adds rate limiting to all public endpoints to prevent abuse. We currently have a default rate limit of 50 requests per 10 seconds.
This can be unlocked by contacting us at support@goldsky.com.
One major downside of public endpoints is that they are completely public and can be accessed by anyone. This means that
anyone can query the data in the subgraph and potentially abuse the endpoint. This is why we also support private endpoints.
Authorization
header with the GraphQL request. The value of the Authorization
header should be in the form of Bearer <token>
where the token
is an API token that has been generated through
Goldsky project general settings. Remember that API tokens are scoped to specific projects. This means an API
token for projectA
cannot be used to access the private endpoints of subgraphs in projectB
.
Private endpoints can be toggled on and off for each subgraph and tag. This means that you can have a mix of public and
private endpoints for your subgraph. For example, you can have a public endpoint for your subgraph and a private endpoint
for a specific tag.
Here’s an example of how to access a private endpoint using the GraphiQL interface:
/api/private
instead of /api/public
. For example, the private endpoint for the prod
tag of the uniswap-v3-base/1.0.0
subgraph
would be https://api.goldsky.com/api/private/project_cl8ylkiw00krx0hvza0qw17vn/subgraphs/uniswap-v3-base/1.0.0/gn
.
Editor
permissions.
goldsky subgraph update
command with the
--public-endpoint <disabled|enabled>
flag and/or the --private-endpoint <disabled|enabled>
flag. Here’s a complete example
disabling the public endpoint and enabling the private endpoint for the prod
tag of the uniswap-v3-base/1.0.0
subgraph: