This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
Should be possible to return {data: null}
from resolvers without getting an error
#558
Milestone
What feature are you missing?
In a
resolver
function, it should be possible to return{data: null}
without having to also provide anerror
.How could this feature look like in detail? Tradeoffs?
Considering the equivalent for the standard
user
query that returns the logged in user or null. If you want to build that for a custom auth type using a resolver, you would set up the schema extension e.g. like this:authenticatedEmailUser
is optional, so it should be allowed to just return null:However, with this implementation the server also returns an error for non-logged-in users:
The text was updated successfully, but these errors were encountered: