Skip to content

Error Cannot use GraphQLSchema "[object GraphQLSchema]" from another module or realm. #75

Closed
@jer-sen

Description

@jer-sen

I face this error. It seems due to the presence of extensions in import file names.
The library generating my schema uses ".mjs" files of graphql module, whereas graphql-query-complexity uses ".js" ones, and so graphql module believe that there are 2 different versions of it used.

For instance:

	import {
	  getArgumentValues,
	  getDirectiveValues,
	  getVariableValues,
	} from 'graphql/execution/values.js';

should be replaced with

	import {
	  getArgumentValues,
	  getDirectiveValues,
	  getVariableValues,
	} from 'graphql/execution/values';

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