ErrorResultUnion
Used to construct a TypeScript return type for a query or mutation which, in the GraphQL schema, returns a union type composed of a success result (e.g. Order) plus one or more ErrorResult types.
Since the TypeScript entities do not correspond 1-to-1 with their GraphQL type counterparts, we use this type to substitute them.
Example
Was this chapter helpful?