nuwave / nuwave/lighthouse

Support custom edge pivot data with `@rename` directive

Open
#1,340 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
3.5k
Forks
468
Avg merge
3h 9m
Merged PRs (30d)
2

Description

A while back I introduced #871 which gave the ability to provide a custom edge for the @belongsToMany directive. This, in turn, made it possible include pivot custom data within the edge.

I'm realizing now that the @rename directive wasn't taken into account for handling the custom edge data. This should be a very simple fix which I'm happy to tackle. I just wanted to make an issue so I don't forget. 😆

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the custom edge handling for @belongsToMany introduced in #871, then follow how the @rename directive is applied to that edge data. The work is done when custom pivot data on renamed fields is handled consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, laravel, php
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.