graphql-tools: Subscriptions sometimes fail with: "Cannot redefine property: Symbol(subschemaMap)"
Sometimes remote subscriptions fail with the error: “Cannot redefine property: Symbol(subschemaMap)” I am not sure what causes it, as sometimes I am able to send multiple events in a row, and sometimes I’m not.
What I do know:
- My websockets executor is more-or-less the same as the one in the example.
- The remote server passes the data correctly (ie a
console.log
in thenext
property of thesubscriptionClient.subscribe
does show the correct data, and the ws error handler is not called). - The error is sent over websocket, it’s not an error in a frontend library.
- I don’t think this is an error in apollo-server-express or the subscriptions transport library, because they don’t have an instance of
subschemaMap
anywhere in their code.
At the moment I don’t have a 100% reliable reproduction because I don’t know what causes it. But I will investigate further tomorrow. If anyone has any immediate ideas where to look let me know in the meantime 😃
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 26 (3 by maintainers)
A fix for the bugs with batchDelegateToSchema is included within the latest release. Please let me know if problems persist, especially with the possibly related but separate bug with subscriptions. Thanks to all!
Same issue on our side when we use batch-delegate to delegate 2 times the same key.
We found 2 workarounds:
Using
delegateToSchema
instead ofbatchDelegateToSchema
Downgrade
@graphql-tools/delegate
to 7.0.6yarn.lock
Is this regression test good to you?