Example for building a subscription string #479
richardryangarcia
started this conversation in
General
Replies: 1 comment
-
If you have a const str = print(documentNode) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm new to graphql-ws and just trying to use it for some basic graphql subscriptions. All the examples I have seen show a hard coded subscription string. Is there a recommended way to build that string from a Document Node? Maybe using graphql-request or graphql-tag? I really just want to be able to dynamically create the string by passing in a query (with params) and the variables for the params.
Let me know if this makes sense or if I need to explain it any better. I appreciate the help!
Beta Was this translation helpful? Give feedback.
All reactions