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

@gql2ts/language-typescript > @gql2ts/util@1.9.0 support for graphql 15 #271

Open
markdthompson-SR opened this issue Jun 10, 2022 · 0 comments

Comments

@markdthompson-SR
Copy link

We are getting a warning using 'yarn install' with graphql 15.x installed: "@gql2ts/language-typescript > @gql2ts/util@1.9.0" has incorrect peer dependency "graphql@>= 0.10 <15"' and running 'rake graphql:dump_schema && gql2ts' breaks with:

Schema dumped into /myproject/app/graphql/schema.json
/myproject/node_modules/gql2ts/node_modules/graphql/jsutils/instanceOf.js:28
throw new Error("Cannot use ".concat(className, " "").concat(value, "" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results."));
^

Error: Cannot use GraphQLUnionType "AlertSource" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
at instanceOf (/myproject/node_modules/gql2ts/node_modules/graphql/jsutils/instanceOf.js:28:13)
at isUnionType (/myproject/node_modules/gql2ts/node_modules/graphql/type/definition.js:142:34)
at Object.isAbstractType (/myproject/node_modules/gql2ts/node_modules/graphql/type/definition.js:274:35)
at resolveInterfaceName (/myproject/node_modules/gql2ts/node_modules/@gql2ts/from-schema/dist/index.js:89:23)
at resolveInterfaceName (/myproject/node_modules/gql2ts/node_modules/@gql2ts/from-schema/dist/index.js:80:20)
at fieldToDefinition (/myproject/node_modules/gql2ts/node_modules/@gql2ts/from-schema/dist/index.js:120:26)
at/myproject/node_modules/gql2ts/node_modules/@gql2ts/from-schema/dist/index.js:170:85
at Array.map ()
at typeToInterface (/myproject/node_modules/gql2ts/node_modules/@gql2ts/from-schema/dist/index.js:170:14)
at /myproject/node_modules/gql2ts/node_modules/@gql2ts/from-schema/dist/index.js:193:10
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

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

1 participant