> For the complete documentation index, see [llms.txt](https://docs.optswap.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.optswap.org/technical-reference/subgraphs/querying.md).

# Querying

The OptSwap subgraphs are queryable using standard GraphQL.&#x20;

{% hint style="info" %}
Please note that not all GraphQL query types or aggregations are supported. Please refer to The Graph documents linked below. The OptSwap subgraphs do not support mutations.
{% endhint %}

Explaining the basic GraphQL query syntax is out-of-scope for this document. Links to The Graphs official documentation are provided below. Please refer to the [example queries](/technical-reference/subgraphs/querying/example-queries.md) to get started.

### GraphQL Basics & API

{% embed url="<https://thegraph.com/docs/en/developer/querying-from-your-app/>" %}
The Graph Official Documentation – Querying from an Application
{% endembed %}

{% embed url="<https://thegraph.com/docs/en/developer/graphql-api/>" %}
The Graph Official Documentation – GraphQL API
{% endembed %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.optswap.org/technical-reference/subgraphs/querying.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
