Open schroeer opened 4 years ago
Quite right, and being selective about what to extract is one of the points of GraphQL. Feel like making a PR to fix this? I think it'd just take adding some args to the various calls to find
and search
, constructing which fields to get from $info->{field_nodes}
.
What makes this a little bit hairy is that you need to keep track of the table aliases (see here). GraphQL does not prevent you from joining the same table more than once.
That's true! And we could use the given alias as the table alias in some fashion. Some properly tortuous examples will be needed to check this is correct.
Unfortunately, you cannot control the aliases that DBIC uses. So you'll have to copy what DBIC does.
The query resolver always selects all columns of all involved tables, even if only a few fields (columns) are selected. This might be a problem if some columns contain very much data.