Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema tab not working #1243

Closed
2 of 7 tasks
EthanSK opened this issue Jun 22, 2020 · 4 comments
Closed
2 of 7 tasks

Schema tab not working #1243

EthanSK opened this issue Jun 22, 2020 · 4 comments

Comments

@EthanSK
Copy link

EthanSK commented Jun 22, 2020

This issue pertains to the following package(s):

  • GraphQL Playground - Electron App
  • GraphQL Playground HTML
  • GraphQL Playground React
  • GraphQL Playground Express Middleware
  • GraphQL Playground Hapi Middleware
  • GraphQL Playground Koa Middleware
  • GraphQL Playground Lambda Middleware

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

MacOS

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

1.7.23 , latest

What is the expected behavior?

Schema tab shows blank screen

What is the actual behavior?

It should show the schema

@brandondoran
Copy link

I'm seeing this too with the graphql-playground-middleware-express. It looks it may be a problem with prettier.
Screen Shot 2020-06-22 at 9 55 43 AM

@joffrey-bion
Copy link

joffrey-bion commented Jun 23, 2020

Same problem here. In my case I had this error:
image

I think it may be linked to this issue: #1115

A workaround is to set schema.disableComments to false in the playground settings (cog in the top-right hand corner).

@benkimball
Copy link

I'm also seeing this behavior, and the workaround @joffrey-bion mentions fixes it for me.

Here's the syntax error it's throwing:

Uncaught SyntaxError: Syntax Error: Unexpected Name "now" (5:3)
  3 | 
  4 |   
> 5 |   now: DateTime
    |   ^
  6 | 
  7 |   
  8 |   me: User!
    at n (parser-graphql.js:1)
    at Object.parse (parser-graphql.js:1)
    at Object.parse (standalone.js:13721)
    at coreFormat (standalone.js:17145)
    at format (standalone.js:17381)
    at formatWithCursor (standalone.js:17397)
    at standalone.js:32917
    at Object.format (standalone.js:32926)
    at Object.prettify (utils.js:184)
    at Object.getSDL (createSDL.js:105)

Here's the part of my schema that is failing inside prettier-graphql.js:

#
directive @cacheControl(
  maxAge: Int
  scope: CacheControlScope
) on FIELD_DEFINITION | OBJECT | INTERFACE
#
type Query {
  # Retrieve the current server time in UTC.
  now: DateTime
}

@acao
Copy link
Member

acao commented Aug 30, 2020

dupe, fixed in last release

@acao acao closed this as completed Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants