# Discover Subgraphs

Source: https://docs.graphops.xyz/subgraphs/guides/discover-public-subgraphs

Find a public dataset you can query before writing an integration. You can check what a Subgraph
indexes, explore its schema, run queries against it, and leave with a query endpoint. You need
membership in a GraphOps organization.

## Find a dataset

Search by name and filter by indexed network.

[Discover Subgraphs](https://platform.graphops.xyz/organizations/current/services/subgraphs/discover)

To look up a Subgraph you already know, paste its Graph Network Subgraph ID or a Deployment CID
into the same search box and apply it. The page offers **Explore Subgraph** or
**Explore deployment** for that identifier, even when it is not among the
popular datasets. A Deployment CID must belong to a Subgraph published on The Graph Network, or to
your organization's Managed Subgraphs or Endpoint Aliases.

## Choose a dataset

The catalog ranks datasets by **Query popularity** over seven complete UTC days:

* The most popular dataset scores 100. A score of 50 means half its recorded query fees.
Searching, filtering and changing pages keep the same scale. Bars use a logarithmic display
so less popular datasets are easier to compare; their lengths are not direct percentages.
* IDs sharing the same current Deployment CID appear in one row. Popularity combines their
published version histories, counting each historical deployment once in that row.
* The row uses the name and Graph Network Subgraph ID with the highest individual popularity.
Expand its identifier list to explore another ID; searching matches all member names and IDs.
* Popularity does not count unique queries or guarantee that the data fits your application.

Discovery includes public datasets that meet the platform's curation eligibility requirements.

## Read the metadata

Open a Subgraph in the deployment explorer from its name or its row's
**Explore Subgraph** action. The explorer has four sections:
**Overview**, **Schema**,
**Query** and **Manifest**. On
**Overview**,
**Subgraph metadata** summarizes what you need before querying it, derived
from the deployment's manifest:

* its Graph Network Subgraph ID, current Deployment CID and indexed network;
* the block it indexes from, its data sources and templates, and the contracts it reads;
* its triggers, such as event, call or block handlers;
* its declared query history: full history, recent blocks only, or a fixed number of blocks;
* declared features such as full-text search, and the base deployment and block when it is grafted;
* its manifest spec and mapping API versions, and its source repository when published.

Facts the manifest does not declare are left out.

Select an identifier to copy it or explore it. From a Graph Network Subgraph ID, choose
**Explore deployment** on its Deployment CID to keep exploring that exact
version after the Subgraph publishes a new one. From a Deployment CID, choose
**Explore Subgraph** on its Graph Network Subgraph ID to follow the current
version instead. A grafted deployment offers **Explore deployment** for its
base deployment.

## Read the manifest

Under **Manifest**, read the deployment's manifest exactly as it was
published, with YAML highlighting and a copy action. Use it to check details the metadata summary
leaves out, such as each data source's handlers, ABIs and mapping files.

## Explore the schema

Under **Schema**, the schema relationship map starts with compact
nodes and connections. Its default focus is a queryable entity with the most distinct related
entities; incoming relationships and useful fields break ties. For example, the Uniswap schema
starts at `Pool`.

* Hover over a type to highlight its direct relationships; unrelated types fade.
* Check **Show fields** above the map to display entity fields and
enum values.
* Choose **Related types** to focus on the selected type and its
neighbors, or **All types** to show the complete schema.
* Drag to pan. Pinch on a touchscreen or trackpad to zoom, or use **Ctrl + scroll**, the zoom
buttons or **Fit**.
* Choose **Full screen** beside the zoom buttons to expand the map to
the whole window. Choose **Exit full screen** or press **Esc** to
return. The full-screen header keeps the search, type selection, **Details**,
**Show fields** and view controls, so you can refocus the map without
leaving it. A type's details open above the full-screen map, and closing them returns to it.
* Search by type, field or description to find the data you need.
* Select a type to focus its relationships, or click a relationship field's type to refocus on that
entity. Reduced-motion preferences move immediately.

Type signatures show nullability (`!`) and lists (`[]`). Connections show required references
(`1`), optional references (`0..1`) and lists (`0..*`); lists may be empty even when their type is
required.

Choose a type's eye icon or **Details** to open a dialog with full field
descriptions and enum values, and to navigate to related entities. The dialog header shows entity
annotations beside the type name, such as `Token @entity` or
`GraphNetwork @entity(immutable: false)`. These come from the deployment's authoring schema. An
annotation without arguments stays as declared; the explorer does not infer defaults. Opening or
navigating details does not move the map, so closing the dialog returns you to the same view. For an entity with its own collection query, choose
**Query records** to open **Query** with a
query for its first records.

## Query the Subgraph

Under **Query**, write any read-only GraphQL query for the
deployment you are exploring and choose **Run query**, or press **Ctrl+Enter**
(**⌘+Enter** on macOS).

* Choose an entity in **Start from entity** to start from a query for its first ten
records and their scalar fields, then edit it.
* The editor highlights GraphQL syntax and numbers each line.
* The query is checked against the deployment's schema as you type. Each problem shows its line
and column; choose the position to move the cursor there. Misspelled fields and arguments include
a suggestion, such as `Did you mean "name"?`. **Run query** is available once
the query has no problems.
* Enter **Variables** as a JSON object. When a query defines several
operations, choose the **Operation** to run.
* **Prettify** reformats the query.
* **Result** shows the response's `data` and any `errors` from the
deployment, and can be copied.
* **Indexing status** shows the deployment's latest indexed block when your query
ran: its number, time and hash, and whether the deployment reports indexing errors. The explorer
reads the deployment's `_meta` with every run without changing your query or its result. A query
that sets a `block` argument returns data as of that block instead; select
`_meta(block: …)` in your query to confirm it.

Only query operations can run. A query can be at most 16 KB and nest fields at most eight levels
deep. Results come from the Deployment CID you are exploring; links to a Deployment CID continue to
query that version. If a result is larger than the explorer returns, request fewer entities or
fields, for example with a smaller `first`, and run the query again.

Explorer queries are **Free queries**: GraphOps pays for them within an hourly
allowance for each organization. If the allowance is used up, the panel shows when you can retry, or
query through [an endpoint](#get-an-endpoint) of your own, which uses your organization's normal
billing.

If the explorer reports that no indexer is serving the deployment, follow the
[indexing coverage checks](../troubleshooting#subgraph-unavailable-no-indexer-is-serving-the-deployment)
before retrying. If it reports that every indexer has an indexing error, see
[indexers report an indexing error](../troubleshooting#subgraph-unavailable-indexers-report-an-indexing-error).

## Get an endpoint

Choose **Get query endpoint** from a catalog row's actions or the deployment
explorer's **Actions** menu:

1. Check the identifier the wizard selects, shown in the summary at the top; **Edit** changes it.
From a Subgraph, it selects the Graph Network Subgraph ID, so your endpoint follows the
publisher's current version, including while a new version is still being indexed. From a
Deployment CID, it selects that exact deployment. For a production application, see
[Choose your Subgraph setup](../choose-a-setup).
2. Supply a saved API key, or create one if you are an Owner or Developer. Viewers and billing
admins can browse and query but cannot create keys.
3. Copy the endpoint and authentication instructions into your application. Queries through that
endpoint use your organization's normal billing.

Closing the wizard returns you to the catalog or detail page you started from, with its catalog
filters preserved.

## Keep the Subgraph in your organization

If you are an Owner or Developer, you can start from the deployment explorer instead of entering the
identifier again. Open the explorer's **Actions** menu:

* **Set up a Subgraph** asks how new versions should reach your application,
recommends one of the setups in [Choose your Subgraph setup](../choose-a-setup), and creates it.
* **Create Endpoint Alias** gives your application a stable query URL. Its target is the
identifier you are exploring: a Graph Network Subgraph ID follows the publisher's new versions,
and a Deployment CID stays on that exact version.
* **Create Managed Subgraph** keeps the Subgraph indexed for your organization
and needs a monthly plan. A Graph Network Subgraph ID follows published versions; a Deployment
CID is upgraded when you choose.

Each one starts with that identifier, which you can change before you create. Creating an Endpoint
Alias or a Managed Subgraph also lets you change its **Target type**. Closing
returns you to the explorer.
After you create a Managed Subgraph, its page opens. See
[Manage Endpoint Aliases](./manage-aliases) and
[Managed Subgraphs](../managed-subgraphs) for what each target type does.

## Explore your own resources

You can also choose **Explore deployment** from a Managed Subgraph version's
actions, or explore an Endpoint Alias from its row actions:

* Version links, and Endpoint Aliases that target a Deployment CID or a Managed Subgraph, inspect
that Deployment CID. The endpoint wizard selects a Deployment CID endpoint.
* An Endpoint Alias that follows a Graph Network Subgraph ID opens
**Explore Subgraph** for that ID's current version.

The breadcrumb takes you back to the originating Subgraphs page.

## Next steps

* [Query a Subgraph](./query-a-subgraph): Send your query from your application and check its freshness.
* [Paginate results](./paginate-results): Read beyond the first page of results in bounded pages.
* [Identifiers and Endpoint Aliases](../concepts/identifiers-and-aliases): Decide whether to follow the publisher or pin a deployment.