Skip to content

Documentation: webpack.babel and graphql-js #12

Open
@cahnory

Description

I add difficulties to make it work under these conditions:

  • es6 webpack configuration file (webpack.babel.js)
  • graphql-js as configuration option

getting the error: "Schema must be an instance of GraphQLSchema" (schemaSource was always equal to {} in https://github.com/graphcool/graphql-config/blob/master/src/index.ts#L98)

I had to remove react-relay plugin from .babelrc:

{
  "presets": [
    "es2015",
    "stage-0",
    "react"
  ]
}

and put it back in webpack.babel.js, in the babel options of the webpack loader:

{
  "presets": [
    "es2015",
    "stage-0",
    "react"
  ],
  "plugins": ["react-relay"]
}

Maybe it's obvious but it wasn't to me. It would ne nice to have this referenced somewhere.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions