apollographql / apollographql/datasource-rest

[apollo-datasource-rest] - Support fetch arraybuffer and blob response types

Open
#29 1 comment 14 reactions 0 assignees View on GitHub
PRs welcome
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.