I'm running into a problem with a query that seems like it should work. The funny thing is that it does work in the CraftQL query editor in the CP. But when I run the same query from my app, I get an error.
Running this query on the backend successfully returns 3 entries:
query entries($limit: Int, $search: String, $relatedTo: [RelatedToInputType]) {
entriesConnection(section: [resources], limit: $limit, search: $search, relatedTo: $relatedTo) {
pageInfo {
currentPage
totalPages
}
entries {
... on ResourcesReport {
title
uri
type {
id
handle
name
}
}
... on ResourcesCourse {
title
uri
type {
id
handle
name
}
}
... on ResourcesPolicy {
title
uri
type {
id
handle
name
}
}
... on ResourcesToolkit {
title
uri
type {
id
handle
name
}
}
}
}
}
I'm running into a problem with a query that seems like it should work. The funny thing is that it does work in the CraftQL query editor in the CP. But when I run the same query from my app, I get an error.
Section: resources Entry types: report, course, policy, toolkit
Running this query on the backend successfully returns 3 entries:
Here's the data that's returned:
But when queried from the front end, I get this:
Any thoughts?