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

Model Identifier not being implemented, cannot use ModelQueries.get() #2929

Closed
1 of 13 tasks
ryanlalchand opened this issue Apr 24, 2023 · 2 comments
Closed
1 of 13 tasks
Labels
Codegen Issues related to Amplify code generation GraphQL API Issues related to the API (GraphQL) Category pending-response Issue is pending response from the issue requestor pending-triage This issue is in the backlog of issues to triage

Comments

@ryanlalchand
Copy link

Description

amplify codegen models is not generating a modelIdentifier for any models and throws an Unimplemented Error when I try to access that attribute. This means that I cannot use ModelQueries.get() in its current form.

Using Amplify CLI version 11.0.5 and amplify_flutter 1.0.0 on Flutter 3.7.12.

Any help would be appreciated!

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Storage

Steps to Reproduce

No response

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.7.12

Amplify Flutter Version

1.0.0

Deployment Method

Amplify CLI

Schema

No response

@HuiSF
Copy link
Contributor

HuiSF commented Apr 24, 2023

Hello @ryanlalchand thank you for reporting this issue.

Your Amplify project might have been created before the launch of Custom Primary Key feature. Could you check what's the value of respectprimarykeyattributesonconnectionfield flag in <path-to-your-flutter-project>/amplify/cli.json?

If it's false, please change it to true, and then rerun amplify codegen models see if you can get ModelIdentifier implementation.

Details about this feature flag in Amplify CLI please see the documentation.

@HuiSF HuiSF added Codegen Issues related to Amplify code generation GraphQL API Issues related to the API (GraphQL) Category pending-response Issue is pending response from the issue requestor pending-triage This issue is in the backlog of issues to triage labels Apr 24, 2023
@ryanlalchand
Copy link
Author

Hi @HuiSF, thank you so much, that was exactly the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Codegen Issues related to Amplify code generation GraphQL API Issues related to the API (GraphQL) Category pending-response Issue is pending response from the issue requestor pending-triage This issue is in the backlog of issues to triage
Projects
None yet
Development

No branches or pull requests

2 participants