graphile-engine icon indicating copy to clipboard operation
graphile-engine copied to clipboard

feat(pg) single backward relations with arguments if primary key covered partially

Open ab-pm opened this issue 6 years ago • 2 comments

Integrating the plugin I had posted on Discord into core.

Basic tests (creates the fields it should, queries work as expected, can be omitted using new @omit single #460) included based on the existing test schema c. Not sure if separate (smaller) schema is needed to go over all edge cases as well, including renaming and custom inflection?

ab-pm avatar Nov 19 '19 10:11 ab-pm

Does this need to go behind a feature flag? I figured this might break existing schemas that a) have such foreign references on parts of their primary keys and b) have a @foreignFieldName that doesn't properly singularise, leading to a name collision between the "many" backwards relation and the new single-but-parameterised relation.

ab-pm avatar Nov 19 '19 12:11 ab-pm

@ab-pm Thanks for the PR. I'm going to leave this hanging for a while because I want to figure out what I'm doing with the existing core plugins in v5 before extending the codebase further.

benjie avatar Jan 07 '20 16:01 benjie