-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for GraphQL API, starting with createEtchPacket #16
Conversation
@@ -49,7 +49,10 @@ | |||
"yargs": "^15.1.0" | |||
}, | |||
"dependencies": { | |||
"extract-files": "^6", |
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.
This module is currently on v9.0.0
but have to drop to 6.0.0
to get it to work on Node 8
… body parsing helper. tidied up a lot
f328520
to
3b567a9
Compare
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.
Looking good
src/index.js
Outdated
// QUESTION: maybe we want to keeep responseQuery to ourselves while we figure out how we want it to | ||
// feel to the Users? |
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.
I like the idea of having a default response, then letting them override it
return path.basename(thing.client._httpMessage.path || '') | ||
} | ||
|
||
throw new Error('Unable to determine file name for this upload. Please pass it via options.filename.') |
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.
👍
Mime.lookup(options.filepath || options.filename) | ||
} | ||
|
||
throw new Error('Unable to determine mime type for this upload. Please pass it via options.mimetype.') |
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.
👍
Description of the change
In concert with the big changes to the
createEtchPacket
mutation, we'll want to add robust support for that mutation in this, our Node API client. This client previously did not have any support for GraphQL whatsoever, so it had to also be added in this PR.Here are the big things going on:
graphql-upload
-compliant structures, allowing for files to be uploaded in a GraphQL mutationType of change
Related issues
Checklists
Development
Code review