Comments (6)
Hello @Tainan404 - nice catch!
I would like to add that consistently deduplicating the subscriptions is a very important feature for BigBlueButton.
This feature allowed us to decouple the data consumption, allowing each component to require the data of interest.
However, with this bug, we will eventually get duplicated subscriptions, increasing the load in both client and server.
@jerelmiller - we have some workarounds in mind, like creating a hook named useDeduplicatedSubscription
, but if it's something you could fix on apollo-client, it would benefit the whole comunity of users.
Any feedback in this issue will be highly appreciated.
Thank you!
from apollo-client.
Hi @Tainan404 and @TiagoJacobs 👋
I see that the relevant feature request apollographql/apollo-feature-requests#74 was closed by #6910.
As you described, I am seeing deduplication of the initial subscriptions, but when subsequent components are rendered as you said I'm seeing new connections open. I suspect I know what's happening here: any existing deduplication is happening in the QueryManager when startGraphQLSubscription
calls getObservableFromLink
, so requests that are fired in quick succession can be deduped, but we don't keep track of subscriptions with e.g. a unique cache key, so if the same subscription is being opened at a later time, it cannot be deduplicated against all currently running subscriptions.
I'll have to dig into this more and discuss with the team, thanks for the reproduction!
from apollo-client.
Hello @alessbell,
To temporarily address this issue, we have implemented a new hook in BigBlueButton called usedDeduplicatedSubscription
. You can find the pull request here.
I am sending it here in case it can be helpful to others.
PS: Looking forward for an oficial fix in the future.
Thanks again!
from apollo-client.
Maybe same like this here? #10117
from apollo-client.
Hello @dominikklein - yes, it's the same case!
from apollo-client.
When this would work in a better way, would it be the same for subscribeToMore
or is this currently in general handled in a different way?
from apollo-client.
Related Issues (20)
- Deprecate testing utilities introduced in 3.10 in favor of graphql-testing-library HOT 3
- Why does QueryResult not contain extensions but FetchResult does? HOT 3
- MockedResponse variableMatcher shows warning about no more mocked responses for the query HOT 5
- Partial data returned on error after resetting cache HOT 6
- Type error returning `IGNORE` object when using a generic `TypedDocumentNode` mutation HOT 2
- Documentataion: mutaitonHookOptions.ignoreResults requires additional clarification HOT 1
- @apollo/client reactive var state changes are not reflecting across libraries HOT 8
- fetchMore with fetchPolicy: "no-cache" makes two requests HOT 5
- Problem with custom type policy for query caching HOT 19
- App Crash when using ReactNativeFile in apollo upload client to upload file HOT 5
- Server-Side Rendering Error with @apollo/client 3.11.0 in NextJS 14.2.5 HOT 3
- When updating the list of mocks and calling 'rerender' on the component under test, the updated list of mocks is ignored and the original is still used. HOT 3
- Check on sample app suggested in the contributing doc
- [useMutation] unexpected handling of mutations vs queries on error handling HOT 2
- Evicting the cache for a query with both @include and @nonreactive directives can cause errors if variables have been changed HOT 1
- Calling `clearStore` while a lazyQuery is pending causes an error HOT 2
- Appolo Client with shopify HOT 2
- valueChanges does not trigger anymore after fetching the same object type from another, separate query HOT 2
- data is not available anymore in the onCompleted callback HOT 3
- `cache-only` fetchPolicy results in network request after deleting cached data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-client.