Skip to content

Commit

Permalink
Only require apollo-upload-server if uploads are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnwalraven committed Sep 1, 2018
1 parent 78d7879 commit ef67851
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/apollo-server-core/src/ApolloServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import { GraphQLExtension } from 'graphql-extensions';
import { EngineReportingAgent } from 'apollo-engine-reporting';
import { InMemoryLRUCache } from 'apollo-server-caching';

import { GraphQLUpload } from '@apollographql/apollo-upload-server';

import {
SubscriptionServer,
ExecutionParams,
Expand Down Expand Up @@ -151,6 +149,7 @@ export class ApolloServerBase {

//Add upload resolver
if (this.uploadsConfig) {
const { GraphQLUpload } = require('@apollographql/apollo-upload-server');
if (resolvers && !resolvers.Upload) {
resolvers.Upload = GraphQLUpload;
}
Expand Down

0 comments on commit ef67851

Please sign in to comment.