The API resource I am trying to pull from expects a GET request. How can I use the useQuery hook to send a GET request, it seems like it only ever sends POST requests.
In my limited understanding of GraphQL, should the server be changed so the endpoint for GET_ALL_MODELS is a POST request or do I need to change something on the frontend so my Query sends a GET method request.
There are 2 ways to implement this.
One is setting up your
ApolloClientto send all queries asGET. This is achieved usingHttpLinkwithuseGETForQueriesastrueAnd in case you need to do it for a specific query, you could override the
ApolloLinkcontext and setfetchOptions.methodtoGET.