Open sisygoboom opened 2 months ago
Hey, thanks for raising this! I'm going to transfer this over to our codegen repository for better assistance.
I wasn't able to reproduce this error. Your codegen packages may be out of date. Can you run the following and share the results?
npm list @aws-amplify/graphql-generator @aws-amplify/appsync-modelgen-plugin
npm update
should bring you to the latest available version.
Environment information
Describe the bug
when generating client code for dart, using this command:
npx ampx generate graphql-client-code --format modelgen --model-target dart --out ./lib/models
The generated code consistently has this error:
My theory is its because I haven't declared any models in my data resource as I've used mongo and single table design. This is not the standard way and doesn't follow the documentation but is perfectly valid.
ModelProvider.dart:
Reproduction steps
For more context, here is my
data/resource.ts
: