question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Subscription refetch interval per subscription

See original GitHub issue

Right now the subscription refetch interval is set globally with the server flag HASURA_GRAPHQL_LIVE_QUERIES_MULTIPLEXED_REFETCH_INTERVAL.

If I am subscribed to detect new comments in a page 1 second might be too much. I could probably change that to 10 seconds. But if I am tracking mouse movement 1 second might not be enough.

Would it be possible to have the refetch interval in a directive?

subscription  {
  my_subscription @live_queries_multiplexed(refetch_interval: 10000) {
    field
  }
}

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:8
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
leoalvescommented, Sep 14, 2020

@wwwdepot The server optimizes the subscriptions. With pooling that is not possible

1reaction
wwwdepotcommented, Sep 11, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Subscriptions - Apollo GraphQL Docs
Subscriptions are intended to be used to subscribe to external data changes, and have those received changes be stored in the cache. You...
Read more >
Realtime with GraphQL Subscriptions, React & urql Tutorial
This section is all about bringing realtime functionality to your app using GraphQL subscriptions. What are GraphQL Subscriptions? Subscriptions are a GraphQL ...
Read more >
Pull subscriptions | Cloud Pub/Sub Documentation
In a pull subscription, a subscriber client requests messages from the ... also implements support for features such as ordered delivery, ...
Read more >
Best practices for improving performance using Azure Service ...
Using certain Service Bus features may require compute utilization that may ... Fanning out to multiple subscriptions on a single topic.
Read more >
Automated Re-fetching | Redux Toolkit
RTK Query > Usage > Automated Refetching: cache invalidation ... when a subscription is added for a query endpoint, a request will be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found