Model

ErrorTypeResolver

Magento\GraphQl\Model\Mutation\Resolver\ErrorTypeResolver

What it does

This class resolves the specific GraphQL error type for mutation operations by checking if the provided error type is valid and registered.

Developers use this when implementing custom GraphQL mutations that need to return structured error responses, ensuring only recognized error types are returned or defaulting to 'InternalError' for unrecognized types.

Public Methods

  • resolveType()