apollographql / apollographql/datasource-rest
Document `contextValue` recipe for circular references in context object
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
The `dataSources` configuration in <=AS3 provided a magical / easy path to providing the entire context object to data sources (in a circular reference manner) so that data sources could easily reference other bits on context as well as other data sources.
This is a bit of a sticking point for users, I imagine an example implementing a `Context` class of sorts would be helpful.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing documentation around the `dataSources` configuration and `contextValue`. Add a focused `Context` class example showing how the context object and data sources can reference one another, and make the recipe clear enough for users to reproduce the circular-reference setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100