On my Amplify App, I am use this model:
type Post
@model {
id: ID!
title: String!
level: Int!
categories: [Int!]
}
It's easy to filter post by level.
Example: Retrieve all posts that have level 3
I am using this code:
const response = await API.graphql({
query: listPosts,
variables: {
filter: {
level: {
eq: 3
}
}
}
});
My problem is with the categories parameter.
Example: How retrieve all posts that have category 2? How retrieve all posts that have category 3 and 5?
Can you help me?
Regards