I am using AWS Amplify as the backend for my react app. My application uses Amplify Auth and API.
My project has a model called "Projects" that have a one-one relationship with another model called "Companies". Every Cognito User has a custom user attribute of 'CompanyID'.
When the user is logged in, I want to make an API.graphql request to list all projects related to the company that the Cognito User is assigned to. I am having a hard time figuring out how to filter the query so that it only returns the projects that are related to the specified company.
Is there a way to filter a ListProjects query by passing in the id of the related companies I am wanting to filter by?