graphql

mafcocinco 2020-09-25T01:31:35.002700Z

Will this allow a resolver to know the name of the field it is resolving? More importantly, is there a public interface for determining that right now? I have situation where the same resolver is used for 2 different fields on container object and need to be able to differentiate which field is being resolved.

hlship 2020-09-25T21:20:44.002800Z

Yes, it will. You can get the field name, alias name, argument values, field directives, field type (and directives on that and its sub-fields).

hlship 2020-09-25T21:21:41.003300Z

it’s all behind protocols, so you have perhaps a better idea of what you can do: https://github.com/walmartlabs/lacinia/pull/335/files#diff-d733257ec2fb4772d623a165b8236ae2

hlship 2020-09-25T21:21:56.003500Z

Though the trick is to know which instances implement which protocols, of course.

hlship 2020-09-25T21:23:05.003700Z

It will be easy-ish to add further protocols to get at even deeper data, if needed.

mafcocinco 2020-09-26T02:30:03.003900Z

Sweet. Any thoughts one when that will be rolled out for general use?

hlship 2020-09-25T21:20:52.003100Z

https://github.com/walmartlabs/lacinia/pull/336

1