And/Or Operators #2186
Unanswered
jadamconnor
asked this question in
General
Replies: 2 comments 1 reply
-
Nothing? Could it be that no one here knows the answer to this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can query for the categories and then connect posts (OR operator): query PostsByCategories {
categories(
where: {
name: ["category1", "category2"]
}
) {
nodes {
id
name
posts {
nodes {
id
title
}
}
}
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to use them? Specifically with where... Something like:
If not, can anyone think of a workaround that achieves the same thing?
I'm thinking I could do this:
And then some operation on the returned data that filters out posts with falsy categories objects?
I can see a potential downside being we're fetching data we don't need.
Beta Was this translation helpful? Give feedback.
All reactions