Closed meandersen closed 1 month ago
I've just copied the query you provided into my site and changed the collection and it works as expected 🤔
Are you able to provide the full output of php please support:details
?
Hi @duncanmcclean The full support details
Environment
Application Name: Test Site
Laravel Version: 9.52.16
PHP Version: 8.1.26
Composer Version: 2.7.6
Environment: local
Debug Mode: ENABLED
URL: testsite.test
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: pgsql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Sentry
Enabled: YES
Environment: local
Laravel SDK Version: 3.8.2
PHP SDK Version: 3.22.1
Release: NOT SET
Sample Rate Errors: 100%
Sample Rate Performance Monitoring: 100%
Sample Rate Profiling: NOT SET
Send Default PII: DISABLED
Statamic
Addons: 3
Antlers: runtime
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.48.0 PRO
Statamic Addons
rias/statamic-redirect: 3.7.1
statamic-rad-pack/meilisearch: 3.2.1
statamic/eloquent-driver: 3.1.2
Statamic Eloquent Driver
Asset Containers: file
Assets: eloquent
Blueprints: eloquent
Collection Trees: file
Collections: eloquent
Entries: eloquent
Forms: eloquent
Global Sets: eloquent
Global Variables: file
Navigation Trees: file
Navigations: eloquent
Revisions: eloquent
Taxonomies: eloquent
Terms: eloquent
Ah, I was using the Stache and it was working fine. When I switch to the Eloquent Driver, I see the issue.
I'm going to transfer this issue to the eloquent-driver
repository since it's not a core issue.
I've just taken a look into this, using the latest version of Statamic and the Eloquent Driver.
In my testing, it actually seems like its the status
filter causing issues, not the blueprint
filter. When I comment out the blueprint
filter in my query, I still get no results returned.
I believe this may be happening due to the fact you're querying the status using the in
condition, rather than the equals
condition, which we'd recommend for querying statuses.
Obviously, by using the equals
condition, it does mean you can only query a single status at a time. From your example, it doesn't look like you need to query multiple statuses at once, but if you do, you'd have to split each status into it's own GraphQL query and use equals
.
Bug description
After we have updated from Statamic 3.4 to 4.0, we got an issue with graphql. When we call entries and uses blueprint as a filter, we are ending up with an empty array of entries. Status, collection and parent works fine when we use them in filters.
How to reproduce
graphql.php
Query
Result with blueprint
Result without blueprint
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response