-
Notifications
You must be signed in to change notification settings - Fork 75
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(relation-transformer): relation field nullability in object and input type #817
Conversation
Codecov Report
@@ Coverage Diff @@
## main #817 +/- ##
=======================================
Coverage 63.30% 63.31%
=======================================
Files 282 282
Lines 18377 18383 +6
Branches 4461 4466 +5
=======================================
+ Hits 11634 11639 +5
- Misses 6132 6133 +1
Partials 611 611
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
2c0b0c6
to
24da7fd
Compare
...-graphql-relational-transformer/src/__tests__/amplify-graphql-belongs-to-transformer.test.ts
Outdated
Show resolved
Hide resolved
...fy-graphql-relational-transformer/src/__tests__/amplify-graphql-has-many-transformer.test.ts
Outdated
Show resolved
Hide resolved
@@ -262,6 +268,9 @@ export const ensureHasManyConnectionField = ( | |||
const relatedTypeObject = ctx.output.getType(relatedType.name.value) as ObjectTypeDefinitionNode; | |||
const connectionAttributeName = getConnectionAttributeName(ctx.featureFlags, object.name.value, field.name.value, connectionFieldName); | |||
|
|||
// The nullabilty of connection fields for hasMany depends on the hasMany field |
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.
I keep this as the original implementation. This is out of the scope of fixing the issue.
Description of changes
Refactor the impact of non-nullable field with relation directive on the generated connection fields in object definition and input types.
UpdateInput
type, which is consistent to other non-nullable fields.Issue #, if available
Fix aws-amplify/amplify-codegen#461
Description of how you validated changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.