graphql / graphql-playground

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)
MIT License
8.77k stars 735 forks source link

Schema is not loading on MacOS - Electron App #657

Open TheMrugraj opened 6 years ago

TheMrugraj commented 6 years ago

This issue pertains to the following package(s):

What OS and OS version are you experiencing the issue(s) on?

MacOS High Sierra 10.13

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

Version 1.5.6 (1.5.6)

What is the expected behavior?

On opening a remote GraphQL Project it should get Schema and give Auto Suggestions which is working when I open that URL on Browser.

What is the actual behavior?

Here when I am opening a remote Project it's not fetching Schema so it's becoming hard to write Queries. But, if I write and hit Run button, its actually getting response and all very well. So, I think it has the only issue in fetching Schema.

What steps may we take to reproduce the behavior?

I just downloaded the Mac release and selected "URL ENDPOINT" to enter Remote URL of Project and then just clicked OPEN. Which opened that URL where I can write queries but Just schema didn't work.

image

timsuchanek commented 6 years ago

Thanks for reporting @TheMrugraj ! Right now, I can't reproduce the issue. Can you please double-check if your endpoint is exposing a valid graphql server? Maybe the auth headers were missing.

TheMrugraj commented 6 years ago

It's strange today I tried to do something, and it worked. Thanks for the support. Will get back in case I find it again. because I am sure about auth headers and all.

Thanks again

steve-a-jones commented 6 years ago

Same issue here -- endpoint is definitely exposing a valid graphql server as I am able run queries (although tab completion no longer works either).

thrichards commented 6 years ago

Having the same issue here. Express server is exposing the endpoint; can run queries using my app/ postman and playground. Just can't see the schema and this subsequently stopping tab completion too.

kunhuangau commented 5 years ago

I have the same issue, it happens once you have customised directive

yoshiakis commented 5 years ago

Hi @kunhuangau, Thank you for reporting! Could you tell me if there are any error messages in the browser console when it is happening?

kunhuangau commented 5 years ago

@yoshiakis , Thanks!

There is error in console when loading the playground, but the GraphQL server is running and response correctly for the queries.

Uncaught Error: Invalid or incomplete schema, unknown type: ConstraintString. Ensure that a full introspection query is used in order to build a client schema. at n (buildClientSchema.js:102) at t (buildClientSchema.js:93) at i (buildClientSchema.js:116) at buildClientSchema.js:237 at keyValMap.js:28 at Array.reduce () at r (keyValMap.js:27) at S (buildClientSchema.js:231) at fields (buildClientSchema.js:180) at C (definition.js:168)

yoshiakis commented 5 years ago

@kunhuangau I wasn't able to reproduce this problem using a custom directive. Could you give me the following information if you like?