Incorrectly generated schema.json for netsted objects
See original GitHub issueDescribe the bug My schema.json does not have a definitions for netsted objects. My mutations and query js files are correctly generated - include all nested objects, it’s just schema.json which is wrong.
To Reproduce Steps to reproduce the behavior:
- use schema:
type S3Object @model @auth(rules: [{allow: owner}]) {
bucket: String!
region: String!
key: String!
}
type Car @model @auth(rules: [{allow: owner}]) {
id: ID!
name: String!
description: String
createdAt: String
file: S3Object!
}
Amplify will generate the correct mutation/query files but schema.json definition of Car will not have S3Object. As a result i am not able to call mutations and getting error: "The variables input contains a field name ‘file’ that is not defined for input object type ‘CreateCarInput’ ",
Expected behavior S3Object should be defined in schema.json
Smartphone (please complete the following information): React-native app with amplify: all mobile emulators and phones.
Amplify context React Native
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Check differently nested properties in JSON Schema
My real case scenario is to build a JSON schema for a GeoJSON objects, that has a geometry object (i.e. Point or Polygon,...
Read more >How to Parse Improperly Formatted JSON Objects in ...
Learn how you can use the Databricks Lakehouse architecture to automatically catch and reformat improperly formatted JSON objects for ...
Read more >Get Correctly Formatted Deep-Nested JSON Files At Scale ...
This is the only way to get arrays of JSON objects nested as you want. You can format nested results by using dot-separated...
Read more >JSON Schema Examples Tutorial
This JSON schema tutorial will walk through the basics of setting JSON ... To add an object inside an object in JSON format,...
Read more >Extract Nested Data From Complex JSON
Still, there's just one problem: the complexity of nested JSON objects is endless, and suddenly the job you love needs to be put...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hi @kaustavghosh06 - i wanted to mutate it and had a hope it’s supported, but you are right, at the end i do not need it, without @auth/@model it works fine, thanks !
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels for those types of questions.