Closed StephanPraetsch closed 5 years ago
Hi Stephan,
Like you I was playing with the book-details tutoriaal and encountered similar issue too.
At first I thought the http:/localhost:8080/graphql endpoint comes with the GraphiQL UI, it doesn't seem like that is the case. That endpoint is purely a GraphQL API. So, you'll need to download GraphQL Playground and enter the http:/localhost:8080/graphql endpoint when asked. It works a treat!
The tutorial does provide the information. For some reasons, I missed it.
Hope this helps.
Cheers Richard Goh
Gosh, thanks. I was pretty sure I tried this out. Obviously I didn't ...
But where does the schema and doc come from that GraphQL Playground is able to display?
I'm new to GraphQL too. Good question. So, I did a bit of digging too.
Thanks to the benefit of GraphQL's Type System. We can actually ask the GraphQL schema for information about the queries it supports via introspection query. See https://graphql.org/learn/introspection/ for further details.
I tried the introspect query and it does work. Here is the example introspect query string: curl localhost:8080/graphql?query=%7B__schema%20%7B%20types%20%7Bname%7D%20%7D%7D
Ah thanks a lot. I completely misinterprete the tutorial with that /graphql
endpoint. Maybe someone should add some more detail how to get the schema. At least I was pretty confused.
Ah thanks a lot. I completely misinterprete the tutorial with that
/graphql
endpoint. Maybe someone should add some more detail how to get the schema. At least I was pretty confused.
I was confused too. I recommend you use Altair client for grapql query from client. It support many platforms. https://altair.sirmuel.design/ I used chrome extension for test my localhost grapql
Postman has GrapghQL now. After providing the query in GraphQl tab give a POST request.
Hi there,
I'm playing with https://github.com/graphql-java/tutorials/tree/master/book-details but there's something broken: It starts but does not provide the schema on http://localhost:8080/graphql instead it answers
Might you fix this? Or am I doing something wrong? I only cloned and started.
Kind regards Stephan