Fork me on GitHub
#graphql
<
2017-08-03
>
peeja21:08:15

Hey, all. I'm trying to understand how to recursively call a resolver from another resolver. Anyone have a pointer? I don't see any examples or even really documentation for it.

peeja21:08:17

That is, I have a resolver for type A, and type A crops up in a bunch of places in the schema. I'd like to call the same resolver from each of them.

hlship21:08:55

Well, you could but a :a keyword into the resolvers map, and sprinkle :resolve :a wherever you need it.

peeja21:08:21

That's what I'm missing

peeja21:08:51

I'm trying to call the resolver from the parent resolver, but Lacinia wants me to just put it on the schema and already have called it

hlship21:08:16

Sounds like you're on the right track.