Fork me on GitHub
#graphql
<
2024-05-27
>
jose18:05:37

how can I inject a resolver to an interface field? Doing (inject-resolvers {:MyInterface/my-field f}) returns a inject error: not found error

namenu02:05:15

Shouldn't the resolver be injected into concrete types? Why does the interface need a resolver?

jose09:05:17

In this particular case, all the concrete types share that field. I'm injecting the resolver to all of the concrete types, but I'd prefer a less verbose solution.

namenu09:05:36

It seems more reasonable to me to prevent the resolver from being attached to the interface. But yes, it’s edn. You can extend it to have :base-objects and automate the injection.

jose18:05:02

@U7JHWBCS0 fair enough, thanks