[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
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

"SomeInput" is not present when resolving type "OtherInput" #3053

Open
dhenze opened this issue Nov 27, 2024 · 0 comments
Open

"SomeInput" is not present when resolving type "OtherInput" #3053

dhenze opened this issue Nov 27, 2024 · 0 comments

Comments

@dhenze
Copy link
dhenze commented Nov 27, 2024

Environment information

System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M1
  Memory: 295.63 MB / 16.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 18.19.1 - ~/.nvm/versions/node/v18.19.1/bin/node
  Yarn: 1.22.22 - ~/.nvm/versions/node/v18.19.1/bin/yarn
  npm: 10.9.1 - ~/.nvm/versions/node/v18.19.1/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.5.0
  @aws-amplify/backend: 1.8.0
  @aws-amplify/backend-auth: 1.4.1
  @aws-amplify/backend-cli: 1.4.2
  @aws-amplify/backend-data: 1.2.1
  @aws-amplify/backend-deployer: 1.1.10
  @aws-amplify/backend-function: 1.8.0
  @aws-amplify/backend-output-schemas: 1.4.0
  @aws-amplify/backend-output-storage: 1.1.3
  @aws-amplify/backend-secret: 1.1.5
  @aws-amplify/backend-storage: 1.2.3
  @aws-amplify/cli-core: 1.2.0
  @aws-amplify/client-config: 1.5.2
  @aws-amplify/deployed-backend-client: 1.4.2
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.9
  @aws-amplify/platform-core: 1.2.2
  @aws-amplify/plugin-types: 1.5.0
  @aws-amplify/sandbox: 1.2.6
  @aws-amplify/schema-generator: 1.2.5
  aws-amplify: 6.10.0
  aws-cdk: 2.171.0
  aws-cdk-lib: 2.171.0
  typescript: 5.7.2
No AWS environment variables
No CDK environment variables

Data packages

event_survey@0.1.0 /Users/daniel/workspace/event_survey
├─┬ @aws-amplify/backend-cli@1.4.2
│ └─┬ @aws-amplify/schema-generator@1.2.5
│   └── @aws-amplify/graphql-schema-generator@0.11.2
└─┬ @aws-amplify/backend@1.8.0
  └─┬ @aws-amplify/backend-data@1.2.1
    └── @aws-amplify/data-construct@1.14.2

Description

We are building an amplify Gen2 app based on a SQL RDS data source. Recently I did an update to the schema, regenerated the schema.sql.ts file and pushed the changes to git. The deployment for that branch started and failed with these errors:

The input value type 'SurveyResponseInput' is not present when resolving type 'CreatePersonInput'
The input value type 'PersonInput' is not present when resolving type 'CreateSurveyResponseInput'

There seems to be some circular dependency that I could not resolve yet.

I have set the relationships in resource.ts as follows:

  .setRelationships((models: any) => [
    models.Person.relationships({
      survey_responses: a.hasMany("SurveyResponse", "person_id"),
    }),
    models.SurveyResponse.relationships({
      person: a.belongsTo("Person", "person_id")
    })
  ])

I have setup the amplify app from scratch and without the above code snippet could deploy successfully.

The schema.sql.ts generated from the DB:

.schema({
    "person": a.model({
        id: a.integer().default(),
        account: a.string(),
        name: a.string(),
        email: a.string().required(),
        created_at: a.datetime(),
        sylius_customer_id: a.integer()
    }).identifier([
        "id"
    ]),
    "surveyresponse": a.model({
        id: a.integer().default(),
        account: a.string().required(),
        person_id: a.integer(),
        survey_type: a.string(),
        score: a.integer().required(),
        comment: a.string(),
        permalink: a.string(),
        created_at: a.datetime(),
        updated_at: a.datetime(),
        artnight_id: a.integer(),
        artnight: a.string().required(),
        artist: a.string().required(),
        pimcore_order_id: a.integer(),
        nkeeper_event_id: a.integer(),
        nkeeper_host_id: a.integer(),
        nkeeper_theme_id: a.integer(),
        nkeeper_venue_id: a.integer(),
        host_score: a.integer(),
        venue_score: a.integer(),
        theme_score: a.integer(),
        host_comment: a.string(),
        venue_comment: a.string(),
        theme_comment: a.string(),
        publish: a.boolean(),
        sylius_order_id: a.integer()
    }).identifier([
        "id"
    ])
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants