Resolver composition only works when a function already exists #6315
Unanswered
theguacamoleking
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there!
I was following your guide on Authentication and use of resolver composition to solve this. I encountered an issue whereby the method for authenticating only works for guarding fields that have a resolver.
For example, consider this schema
If there isn't a resolver for
Repo.viewsThisWeek
, any attempt to compose an authentication resolver will fail. Here's what I'm seeing at runtimeMy expectation was that this would be logged to the console
In the case of authentication, using an
@auth
decorator would only work if an exhaustive resolver implementation is provided as the first argument tocomposeResolver
with defaults for every field.Beta Was this translation helpful? Give feedback.
All reactions