Closed JarvisH closed 3 months ago
Hello again and thanks for all the hard work on this project!
Using the following example from the documentation:
const subscriptionsHandler = handleSubscriptions(operation => { return { subscribe: obs => { wsClient.subscribe( { query: operation.query, variables: operation.variables, }, obs ); return { unsubscribe: () => { // No OP }, }; }, }; });
operation.query is typed as follows:
operation.query
interface Operation<TData, TVars> { query: string | DocumentNode | DocumentDecoration<TData, TVars>; variables?: TVars; }
wsClient.subscribe however expects the query option to always be a string, and indeed the type coming from Villus IS a string. It appears to be a pure TS issue.
wsClient.subscribe
query
Hello again and thanks for all the hard work on this project!
Using the following example from the documentation:
operation.query
is typed as follows:wsClient.subscribe
however expects thequery
option to always be a string, and indeed the type coming from Villus IS a string. It appears to be a pure TS issue.