graphql-playground icon indicating copy to clipboard operation
graphql-playground copied to clipboard

Load schema from file

Open baflo opened this issue 4 years ago • 3 comments

This issue pertains to the following package(s):

  • [x] GraphQL Playground - Electron App
  • [ ] GraphQL Playground HTML
  • [ ] GraphQL Playground
  • [ ] 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?

Windows 10 20H2

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

1.8.10

What is the expected behavior?

Schema should be loaded from file if given by .graphqlconfig

What is the actual behavior?

Schema is not loaded

What steps may we take to reproduce the behavior?

Save this file as .graphqlconfig:

{
  "schema": "schema.gql",
  "documents": "apps/backend/src/app/common/**/*.graphql",
  "projects": {
    "app": {
      "schemaPath": "schema.gql",
      "extensions": {
        "endpoints": {
          "default": "http://localhost:4000/graphql"
        }
      }
    }
  }
}

and this as graphql.yml:

type Query {
  getSetting: Setting!
}

type Setting {
  id: Int!
  highlightColor: String!
  errorColor: String!
  infoColor: String!
  logoUrl: String!
}

Then open the workspace containing the .graphlconfig. It won't load the schema.

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

baflo avatar Jan 05 '21 09:01 baflo

i will take a look at this once we’re able to successfully build the electron app again!

acao avatar Jan 05 '21 14:01 acao

Any chance this was fixed?

moon-sam avatar Jul 27 '22 18:07 moon-sam