This is the tolerant wrapper around unwrapSingleRootField used by
the request pipeline. Documents with exactly one root field resolve to the
bare field value; documents with multiple root fields (or none) are returned
as the full envelope unchanged. All shipped operations are single-root-field,
so consumers of typed operations always receive the bare value; only custom
multi-field documents surface the envelope shape.
An envelope carrying a non-empty errors array (an HTTP 200 GraphQL
failure) throws an AniLinkGraphQLError instead of returning data.
Unwraps a GraphQL response envelope.
This is the tolerant wrapper around unwrapSingleRootField used by the request pipeline. Documents with exactly one root field resolve to the bare field value; documents with multiple root fields (or none) are returned as the full envelope unchanged. All shipped operations are single-root-field, so consumers of typed operations always receive the bare value; only custom multi-field documents surface the envelope shape.
An envelope carrying a non-empty
errorsarray (an HTTP 200 GraphQL failure) throws anAniLinkGraphQLErrorinstead of returning data.