Reference
C
Class

ApiPlatform\GraphQl\Resolver\Stage\SerializeStage

Serialize stage of GraphQL resolvers.

class ApiPlatform\GraphQl\Resolver\Stage\SerializeStage implements `<a href="/docs/reference/GraphQl/Resolver/Stage/SerializeStageInterface">ApiPlatform\GraphQl\Resolver\Stage\SerializeStageInterface</a>`
{
    public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer, ApiPlatform\GraphQl\Serializer\SerializerContextBuilderInterface $serializerContextBuilder, ApiPlatform\State\Pagination\Pagination $pagination)
    public __invoke(null|object|array $itemOrCollection, string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $context): array
}
class ApiPlatform\GraphQl\Resolver\Stage\SerializeStage implements `<a href="/docs/reference/GraphQl/Resolver/Stage/SerializeStageInterface">ApiPlatform\GraphQl\Resolver\Stage\SerializeStageInterface</a>`
{
    public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer, ApiPlatform\GraphQl\Serializer\SerializerContextBuilderInterface $serializerContextBuilder, ApiPlatform\State\Pagination\Pagination $pagination)
    public __invoke(null|object|array $itemOrCollection, string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $context): array
}

Methods

__construct

public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer, ApiPlatform\GraphQl\Serializer\SerializerContextBuilderInterface $serializerContextBuilder, ApiPlatform\State\Pagination\Pagination $pagination)
public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer, ApiPlatform\GraphQl\Serializer\SerializerContextBuilderInterface $serializerContextBuilder, ApiPlatform\State\Pagination\Pagination $pagination)

Parameters

normalizerSymfony\Component\Serializer\Normalizer\NormalizerInterface
serializerContextBuilderApiPlatform\GraphQl\Serializer\SerializerContextBuilderInterface
paginationApiPlatform\State\Pagination\Pagination

__invoke

public __invoke(null|object|array $itemOrCollection, string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $context): array
public __invoke(null|object|array $itemOrCollection, string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $context): array

Parameters

itemOrCollectionobject
array
resourceClassstring
operationApiPlatform\Metadata\GraphQl\Operation
contextarray

Returns

array

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop