Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apollo Server 2: Add file uploads #1071

Merged
merged 9 commits into from
May 29, 2018
Merged

Conversation

evans
Copy link
Contributor

@evans evans commented May 16, 2018

This PR adds file uploads to the apollo server 2

  • Update CHANGELOG.md with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests

@evans evans added this to the Release 2.0 milestone May 16, 2018
@evans evans requested a review from jbaxleyiii May 29, 2018 08:46
it('enabled uploads', async () => {
server = new ApolloServer({
typeDefs: gql`
scalar Upload
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needing to add this line is frustrating. When it is removed, the makeExecutableSchema in the constructor fails. We could delay the evaluation of the typeDefs and resolvers until later when this.schema is used with a getter. This feels a bit weird, since the mocks are added in the constructor, so could or could not affect the typeDefs later added to the schema with enhanceSchema

Before the current and past two commits, we had the upload configuration code in the ApolloServer constructor. However fileuploads seem to be a integration specific concern, so I'm pretty convinced that uploads should be configured in registerServer

@evans
Copy link
Contributor Author

evans commented May 29, 2018

To view the state of the repository when the file upload configuration was done in the constructor, please look at this commit.

@evans evans merged commit 5412885 into refactor-2.0 May 29, 2018
@evans evans deleted the server-2.0/file-uploads branch May 29, 2018 22:58
This was referenced May 29, 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.

1 participant