-
Notifications
You must be signed in to change notification settings - Fork 2k
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
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.
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
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