Hello, I am trying to filter my Thing
by Widget
.
When I run the following search, I get no results
query Query($id: ID!) {
allPrismicThing(filter: {data: {widgets: {elemMatch: {widget: {id: {eq: $id}}}}}}) {
edges {
node {
id
}
}
}
}
But if I do this, it works:
query Query($uid: String!) {
allPrismicThing(filter: {data: {widgets: {elemMatch: {widget: {uid: {eq: $uid}}}}}}) {
edges {
node {
id
}
}
}
}
I'm running this to get the id
and uid
, so I know the values are correct.
query Query {
allPrismicWidget {
nodes {
id
uid
}
}
}
I also notice, I need to set the type for id
to ID
or it yells, although it's a String when I do this:
query Query ($id: String) {
allPrismicWidget(filter: {id: {eq: $id}}) {
nodes {
id
uid
}
}
Any help would be appreciated