Q: I want to use the data inside ::lacinia/selection in my resolvers. Is this considered a stable public api/data?
It is not. Use it are your peril. However, there's the selections API that exposes the most useful information in there.
I’m glad I asked 🙂. What I’m trying to see is the field “type” for non-leaf resolvers. I can infer if from the keyword namespaces in the data from the selections api but that seems a bit indirect. Is there a better way?
The conflict here is that we really don't want to lock down the structure of the many internal keys in the context, as that handcuffs against any future changes and improvements.
But at the same time, there's often a need for data we don't expose.
So we've been gradually extending the preview API, which is something we can test and maintain, even in the face of a reorganization of the data in the context.
At this point, we can add more data to the maps returned by https://walmartlabs.github.io/apidocs/lacinia/com.walmartlabs.lacinia.executor.html#var-selections-seq2 without breaking any clients, so that's who I'd prefer to go.
Returning more field type data, as well as field and argument directives, would address a lot of needs, AFAIK.
yes, that would pretty much be what I need. that said, I can use config/factories for now to achieve the same result. since I generate my schemas, this is not a big deal.
touch base if you decide to add more data. I can chime in with that would help me
thanks for the feedback