Automattic\WooCommerce\Vendor\GraphQL\Type\Definition

AbstractType{}interfaceWC 1.0

No Hooks.

Usage

$AbstractType = new AbstractType();
// use class methods

Methods

  1. public resolveType($objectValue, $context, ResolveInfo $info)
  2. public resolveValue($objectValue, $context, ResolveInfo $info)

AbstractType{} code WC 10.9.1

interface AbstractType
{
    /**
     * Receives the original resolved value and transforms it if necessary.
     *
     * This will be called before `resolveType`.
     *
     * @param mixed $objectValue The resolved value for the object type
     * @param mixed $context The context that was passed to GraphQL::execute()
     *
     * @return mixed The possibly transformed value
     */
    public function resolveValue($objectValue, $context, ResolveInfo $info);

    /**
     * Resolves the concrete ObjectType for the given value.
     *
     * This will be called after `resolveValue`.
     *
     * @param mixed $objectValue The resolved value for the object type
     * @param mixed $context The context that was passed to GraphQL::execute()
     *
     * @return ObjectType|string|callable|Deferred|null
     *
     * @phpstan-return ResolveTypeReturn
     */
    public function resolveType($objectValue, $context, ResolveInfo $info);
}