Closed Alan-Cha closed 1 year ago
The current concerns are the example API 7 test, the one for subscriptions, and a type mismatch here between the CLI and the main library.
here
The package that is used in the test is actually archived and not maintained anymore since 2018, should migrate to use: https://github.com/enisdenjo/graphql-ws
This fixes the test, not all required props are passed down.
subscriptionServer = new SubscriptionServer(
{
execute: (
schema,
document,
rootValue,
contextValue,
variableValues,
operationName
) =>
execute({
schema,
document,
rootValue,
contextValue,
variableValues,
operationName
}),
subscribe: (
schema,
document,
rootValue,
contextValue,
variableValues,
operationName
) => {
return subscribe({
schema,
document,
rootValue,
contextValue,
variableValues,
operationName
})
},
schema,
onConnect: (params, socket, context) => {
// Add pubsub to subscribe context
return { pubsub }
}
},
{
server: wsServer,
path: '/subscriptions'
}
)
@Pagebakers Thanks for your suggestions! I'll make a new release now. We definitely need to upgrade the other modules but I don't want to delay things any further.
Nice! I will see if there are other low hanging fruits this week.
I preemptively merged #471 without letting the CI run and it turns out, many things started breaking. This is an attempt to address those issues.