Graphiql Express不是功能

时间:2019-03-14 06:43:31

标签: graphql apollo-server

如何解决这个问题?

import { graphiqlExpress, graphqlExpress } from 'apollo-server-express';


    app.use('/graphiql', graphiqlExpress({
      endpointURL: constants.GRAPHQL_PATH
    }))

    app.use(constants.GRAPHQL_PATH, graphqlExpress({
      schema
    }))

似乎是graphQL服务器的迁移错误?

/Users/aditya/Documents/Twitter/server/src/index.js:42
app.use('/graphiql', (0, _apolloServerExpress.graphiqlExpress)({
                                                              ^

TypeError: (0 , _apolloServerExpress.graphiqlExpress) is not a function

0 个答案:

没有答案