I created a GraphQL setting with a supergraph and a single subgraph. The supergraph’s configuration enables playground:
"graphql": {
"enabled": true,
"version": "2",
"playground": {
"enabled": true,
"path": "/playground"
},
...
}
The GraphQL schema offers a subscription:
type Subscription {
mySubscription: String!
}
I then start Tyk and my sample backend app. Then, I open API Playground. It works well and I am able to run sample query.
But when I try to run the following subscription within API Playground:
subscription {
mySubscription
}
the following error is displayed in the right panel:
Cannot read properties of undefined (reading 'SubscriptionClient')
Here’s a demo project illustrating the issue (notice that the code is in the subscriptions-playground
branch, not in the main
one): GitHub - andrey-nakin/tyk-issues at subscriptions-playground