Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-04-2018 03:06 AM
HI guys,
I am trying to get GRANDstack working with Postman, but I am still a newbie with regard to setting up these kind of applications. So I completed the 'Using The Neo4j-GraphQL Plugin With Neo4j Desktop' tutorial on Youtube (link: https://www.youtube.com/watch?v=U8ZGVx1NmQg ).
I am running a Neo4j 3.4.6 instance in Windows using the ZIP-file and Command Prompt (so I am not using the Browser), and I added the GraphQL 3.4.0.1 plugin (and also the APOC and Algo plugins). I loaded the Movie db into Neo4j. Next to this, I installed the GRANDstack starter, and I added some Schema's to the graphql-schema file. I am able to receive data using the Playground on the endpoints http://localhost:4000/ and http://localhost:7474/graphql/.
From this point on I am trying to use Postman to receive data from one of these GraphQL endpoints. I use POST and an Authentication header. Everytime I post a request as body, Postman gives a 500 Internal Server Error with 'POST body missing. Did you forget use body-parser middleware?'. Does somebody has an idea how to get Postman working with GraphQL? I looked through many pages of content but nothing seems to work.
Thanks in advance 🙂
Solved! Go to Solution.
09-04-2018 05:23 AM
I was able to receive data using Postman without doing major changes. I found this Stackoverflow thread which contains the answer: https://stackoverflow.com/questions/42520663/how-to-send-graphql-query-by-postman. At first I was sending the query body as below (similar to the Playground), but this was not the right way to do it.
{ Movie {
title
released
}
}
The correct way to send the query as body in Postman is:
{"query":"{ Movie { title released } }"}
09-04-2018 05:23 AM
I was able to receive data using Postman without doing major changes. I found this Stackoverflow thread which contains the answer: https://stackoverflow.com/questions/42520663/how-to-send-graphql-query-by-postman. At first I was sending the query body as below (similar to the Playground), but this was not the right way to do it.
{ Movie {
title
released
}
}
The correct way to send the query as body in Postman is:
{"query":"{ Movie { title released } }"}
09-04-2018 08:01 AM
Yes it's a JSON payload in the body.
You can also use GET requests with a ?query=
parameter
All the sessions of the conference are now available online