Replies: 2 comments
-
That is exactly how you should pass the variables. Here's the code excerpt in graphql-sse which does the parsing of variables in the URL: Lines 1021 to 1022 in 47ea198 Are you using the graphql-sse server? If not, you should open an issue on the relevant repo. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Appending query&variables to url in react native not working for me. I passed them in body of request and it's worked. |
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
-
I want to use graphql-sse in client-side ( with react-native). I read this link but How to pass parameters to query? for example for subscription I have to pass userId , it's something like this:
subscription ($userId: Int!) { notificationAdded(userId: $userId) { text isReaded notificationType senderId id } }
how to do that? I try this but its not working:
const url = new URL( api_url, ); url.searchParams.append( 'query', notificationAddedSubscription ); url.searchParams.append('variables', JSON.stringify({userId: 5}));
Beta Was this translation helpful? Give feedback.
All reactions