On the GitHub for the Graph node, it says that Subscriptions are feature complete. But in trying to use them and talking to team members, they don’t seem to be enabled yet.
Is this correct? If not when might subscriptions make an appearance?
Subscriptions is very unstable and it’s discouraged from being used. For now the recommended approach would be to poll at certain intervals. The Guild (one of the Core Devs on The Graph) is working on a much better and robust solution for subscriptions.
Although you can use it by prefixing wss:// instead of http:// in the query url
gm @hskang9, welcome to The Graph forum! Subscriptions will be slightly different as described above. Learn more in this forum post: GIP-0035: GraphQL `@live` queries
In a summary, it leverages the @live GraphQL query directive, so a query looks like this:
query tokens {
pairs @live {
token1 {
id
name
decimals
}
token2 {
id
name
decimals
}
}
}