This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
Bug fixes for v2.16.0: Fragments, relationship types, and merge mutations #492
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Query API
When querying an interface type, a fragment can now be used on that same interface type:
When querying an object type, a fragment can now be used on an interface implemented by that object:
Fixes Errors adding _id to @relation types #234 - Errors adding _id to
@relation
typesWhen using relationship types, the Neo4j internal ID is now generated and translated appropriately. Corresponding
_id_asc
and_id_desc
values are also generated for the relationship type's ordering enum. Because it is not recommended for unique selection, relationship field arguments are not generated for the_id
field.Fixes Error when schema contains array of properties on relationship #490 - Error when schema contains array of properties on relationship,br>
This issue occurred during augmentation, when generating the
orderBy
field argument and enum type for a relationship type that does not have at least one non-list scalar field. There is currently no support for for ordering list type scalar fields or relationship fields, so in such a case an ordering enum and its field argument should not be generated. Although the enum type was not being generated, corresponding field arguments on the given relationship field were, resulting in the error noted in the issue. It is also generally prevented by the fix for Errors adding _id to @relation types #234, given that relationship types will now have at least an_id
field, and so at least_id_asc
and_id_desc
ordering fields. Until current behavior changes, thepropertyFieldExists
function infields.js
has been updated to directly fix this issue.Mutation API
Fixes Not getting Merge Mutations from makeAugmentedSchema #440 - Not getting Merge Mutations from makeAugmentedSchema
Merge node mutations are now generated even when the type does not have at least 1 field that could be updated. The generation of these mutations was inappropriately prevented, requiring there to be at least 1 field to be used in the case of property updates.
Fixes MergeMyType(MyType: $example) isn´t working #382 - MergeMyType(MyType: $example) isn´t working
This is currently working, so this test has been added to demonstrate the translation: