addTypename
When to add __typename. One of "always", "ifAbstract", "ifPolymorphic" or "ifFragments"
"always": Add '__typename' for every composite field
"ifAbstract": Add '__typename' for abstract fields, i.e. fields that are of union or interface type
"ifPolymorphic": Add '__typename' for polymorphic fields, i.e. fields that contains a subfragment (inline or named) whose type condition isn't a super type of the field type. If a field is monomorphic, no '__typename' will be added. This adds the bare minimum amount of __typename but the logic is substantially more complex than
ifAbstract."ifFragments" (default): Add '__typename' for every selection set that directly contains an inline or named fragment.
The default, "ifFragments", is kept for backwards compatibility. It automatically adds __typename to selection sets that directly contain an inline or named fragment, rather than to every composite field. This can cause cache misses when a cache entry written without __typename is later read by a query that requires it (see #3965).
If you use the normalized cache, set "always" so that __typename is added on every composite field selection set and cache keys can always read it. If you do not use the cache, "ifAbstract" or "ifPolymorphic" reduce the number of __typename and the response size.
Default value: "ifFragments"