graphql / graphql-playground

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

GraphQL Playground "Schema" tab crash, but "docs" tab works fine #1252

Closed thibault60000 closed 4 years ago

thibault60000 commented 4 years ago

This issue pertains to the following package(s):

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

Windows 10

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

"prisma-binding": "1.5.19"
"prisma": "^1.34.10"

What is the expected behavior?

I would like to use the "schema" tab of my playground

What is the actual behavior?

When I start my Playground :

What steps may we take to reproduce the behavior?

datamodel.prisma or datamodel.graphql...

type Post {
  id: ID! @id
  createdAt: DateTime! @createdAt
  updatedAt: DateTime! @updatedAt
  isPublished: Boolean! @default(value: false)
  title: String!
  image: String!
  greatImage: String!
  text: String!
  author: User!
  category: PostCategory
}

type User {
  id: ID! @id
  email: String! @unique
  password: String!
  name: String!
  rules: [String!]! @scalarList(strategy: RELATION)
  posts: [Post!]!
}

type PostCategory {
  id: ID! @id
  label: String!
}

Index.js GraphQL Server

const server = new GraphQLServer({
  typeDefs: "src/schema.graphql",
  resolvers,
  context: req => ({
    ...req,
    db: new Prisma({
      typeDefs: "src/generated/prisma.graphql",
      endpoint: process.env.PRISMA_ENDPOINT, 
      secret: process.env.PRISMA_SECRET, 
      debug: true 
    })
  })
});

// Démarre le serveur
server.start(() => console.log("Server is running on http://localhost:4000"));

Command : "start": "nodemon -e js,graphql -x node -r dotenv/config src/index.js",

Please provide a gif or image of the issue for a quicker response/fix.

2020-07-07_22h37_52

2020-07-07_22h38_18

It's the "Schema" tab

Thanks you !

acao commented 4 years ago

fixed in last release