-
Couldn't load subscription status.
- Fork 15
Data schema/fix custom type array bug #619
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
base: main
Are you sure you want to change the base?
Changes from all commits
f3744f3
53624d5
ddad46e
758b0da
e46c96f
f018427
a9d5417
20bc0f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| "@aws-amplify/data-schema": patch | ||
| --- | ||
|
|
||
| fix(schema): preserve `array`, `arrayRequired`, and `valueRequired` when generating input types for custom fields | ||
|
|
||
| Previously, nested custom input types dropped important metadata about array and requiredness. | ||
| This change ensures: | ||
|
|
||
| - `array` is passed through for referenced custom types | ||
| - `arrayRequired` and `valueRequired` are correctly preserved | ||
| - Inline custom types default to `false` for these fields | ||
|
|
||
| This fixes inconsistencies between schema definitions and generated GraphQL input types. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,3 +158,4 @@ Return the schema definition as a graphql string, with amplify directives allowe | |
|
|
||
| </td></tr> | ||
| </tbody></table> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,3 +162,4 @@ _(Optional)_ If an error can be associated to a particular field in the GraphQL | |
|
|
||
| </td></tr> | ||
| </tbody></table> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -563,3 +563,4 @@ Replaces the value of a key in a complex generic type param | |
|
|
||
| </td></tr> | ||
| </tbody></table> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,3 +74,4 @@ number | |
|
|
||
| </td></tr> | ||
| </tbody></table> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,3 +27,4 @@ Description | |
|
|
||
| </td></tr> | ||
| </tbody></table> | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for adding tests! Can you also add test coverage to the ModelSchema.test.ts file as it is more focused on testing custom operations argument inputs? You can refer to PR #617 for these tests |
Uh oh!
There was an error while loading. Please reload this page.
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 am guessing this comment was generated by an LLM. Can you please review/remove all such comments?