Open
Description
I was looking into this #602 and fell over this bug.
With this query:
query ($proId: Int, $proId2: Int) {
test2 {
name
alias1: profile(profileId: $proId2) {
contentType
}
alias2:profile(profileId: $proId) {
contentType
}
}
}
{
"proId": 2,
"proId2": 4,
"id": 70
}
The profile relationship is only run once and therefore the different arguments given to the custom query clause is not taken into account, only the last query get the right args.
It seems a bit to hard to fix since it is not easily possible to alias eloquent relationships.
Unfortunately something like this is not possible. This would have made it a simplier fix
User::with('relationship', 'relationship AS other')->get();