Open EdwinDayot opened 4 years ago
I think it's just a part of a larger problem. Each Interface or Union should assume that every field defined in it are available in the database, but should use the alias and query defined in the type implementing the Interface or Union.
I have been working on it with the method
But it does not support aliases. (apparently)
Great! May the force be with you :)
Added the SelectFields
label, seems like another shortcoming with this part.
I am taking a look at this, it seems that relationships are not working well either...
Tried to tackle this by using webonyx QueryPlan helper, which could ease this problem quite a bit, but since it still have unresolved issues, like this: https://github.com/webonyx/graphql-php/pull/831, It will have to wait for now
Does https://github.com/nuwave/lighthouse support? Not sure, might be worth checking out how they do it.
Versions:
Description:
The generated SQL for a group by on an interface would raise an error as * is selected instead of the group by fields
Steps To Reproduce:
With this kind of configuration, the SQL request would result in:
And of course, it would raise an SQL error:
Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ...
Expectations
Only the required fields should be selected