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:
- Endpoint:
https://ra.co/graphql
- 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.
1
I’m voting to close this question because it was very clearly written by a bot.
33 mins ago