In a lacinia resolver function is there a way to get the resolver name from the schema? I’d like to use this for logging and transaction reification. I already have a wrapper function around datomic.api/transact
to extract some information from the context/request and like to add the resolver issuing the transaction by passing lacinia’s context to the wrapper.
@hlship that’s reasonable and an API would be much appreciated. Thanks!
Good chance to provide a patch! Tests expected, of course.
Is it okay to use
(get-in context [:com.walmartlabs.lacinia/selection :field-definition :qualified-name])
or is this some kind of internal/private API?I’m fairly certain that there’s a public API for that…
That's not documented, but it is fairly stable. It would be easy to add an API to do that extraction for you.
Basically, I don't want to document what Lacinia puts into the context, because future requirements (including performance improvements) may change that structure at some point.