Conversation
Support for single element (1 to *, 1 to 1) relationships (readonly)
Abstract types 1:1 relationships
* fix input types generated without fields causing error at schema build time * review changes
Implement nested filters on 1-1 relationship fields
|
Collaborator
Performance ReportNo Performance Changes Show Full Table
Old Schema Generation: 21.035s |
* implement create: added single type provided check for union, add nullable check for single relationship fields * add tests for delete * add tck tests for create, delete * implement nested delete * update schema tests with new delete input types * remove leftover cardinality check * use testhelper to check nodes and relationships existance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds back limited support for single-relationship (i.e. 1-* and 1-1) to version 7.
This allow for using
@relationshipdirective in non-list fields:This was removed in v6 due to inherent limitations on maintaining these constraints which could lead to a inconsistent database that could not be queried by GraphQL.
With this PR It will be possible to model and query the data of single element relationships, with the following constraints:
These rules mean that it is easier to maintain consistency between the GraphQL schema and the underlying data, even if not guaranteed
Future work will be done to add support for more risky operations (mutations on non-nullable fields and update mutations) but data consistency will not be guaranteed at the GraphQL level for these