Eager-load multiple relationships through `@with`
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.5k
- Forks
- 468
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 2
Description
Is your feature proposal related to a problem? Please describe.
It seems that it is currently not possible to eager-load multiple relationships through the @with directive.
Describe the solution you'd like
I think it should either be possible to use the @with directive more than once on a single field, or the @with directive should accept an array of relationships.
- Using the
@withdirective multiple times: I'm not sure if it's currently possible to use any directive more than once on a single field. Is this being prevented for some reason? - Accepting an array of relations through the
@withdirective: The question is how to handle scopes then, should they be part of therelationsarray (e.grelations: ["relation" => ["scopeOne", "scopeTwo"]]?
Describe alternatives you've considered
I haven't found any alternative to overcome this issue.
Contributor guide
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 locating the implementation and tests for the @with directive and how a single relationship is currently specified. Compare the two proposed forms, including scoped relationships, and define which behavior and tests would establish support for multiple eager-loaded relationships.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, laravel, php
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100