graphql

jose 2024-05-27T18:45:37.958829Z

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

namenu 2024-05-28T02:03:15.555289Z

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

jose 2024-05-28T09:06:17.888729Z

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.

namenu 2024-05-28T09:26:36.963959Z

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.

jose 2024-05-28T18:48:02.417759Z

@namenu fair enough, thanks