Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to dynamically add a query string parameter to graphql endpoint at runtime #540

Open
martinszeltins opened this issue Aug 15, 2023 · 0 comments

Comments

@martinszeltins
Copy link

Your use case

I would like to be able to add a query parameter to my graphql endpoint when I perform a graphql query. For example when I query for users, I would like to append .../graphql?api=getUsers and when I save a user, I would like to add .../graphql?api=saveUser so that when I look at the network requests, I would like to:

Instead of seeing this:

/graphql
/graphql
/graphql

I would like to see this:

/graphql?api=getUsers
/graphql?api=saveUser
/graphql?api=loadSettings

The solution you'd like

Ideally, it would be nice to update the graphql endpoint when I perform a query like at this time:

// set endpoint to /graphql?api=getUsers
result.value = await useLazyAsyncQuery(query)

Possible alternatives

No response

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant