Open sisygoboom opened 1 month ago
Marking it as a bug. Codegen expects at least one model in the schema to add the getModelTypeByModelName
block.
Workaround: Add a dummy model to the schema.
Dummy: a.model({
description: a.string()
})
.authorization(allow => [allow.publicApiKey()])
Environment information
Description
Using
npx ampx generate graphql-client-code --format modelgen --model-target dart --out ./lib/models
as recommended in the documentation, generates code with a type error:Generated code
Related user generated code