Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Oct 6, 2023
2 parents 5e2aa50 + 450a0f2 commit 73b7b73
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/graphql/graphql.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ export class GraphqlModule implements NestModule {
constructor(private readonly middleware: GqlContextHostImpl) {}

configure(consumer: MiddlewareConsumer) {
// Always attach our GQL Context middleware.
// It has its own logic to handle non-gql requests.
consumer.apply(this.middleware.use).forRoutes('*');

// Attach the graphql-upload middleware to the graphql endpoint.
const uploadMiddleware = createUploadMiddleware();
consumer
.apply(this.middleware.use, uploadMiddleware)
.forRoutes('/graphql', '/graphql/*');
consumer.apply(uploadMiddleware).forRoutes('/graphql', '/graphql/*');
}
}

0 comments on commit 73b7b73

Please sign in to comment.