Using variables with SWR and graphql (graphql-request) #691
Unanswered
josh-unwin
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Your wrapper should be called useSomething to be able to call a Hook |
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm stuck trying to use SWR with graphql-request when using variables.
I've looked at the docs on graphql and multiple arguments but I'm still a bit confused on the syntax of it.
The attempts I have tried are returning no data and causing constant refreshes in React (I can get data through without the variables). The backend server is being hit constantly (many times a second) and returning 200 statuses but the front end app never gets past the
isLoading
status.Example of my attempt:
Beta Was this translation helpful? Give feedback.
All reactions