apollographql / apollographql/datasource-rest
[apollo-datasource-rest] - Support fetch arraybuffer and blob response types
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
I need to fetch raw image data from a service and then return a base64 encoded version of that data to the front end. After testing, I discovered that the stock node-fetch implementation is mangling the data without the appropriate response type. There doesn't appear to currently be a way with RESTDatasource to resolve the different types that fetch supports (arraybuffer, blob, text, json, etc).
Is this something that can be added in?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing RESTDatasource's response handling and its node-fetch integration, then compare how the existing response types are resolved. The work is done when RESTDatasource can request arraybuffer and blob responses without mangling raw image data, while preserving the existing supported response types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100