Query with array in graphql

Query with array in graphql


0

I want to return all items that are not in my arrays. Some think like below but in graphql-aws world:

query(
collection(db, "users"),
where("id", "not-in", [...likedUserIds, ...dislikedUserIds])
)

I tried:

const { data } = await API.graphql(
graphqlOperation(getUsers, {
filter: { id: { ne: [...likedUserIds, ...dislikedUserIds]} },
})
);

But this says "Variable ‘ne’ has an invalid value.", How can I implement my query?


Load 5 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *