Using Get Method with variables

Hi there, I’m in a project that uses the useApolloClient hook to make queries and mutations. I need to change one of the queries to use HTTP GET method instead of POST. And that query contains variables. Does anyone knows if it is possible to do the GET for this case ? I haven’t found a solution in the Apollo/Grahql doc.

Thanks :slight_smile:

@emarzo you can define and use a custom HttpLink that sets useGETForQueries to true for queries. If you want mutations to be covered as well you can set fetchOptions.method to GET instead.

Thanks @hwillson, but in this case, how can I handle the variables which I’m passing with the query ?