Originally posted by **zahrat** August 6, 2023
I want to use graphql-sse in client-side ( with react-native). I read this [link](https://the-guild.dev/graphql/sse/recipes) 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}));`
Discussed in https://github.com/enisdenjo/graphql-sse/discussions/73