mirror of
https://github.com/vale981/apollo-server
synced 2025-03-06 10:11:40 -05:00
Add connect-query middleware in front of graphqlExpress
This commit is contained in:
parent
5db613facd
commit
7cf0580122
2 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}));
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue