-
-
Notifications
You must be signed in to change notification settings - Fork 581
Open
Labels
Description
Bug description
Our user deleted an asset that was used in a required field on a page. When fetching that entry via the GraphQL API, we got an error:
production.ERROR: Cannot return null for non-nullable field "Entry_Pages_ContentPage.cover_image". {"exception":"[object] (GraphQL\\Error\\InvariantViolation(code: 0): Cannot return null for non-nullable field \"Entry_Pages_ContentPage.cover_image\".
This happens as the entry now contains null, while its GraphQL type is marked as non-nullable.
How to reproduce
- Create a blueprint with a required asset field.
- Create an entry with an asset.
- Delete the asset via the asset browser.
- Fetch the entry via GraphQL.
Logs
Environment
Environment
Application Name: <redacted>
Laravel Version: 11.45.1
PHP Version: 8.3.23
Composer Version: 2.8.9
Environment: local
Debug Mode: ENABLED
URL: <redacted>
Maintenance Mode: OFF
Timezone: UTC
Locale: de
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: redis
Database: sqlite
Logs: stack / daily
Mail: smtp
Queue: redis
Session: redis
Sentry
Enabled: MISSING DSN
Environment: local
Laravel SDK Version: 4.15.1
PHP SDK Version: 4.14.1
Release: 9ea1348
Sample Rate Errors: 100%
Sample Rate Performance Monitoring: 1%
Sample Rate Profiling: 1%
Send Default PII: ENABLED
Statamic
Addons: 4
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.58.1 PRO
Statamic Addons
cnj/seotamic: 5.0.2
Installation
Fresh statamic/statamic site via CLI
Additional details
No response