Custom fetcher with generic url for fetching #8433
Unanswered
stefanfeldner
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
https://www.the-guild.dev/graphql/codegen/plugins/typescript/typescript-react-query#usage-example-isreacthook-false
Hello everyone,
is it possible to create a custom fetcher like the one in the link above but pass it a url somehow when querying or mutating to have a generic URL and fetch from multiple sources?GraphQL Code Generator. If so how would that look like in a generated query for example and how would I pass the URL there?
Thank you very much!
And this is how a query would look like that I potentially want to pass the URL into:
Also currently when trying this without a passed URL it doesn't work, it creates a weird
http://localhost:3000/[object%20Object]
URL for some reason. Does anyone have an idea why?Thanks! :)
Beta Was this translation helpful? Give feedback.
All reactions