I need some support with graphql Apis I am just able to get a post request and not a get request

I need some support with graphql Apis I am just able to get a post request and not a get request


-2

Certainly! Here’s a detailed description of your problem with the GraphQL endpoint, formatted for a Stack Overflow question:


Title: Unable to Make GET Request to GraphQL Endpoint Using FlutterFlow

Body:

I am building an app using FlutterFlow and am trying to fetch data from a GraphQL endpoint (https://ra.co/graphql). While I can successfully make a POST request with the required data, I am facing challenges when trying to make a GET request.

Details:

  1. Endpoint: https://ra.co/graphql
  2. POST Request Data:
{
  "query": "query GET_POPULAR_EVENTS($filters: FilterInputDtoInput, $pageSize: Int) {...}",
  "variables": {
    "filters": {
      "areas": {
        "eq": 229
      },
      "listingDate": {
        "gte": "2023-06-01",
        "lte": "2023-08-04"
      },
      "listingPosition": {
        "eq": 1
      }
    },
    "pageSize": 10
  }
}

The challenge arises because, in FlutterFlow, for a POST request, I have the option to add a body JSON file, but for a GET request, I do not. I believe this is the reason I can’t fetch the data using a GET request.

To work around this, I tried setting up a backend proxy to convert the GET request to a POST request for the GraphQL endpoint. However, I encountered issues with this approach as well.

Error Message:

{"error":"Failed to fetch data from GraphQL endpoint"}

I am looking for a solution that allows me to make a GET request from FlutterFlow to the GraphQL endpoint and retrieve the desired data. Any suggestions or insights would be greatly appreciated.

I tried to set up my own proxy server and set a get request from the server but also did not manage to get it to work.

New contributor

Evinsta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

  • I’m voting to close this question because it was very clearly written by a bot.

    – Quentin

    33 mins ago


Load 4 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *