matthewmueller / matthewmueller/graph.ql
Add example for loaders?
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 629
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
@matthewmueller can you add simple example for data fetching?
// an object of promises that fetch actual data
var loaders = require('./loaders')
...
Person: {
films(person) {
return loaders.film.loadMany(person.films)
}
},
How should look like loader? Should method loadMany return the usual promise?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the referenced ./loaders module and the Person.films resolver example. Determine how a loader should be shown for data fetching and whether loadMany returns the usual promise. Done means the repository includes a simple loader example that answers both questions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, javascript
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100