thefrontside / playhouse

Frontside's Backstage Portal
https://backstage.frontside.services/
25 stars 13 forks source link

Resolve node to null if entity doesn't exist #371

Closed wKich closed 11 months ago

wKich commented 11 months ago

Motivation

Currently, the resolver generated by relation directive mapper doesn't check existence of entities and just returns node ids of them. This cause an error when GraphQL tries to resolve non-null field, but fails, because there is no entity returned for that id.

Approach

Added simple check to existence of entities. Because in most cases user queries additional fields of node we load an entity anyway, so it should have negative effect on performance.

changeset-bot[bot] commented 11 months ago

🦋 Changeset detected

Latest commit: d329856fc1f9313571f6019c6d060c56544eeafe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------------------------------------------- | ----- | | @frontside/backstage-plugin-graphql-backend-module-catalog | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

frontsidejack commented 11 months ago

📣 NOTIFICATION You are receiving this message because we did not publish any packages.

Generated by @thefrontside/actions Frontside