Fork me on GitHub

There are two broad approaches to providing such dependencies in Lacinia. The first is to stuff things in the context, with the knowledge that the context will be passed around to all the resolver functions that need it. The second is to define resolvers as instances of the FieldResolver protocol, and use com.stuartsierra/component to wire everything up. You can mix and match within the same schema if you like. I prefer to keep anything non-trivial as a component, but that's because I like pretty pictures ( 😎


I'm enjoying the fact that lacinia-pedestal narrows the surface of pedestal. The power is already there waiting for me when I need (and learn), meanwhile lacinia-pedestal knows better than me.

👍 4