Subscriptions
RAM usage of subscriptions scales poorly under high load, making the feature unsuitable for most production uses. There are currently no plans to fix this issue.
OpenReader supports GraphQL subscriptions via live queries. To use these, a client opens a websocket connection to the server and sends a subscription
query there. The query body is then repeatedly executed (every 5 seconds by default) and the results are sent to the client whenever they change.
To enable subscriptions, add the additional --subscriptions
flag to the squid-graphql-server
startup command. The poll interval is configured with the --subscription-poll-interval
flag. For details and a full list of available options, run
npx squid-graphql-server --help
For each entity types, the following queries are supported for subscriptions:
${EntityName}ById
-- query a single entity${EntityName}s
-- query multiple entities with awhere
filter Note that despite being deprecated from the regular query set,${EntityName}s
queries will continue to be available for subscriptions going forward.