apollographql / apollographql/datasource-rest

Question related to changes in request parameters

Open
#150 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
48
Forks
21
PR merge metrics
No merged PRs in 30d

Description

With `apollo-datasource-rest` it was possible to set a third argument and set fields there which were used internally in `willSendRequest` in our codebase. Given that `@apollo/datasource-rest` only supports two arguments, how would you recommend supplying additional data fields that are purely for internal use and that we don’t intend to send to a server but to use at a later point of execution? Would you recommend setting a new field in the second argument?

Example of what we have with `apollo-datasource-rest`:
```
this.patch(path, input, {
someBooleanField: true,
});
```

Thank you.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the @apollo/datasource-rest request method signatures and the willSendRequest lifecycle described by the issue. Compare the previous three-argument usage with the current two-argument API and document the supported way to retain internal-only fields; done means the recommendation is explicit and does not send those fields to the server.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.