Graphiql: GraphiQL fails with Module not found: Can't resolve 'graphql/validation/rules/ExecutableDefinitions'

Created on 9 Jul 2018  路  10Comments  路  Source: graphql/graphiql

In my new Create-React-App as soon as I include "graphiql": "^0.11.11" I see the following error

./node_modules/graphql-language-service-utils/dist/validateWithCustomRules.js
Module not found: Can't resolve 'graphql/validation/rules/ExecutableDefinitions' in '/Users/nishant/dev/cognito-poc/node_modules/graphql-language-service-utils/dist'

Seems like this may be referring to the same issue: https://github.com/graphql/graphql-language-service/issues/239

Most helpful comment

Hi, I had the same issue. Installing [email protected] resolved it despite npm peer dependencies warnings. Also I checked graphql repo and it seems that they added ExecutableDefinitions file starting from v0.12.0.

All 10 comments

Here is what my dependencies look like:

  "dependencies": {
    "aws-amplify": "^0.4.6",
    "bootstrap": "^4.1.1",
    "graphiql": "^0.11.11",
    "isomorphic-fetch": "^2.2.1",
    "react": "^16.4.1",
    "react-dom": "^16.4.1",
    "react-form": "^3.5.5",
    "react-overlay-loading": "^1.0.3",
    "react-scripts": "1.1.4",
    "reactstrap": "^6.2.0"
  },

Any suggestion, how to change transitive dependency to fix this?

Hi, I had the same issue. Installing [email protected] resolved it despite npm peer dependencies warnings. Also I checked graphql repo and it seems that they added ExecutableDefinitions file starting from v0.12.0.

@dpodsiadlo that solves the issue. Thanks!

Should probably remove older graphql-js versions from peer dependencies

A solution is to separately install each aws-amplify module that you need. For instance @aws-amplify/auth and @aws-amplify/core. This will prevent installing the graphql dependency from @aws-amplify/api-graphql defined in their package.json dependencies.

A solution is to separately install each aws-amplify module that you need. For instance @aws-amplify/auth and @aws-amplify/core. This will prevent installing the graphql dependency from @aws-amplify/api-graphql defined in their package.json dependencies.

this is no longer an issue with our tooling, must be another issue with a dependency in the aws amplify stack! wish i could help you

@masad-frost

Should probably remove older graphql-js versions from peer dependencies

yes, this was done, so we shouldn't see this any more

@astenmies you could probably go to the relevant aws amplify repo and open an issue there if there isn't one already

@acao

@astenmies you could probably go to the relevant aws amplify repo and open an issue there if there isn't one already

Sure, sorry I mixed up the repos I did not realize I was posting this in graphiql, my bad.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asiandrummer picture asiandrummer  路  12Comments

rherrmann picture rherrmann  路  19Comments

ElijahLynn picture ElijahLynn  路  10Comments

asiandrummer picture asiandrummer  路  10Comments

sashahavia picture sashahavia  路  50Comments