0
votes

I am able to access my application's graphql api using Http POST method through postman.
But the same url ( http://localhost:8080/rest/api) is not accessible through graphql web client - https://www.graphqlbin.com/v2/6RQ6TM.
Error message I see is as below.

{ "error": "Failed to fetch schema. Please check your connection" }

So am wondering if the web client is trying to access graphql api on any other Http method like PUT etc. Could some one guide why I am running in to this issue.

1
anyone, any idea why the error. UPDATE: like clarified by Ken, my api is using POST method as expected by graphqlbin client - samshers

1 Answers

0
votes

You mean the GraphQL client at https://www.graphqlbin.com/ ? It uses POST to send the request to the GraphQL API which you can verify by using the web inspector provided by browser.

GraphQL specification itself does not define any requirements about how to expose the API to let external client to access. It is up to the individual GraphQL server implementation to choose their way. Almost all of the implementation will simply use HTTP and support both POST and GET method as suggested by this official guideline.