-
Notifications
You must be signed in to change notification settings - Fork 152
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
Fix 1073 connectOrCreate schema #1110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also check that if an autogenerated ID field is in the where
, does the ID get overridden in ON CREATE
with an autogenerated value.
packages/graphql/tests/integration/connect-or-create/connect-or-create-id.int.test.ts
Outdated
Show resolved
Hide resolved
Tests updated, this pr does not cover newly found bug #1124 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broadly speaking, this looks good! I have a suggestion - should we make the onCreate
input field non-nullable? That way, despite the where
, we will always force our users to specify what the fields should be on creation, which will make it easier to change the implementation under the hood.
🤔 @darrellwarde onCreate is already required, or am I missing something? |
I might be losing my mind. 🙃 |
Description
This PR fixes #1073 by properly marking the required fields in the connectOrCreate -> onCreateInput
Closes #1073