小编Gle*_*nks的帖子

不能使用重复的“graphql”模块

我发现graphql-js 库不允许依赖项也使用 graphql。

你会得到以下错误

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.

从以下代码

const express = require('express');
const graphqlHTTP = require('express-graphql');
const { GraphQLSchema } = require('graphql'); 
// the module graphql-test-mod-obj-type' has 
// graphql as a depenedency
const myType = require('graphql-test-mod-obj-type');

const app = express();

const schema = new GraphQLSchema({ query: …
Run Code Online (Sandbox Code Playgroud)

graphql-js

5
推荐指数
2
解决办法
8248
查看次数

标签 统计

graphql-js ×1