question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrectly generated schema.json for netsted objects

See original GitHub issue

Describe 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:

  1. 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
michalgarcarzcommented, Oct 28, 2019

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 !

0reactions
github-actions[bot]commented, May 26, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found