Nest: GraphQL example no longer works after Apollo upgrade

Created on 7 Aug 2018  路  7Comments  路  Source: nestjs/nest

GraphQL example no longer works after Apollo upgrade


[ ] Regression 
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior


The example code in https://docs.nestjs.com/graphql/quick-start under Apollo middleware no longer works after Apollo's upgrade and the function graphqlExpress is not exported.

Working apollo-server-express version: 1.3.6
apollo-server-express current version: 2.0

Expected behavior


Expects the code compiles by following the example.

Most helpful comment

Apollo 2 will be supported soon

All 7 comments

Hi could you provide the version of Apollo that you have upgraded to?

@ryanswart Sorry I mean apollo-server-express not apollo.

The apollo-server-express I installed is 2.0. The doc example uses < 2.0. I tested with apollo-server-express v1.3.6 then the example worked.

@ryanswart
hi, the

graphql-apollo

in

sample

directory use apollo-server-express V1.2.0锛宨f use apollo-server-express latest version(3.0),above import prompt can't find graphqlExpress.
import { graphqlExpress, graphiqlExpress } from 'apollo-server-express';
review the apollo-server-express source code,it remove the graphqlExpress from 'apollo-server-express'. V3.0.0 not compatible V1.x.x .

+1

In this issue, you have examples to make it works with apollo 2 : https://github.com/nestjs/graphql/issues/32

Apollo 2 will be supported soon

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings