SubQuery Native Query Service
SubQuery Native Query Service
Coming from the Graph?
Instead, you may consider to use the Subgraph style query service we have!
Or, you may want to take a look at the information we have on the differences between SubQuery's GraphQL library, and The Graph.
You can follow the official GraphQL guide here to learn more about GraphQL, how it works, and how to use it:
- There are libraries to help you implement GraphQL in many different languages - we recommend Apollo Client as it will allow a seamless migration to our decentralised network when you publish your project in the future.
- You will want to review advice on how to structure your GraphQL queries to maximise performance.
- For an in-depth learning experience with practical tutorials, see How to GraphQL.
- Check out the free online course, Exploring GraphQL: A Query Language for APIs.
On the top right of the playground, you'll find a Docs button that will open a documentation draw. This documentation is automatically generated and helps you find what entities and methods you can query. On our Managed Service Explorer, you will also find a query constructor.
Full Text Search
The result of the directive will provide new connections to the GraphQL schema allowing you to search. They follow the pattern search<EntityName>
and take a search
parameter.
The search parameter allows for more than just searching for strings, you can do AND (&
), OR (|
) , NOT (!
, -
), begins with (<Text>:*
, <Text>*
>) and follows (>
, <->
).
For more details on these operations please see pg-tsquery for sanitised operations and Postgres tsquery for the underlying DB implementation.
# Search for all NFTs with either "blue" or "red" in the name or description
{
searchNFTs(search: "blue|red") {
nodes: {
id
name
description
}
}
}