Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphql: Make an expect an error with better explanation #5385

Merged
merged 1 commit into from May 17, 2024

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented May 3, 2024

When we resolve a single-object reference from the store, but find multiple children, we need to return an error. We did that already for derived fields, but for non-derived fields that was an expect. For non-derived fields, we can only hit that when the id of the parent entity is not unique, which can happen because we stopped enforcing exclusion constraints a while ago for mutable entities. For immutable entities, we still enforce uniqueness of ids

When we resolve a single-object reference from the store, but find multiple
children, we need to return an error. We did that already for derived
fields, but for non-derived fields that was an expect. For non-derived
fields, we can only hit that when the id of the parent entity is not
unique, which can happen because we stopped enforcing exclusion constraints
a while ago for mutable entities. For immutable entities, we still enforce
uniqueness of ids
@lutter lutter merged commit c9fe872 into master May 17, 2024
7 checks passed
@lutter lutter deleted the lutter/non-unique branch May 17, 2024 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants