Fork me on GitHub

I know there’s not much context here other than I’m using a union. Could someone help me understand what "Field resolver returned an instance not tagged with a schema type." means?


Thanks @sashton. I do have that except it is an explicit fragment (using venia). I might have to create a separate repo for context otherwise it will be difficult to diagnose. Do appreciate your response!


That test did help point out schema/tag-with-type. Looks like I need to call that function on the map.


Right; when a field resolves to a union or interface type, it is up to the resolver function to tag the result with its actual type. Lacinia doesn't have a way to do that on its own, and it needs the type information. In most cases, where a field resolves to a concrete object type, Lacinia does the tagging automatically.


@hlship and @sashton Thanks for your help. I wasn’t calling schema/tag-with-type. It works now.