WooCommerce Code Reference

AbstractType

Tags
phpstan-type

ResolveTypeReturn ObjectType|string|callable(): (ObjectType|string|null)|Deferred|null

phpstan-type

ResolveType callable(mixed $objectValue, mixed $context, ResolveInfo $resolveInfo): ResolveTypeReturn

phpstan-type

ResolveValue callable(mixed $objectValue, mixed $context, ResolveInfo $resolveInfo): mixed

Table of Contents

resolveType()  : ObjectType|string|callable|Deferred|null
Resolves the concrete ObjectType for the given value.
resolveValue()  : mixed
Receives the original resolved value and transforms it if necessary.

Methods

resolveType()

Resolves the concrete ObjectType for the given value.

public resolveType(mixed $objectValue, mixed $context, ResolveInfo $info) : ObjectType|string|callable|Deferred|null

This will be called after resolveValue.

Parameters
$objectValue : mixed

The resolved value for the object type

$context : mixed

The context that was passed to GraphQL::execute()

$info : ResolveInfo
Tags
phpstan-return

ResolveTypeReturn

Return values
ObjectType|string|callable|Deferred|null

resolveValue()

Receives the original resolved value and transforms it if necessary.

public resolveValue(mixed $objectValue, mixed $context, ResolveInfo $info) : mixed

This will be called before resolveType.

Parameters
$objectValue : mixed

The resolved value for the object type

$context : mixed

The context that was passed to GraphQL::execute()

$info : ResolveInfo
Return values
mixedThe possibly transformed value