Fork me on GitHub
#graphql
<
2017-10-02
>
amar14:10:20

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?

amar15:10:01

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!

amar15:10:07

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

hlship16:10:14

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.

amar18:10:21

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