Apollo Server 2: Add file uploads#1071
Conversation
8de623f to
d89919d
Compare
d89919d to
beeac26
Compare
0aea400 to
1ca87e3
Compare
| it('enabled uploads', async () => { | ||
| server = new ApolloServer({ | ||
| typeDefs: gql` | ||
| scalar Upload |
There was a problem hiding this comment.
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
|
To view the state of the repository when the file upload configuration was done in the constructor, please look at this commit. |
095e1dd to
e9d076d
Compare
This PR adds file uploads to the apollo server 2