I am using amplify-cli with angular. I have generated GraphQL API based on schema. I need to write custom queries and generate frontend code using amplify codegen.
Now, I know that I can write custom queries in files src/graphql/**/*.graphql to get only selected fields but the underlying function being called must already be present in schema.json - for example in below snippet
query QueryCustom($id:ID!){
getRelationship(id: $id){ <=== this must be present in schema.json
id
sourceId
targetId
}
}
This restricts me to be able to write custom functions for queries (1)to apply filters based on different fields (forexample in above scenario, based on sourceId or targetId) (2) span my query to multiple dynamoDB tables etc.
Thanks for some indications on how to achieve (1) and (2) above