Closed dwamianm closed 3 years ago
@jhockett any update on this issue? Please let me know if you need any additional info
Hi @dwamianm, I was able to confirm this behavior on 4.32.0. I'm going to mark this as an enhancement because I think this is intentional that setting queries or a subset of queries to null
supersedes any @key
's.
Closing this as a duplicate of aws-amplify/amplify-category-api#245. Please follow that issue for updates and a possible workaround @dwamianm.
ok thanks @jhockett
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels for those types of questions.
Describe the bug The genesis of the issue is that I want to turn off the
list[Type]
query so that we can create a custom resolver and prevent a none admin user from listing all the information in the DB.We would like
@key
queries from 'queryField
to generate but not the autogenerated queriesThe bug happens when we combine
queries:null
orqueries:{list:null}
with thequeryField
, the CLI autogenerated the@key
query but does not generate theModel[Type]FilterInput
which then throws an error thatModel[Type]FilterInput
doesn't exist.Amplify CLI Version 4.31.1
To Reproduce
amplify mock
Mock throws this error
which makes sense because the the
schema.graphql
file generates the@key
queriesBut doesn't generated the
ModelCompanyFilterInput
If you remove the
queries:null
orqueries:{list:null}
from the schema file then it will generateModelCompanyFilterInput
which negates the result I am looking for.Expected behavior
queries:{list:null}
should not autogenerate thelistCompanys
query but since we have defined@key(...queryField:..
should generate that query and all the attribute types includingModel[Type]FilterInput
Desktop (please complete the following information):