wpengine / atlas-content-modeler

Content modeling plugin for WordPress
https://developers.wpengine.com/docs/atlas-content-modeler
GNU General Public License v2.0
165 stars 13 forks source link

fix: return empty nodes/edges values when no connections exist. #648

Closed mindctrl closed 1 year ago

mindctrl commented 1 year ago

Closes #643

Description

Fixes an issue where WPGraphQL would raise an "internal server error" with the text "Cannot return null for non-nullable field" when an optional relationship on a post entry has no connections to another post object.

This was introduced in changes in WPGraphQL 1.13.x.

See #643 for reproduction steps.

https://wpengine.atlassian.net/browse/MTKA-1977

Checklist

I have:

Testing

Screenshots

Documentation Changes

Dependent PRs