Reference
C
Class

ApiPlatform\GraphQl\Subscription\SubscriptionManager

Manages all the queried subscriptions by creating their ID and saving to a cache the information needed to publish updated data.

class ApiPlatform\GraphQl\Subscription\SubscriptionManager implements `<a href="/docs/reference/GraphQl/Subscription/SubscriptionManagerInterface">ApiPlatform\GraphQl\Subscription\SubscriptionManagerInterface</a>`
{
    public __construct(Psr\Cache\CacheItemPoolInterface $subscriptionsCache, ApiPlatform\GraphQl\Subscription\SubscriptionIdentifierGeneratorInterface $subscriptionIdentifierGenerator, ApiPlatform\GraphQl\Resolver\Stage\SerializeStageInterface $serializeStage, ApiPlatform\Api\IriConverterInterface $iriConverter, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory)
    public retrieveSubscriptionId(array $context, null|array $result): string
    public getPushPayloads(object $object): array
}
class ApiPlatform\GraphQl\Subscription\SubscriptionManager implements `<a href="/docs/reference/GraphQl/Subscription/SubscriptionManagerInterface">ApiPlatform\GraphQl\Subscription\SubscriptionManagerInterface</a>`
{
    public __construct(Psr\Cache\CacheItemPoolInterface $subscriptionsCache, ApiPlatform\GraphQl\Subscription\SubscriptionIdentifierGeneratorInterface $subscriptionIdentifierGenerator, ApiPlatform\GraphQl\Resolver\Stage\SerializeStageInterface $serializeStage, ApiPlatform\Api\IriConverterInterface $iriConverter, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory)
    public retrieveSubscriptionId(array $context, null|array $result): string
    public getPushPayloads(object $object): array
}

Methods

__construct

public __construct(Psr\Cache\CacheItemPoolInterface $subscriptionsCache, ApiPlatform\GraphQl\Subscription\SubscriptionIdentifierGeneratorInterface $subscriptionIdentifierGenerator, ApiPlatform\GraphQl\Resolver\Stage\SerializeStageInterface $serializeStage, ApiPlatform\Api\IriConverterInterface $iriConverter, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory)
public __construct(Psr\Cache\CacheItemPoolInterface $subscriptionsCache, ApiPlatform\GraphQl\Subscription\SubscriptionIdentifierGeneratorInterface $subscriptionIdentifierGenerator, ApiPlatform\GraphQl\Resolver\Stage\SerializeStageInterface $serializeStage, ApiPlatform\Api\IriConverterInterface $iriConverter, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory)

Parameters

subscriptionsCachePsr\Cache\CacheItemPoolInterface
subscriptionIdentifierGeneratorApiPlatform\GraphQl\Subscription\SubscriptionIdentifierGeneratorInterface
serializeStageApiPlatform\GraphQl\Resolver\Stage\SerializeStageInterface
iriConverterApiPlatform\Api\IriConverterInterface
resourceMetadataCollectionFactoryApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface

retrieveSubscriptionId

public retrieveSubscriptionId(array $context, null|array $result): string
public retrieveSubscriptionId(array $context, null|array $result): string

Parameters

contextarray
resultarray

Returns

string

getPushPayloads

public getPushPayloads(object $object): array
public getPushPayloads(object $object): array

Parameters

objectobject

Returns

array

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop