Skip to content

Move Uploads to constructor and remove enhanceSchema#1204

Merged
evans merged 4 commits into
version-2from
server-2.0/uploads
Jun 21, 2018
Merged

Move Uploads to constructor and remove enhanceSchema#1204
evans merged 4 commits into
version-2from
server-2.0/uploads

Conversation

@evans

@evans evans commented Jun 20, 2018

Copy link
Copy Markdown
Contributor

This places uploads configuration inside of the constructor, since the logic is the same across multiple integrations. Including it in the constructor follows the same logic as subscriptions.

//default we enable them if supported by the integration
} else if (uploads) {
throw new Error(
'This implementation of ApolloServer does not support file uploads.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way we can make this more specific? We want to make sure people understand it is because of the framework/environment they are using.

onDisconnect?: (websocket: WebSocket, context: ConnectionContext) => any;
}

// This configuration is shared between all intetgrations and should include

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo (integrations)

// This error began appearing randomly and seems to be a dev dependency bug.
// https://github.com/jaydenseric/apollo-upload-server/blob/18ecdbc7a1f8b69ad51b4affbd986400033303d4/test.js#L39-L42
if (error.code !== 'EPIPE') throw error;
// if (error.code !== 'EPIPE') throw error;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems dangerous to just swallow all errors here. Did you ever figure out why this test throws?

@evans evans merged commit d187870 into version-2 Jun 21, 2018
@evans evans deleted the server-2.0/uploads branch June 21, 2018 19:16
@evans evans mentioned this pull request Jun 21, 2018
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants