You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am building with Netflix's DGS framework and am designing my schema's fields to be nullable by default for resiliency. If a call to resolve a field fails, the field can gracefully return null instead of propagating up the entire graph to the nearest nullable field.
This works well in error cases, but I still want a way to tell client's that the field should be semantically non-null. In other words, if there are no errors, the field should be non-null.
It seems there's been a lot of discussions about this across the GraphQL ecosystem recently. I came across this talk which outlines a new @semanticNonNull directive which tells clients this field is non-null, unless there are errors.
Has there been consideration for adding support for this directive? This would certainly help our project a lot.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am building with Netflix's DGS framework and am designing my schema's fields to be nullable by default for resiliency. If a call to resolve a field fails, the field can gracefully return
nullinstead of propagating up the entire graph to the nearest nullable field.This works well in error cases, but I still want a way to tell client's that the field should be semantically non-null. In other words, if there are no errors, the field should be non-null.
It seems there's been a lot of discussions about this across the GraphQL ecosystem recently. I came across this talk which outlines a new
@semanticNonNulldirective which tells clients this field is non-null, unless there are errors.Has there been consideration for adding support for this directive? This would certainly help our project a lot.
Resources
Beta Was this translation helpful? Give feedback.
All reactions