Skip to content

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

@markdthompson-SR

Description

@markdthompson-SR

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.

Metadata

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