Add connect-query middleware in front of graphqlExpress

This commit is contained in:
Martijn Walraven 2017-08-09 20:31:00 +02:00
parent 5db613facd
commit 7cf0580122
2 changed files with 2 additions and 1 deletions

View file

@ -342,7 +342,7 @@ describe(`GraphQL-HTTP (apolloServer) tests for ${version} express`, () => {
it('handles type validation (GET)', async () => {
const app = express();
app.use('/graphql', graphqlExpress({
app.use('/graphql', require('connect-query')(), graphqlExpress({
schema: TestSchema
}));

View file

@ -16,6 +16,7 @@ function createApp(options: CreateAppOptions = {}) {
if (options.graphiqlOptions ) {
app.use('/graphiql', graphiqlExpress( options.graphiqlOptions ));
}
app.use('/graphql', require('connect-query')());
app.use('/graphql', graphqlExpress( options.graphqlOptions ));
return app;
}