The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
{
"substrand_id": 1,
"substrand_name": "Nature and development of science",
"strand_id": 1
}
The expected data is returned. It seems to not matter if I pass a selectionSet, or filter or any other option to list(), it always returns an empty array (and no errors). It returns the below :
{
"data": [],
"nextToken": null
}
This is happening for all models defined in the generated schema.sql.ts
Environment information
Describe the bug
Wheh I run something like :
const { data: substrands } = await client.models.substrands.list()
an empty array is returned instead of the list of items. The connection to the DB seems to be fine, and when I run for example :
await client.models.substrands.get({substrand_id : 1})
which returns the following :
The expected data is returned. It seems to not matter if I pass a selectionSet, or filter or any other option to list(), it always returns an empty array (and no errors). It returns the below :
This is happening for all models defined in the generated schema.sql.ts
Reproduction steps
excerpt from schema.sql.ts generated by runninng
npx ampx generate schema-from-database --connection-uri-secret SQL_CONNECTION_STRING --out amplify/data/schema.sql.ts
running :