I followed the first part of this tutorial (until code snippet 4) on GraphQL and serverless.

After deploying the serverless application to AWS I query GraphQL using curl, as shown in snippet 4 of the tutorial and get a response as expected:

$ curl -G 'https://example.execute-api.us-east-1.amazonaws.com/dev/query' --data-urlencode 'query={greeting(firstName: "Jeremy")}'
{"data":{"greeting":"Hello, Jeremy."}}

My problem is that when I attempt to make the same query with either Insomnia or Postman, I get 403 error.

What am I doing wrong? Thank you.

In Insomnia:

Insomnia error

In Postman Postman error

1 Answers

Attaque On

I solved the problem.

While I never got Insomnia to work, I got Postman working.

Turns out that while the configuration in the Postman screenshot I included is correct, I simply forgot that I still had content in the body of the request, which caused the error.

So: Make sure that no query is included in Body if you want to make a GET request

Make sure that no query is included in Body