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
unchained wrongly sets ProductReview.product to be non-nullable but will return null if the product is deleted (no matter if it got deleted from the db or just marked as deletd.
ProductReview.product should be nullable.
To Reproduce
create a review for a product
delete that product
fetch productReviews via graphql
Expected behavior
ProductReview.product should be nullable.
The text was updated successfully, but these errors were encountered:
by the way, modern grapqhl libraries can prevent misstakes like that. e.g. https://pothos-graphql.dev/ has a really strong type support. If you use strict mode it would complain that your productService (or collection) can return null and would not allow that this result will be used in a non-nullable resolver
the problem was that the product field did not return deleted products, this is wrong, reviews of deleted products should still return the deleted product. fixed in newest beta.
Describe the bug
see this comment #379 (comment)
unchained wrongly sets ProductReview.product to be non-nullable but will return null if the product is deleted (no matter if it got deleted from the db or just marked as deletd.
ProductReview.product should be nullable.
To Reproduce
productReviews
via graphqlExpected behavior
ProductReview.product should be nullable.
The text was updated successfully, but these errors were encountered: