2

I am new with graphql.

Visited the site https://graphql.org/swapi-graphql/ and sent a simple query like so

query {
    allPeople {
      people{
        name
        birthYear
      }
    }
} 

and got the response like

{
  "data": {
    "allPeople": {
      "people": [
        {
          "name": "Luke Skywalker",
          "birthYear": "19BBY"
        },
        {
          "name": "C-3PO",
          "birthYear": "112BBY"
        }......so on
        ]
      }
   } 
}

Now I have downloaded graphql desktop clients applications like insomnia and graphiql

I am trying to run the above same query with insomnia and graphiql desktop apps and so far could not succeed. With Insomnia I get

403 ERROR
The request could not be satisfied.
This distribution is not configured to allow the HTTP request method that was used for this request. The distribution supports only cachable requests. 
Generated by cloudfront (CloudFront)

insomnia 403 error for swapi-graphql

While with graphiql desktop app, there seems to be some similar error where the loader is running non stop.

graphiql problem for swapi-graphql

So what am I missing, why is the desktop clients not able to connect to the start war api(https://graphql.org/swapi-graphql) while the google chrome browser is working property. Google chrome is also a client right?

Am I missing something when it comes to desktop app clients?

VivekDev
  • 20,868
  • 27
  • 132
  • 202

1 Answers1

2

It seems https://graphql.org/swapi-graphql is using CloudFront and it is only configured for GET and HEAD and you're making POST request.

if you look at the website, it also passed the query in query string parameter and makes a GET request: https://graphql.org/swapi-graphql/?query=query%20%7B%0A%20%20%20%20allPeople%20%7B%0A%20%20%20%20%20%20people%7B%0A%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20birthYear%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D%20

James Dean
  • 4,033
  • 1
  • 9
  • 18