Home > Software design >  POST request not accepting my GraphQL input
POST request not accepting my GraphQL input

Time:02-15

How do I get this post request to work:

{"query":"user(id: "jack") { getDetails { edges { node { name } } } name, description }"}

Even if I use single quotes it still does not work as it is an invalid JSON string.

The authorizations tokens are fine (bearer token)

I am using this site to test the POST request

CodePudding user response:

You need to escape the quotes in your query to make it valid JSON.

Try:

{"query":"user(id: \"jack\") { getDetails { edges { node { name } } } name, description }"}
  • Related