While trying to download the schema using npm run schema:download I am receiving the following error.
[email protected] schema:download npx apollo service:download --endpoint=http://localhost:9000/graphql ./src/app/graphql-schema.json
DEPRECATED: This command will be removed from the apollo
CLI in
its next major version. Replacement functionality is available in
the new Apollo Rover CLI: https://go.apollo.dev/t/migration
✔ Loading Apollo Project ✖ Saving schema to ./src/app/graphql-schema.json → spurious results. Error: Cannot use GraphQLSchema "{ __validationErrors: undefined, extensions: undefined, astNode: undefined, extensionASTNodes: undefined, __allowedLegacyNames: [], _queryType: Query, _mutationType: Mutation, _subscriptionType: null, _directives: [@include, @skip, @deprecated, @specifiedBy], _typeMap: { Query: Query, Car: Car, String: String, Float: Float, Mutation: Mutation, NewCarInput: NewCarInput, Int: Int, __Schema: __Schema, __Type: __Type, __TypeKind: __TypeKind, Boolean: Boolean, __Field: __Field, __InputValue: __InputValue, __EnumValue: __EnumValue, __Directive: __Directive, __DirectiveLocation: __DirectiveLocation }, _possibleTypeMap: {}, _implementations: {} }" 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.
I have provided the endpoint for schema:download in my package.json as below.
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"schema:download": "npx apollo service:download --endpoint=http://localhost:9000/graphql ./src/app/graphql-schema.json",
"schema:generate-watch": "npx apollo codegen:generate --localSchemaFile=./src/app/graphql-schema.json --target=typescript --tagName=gql --watch"
},
Can somebody help me sort out with the issue as Im new to graphql