Reference
C
Class

ApiPlatform\Metadata\GraphQl\Operation

class ApiPlatform\Metadata\GraphQl\Operation extends ApiPlatform\Metadata\Operation
{
    public __construct(null|string $resolver, null|array $args, null|array $extraArgs, null|array<int, ApiPlatform\Metadata\Link> $links, null|string $shortName, null|string $class, null|bool $paginationEnabled, null|string $paginationType, null|int $paginationItemsPerPage, null|int $paginationMaximumItemsPerPage, null|bool $paginationPartial, null|bool $paginationClientEnabled, null|bool $paginationClientItemsPerPage, null|bool $paginationClientPartial, null|bool $paginationFetchJoinCollection, null|bool $paginationUseOutputWalkers, null|array $order, null|string $description, null|array $normalizationContext, null|array $denormalizationContext, null|bool $collectDenormalizationErrors, null|string $security, null|string $securityMessage, null|string $securityPostDenormalize, null|string $securityPostDenormalizeMessage, null|string $securityPostValidation, null|string $securityPostValidationMessage, null|string $deprecationReason, null|array $filters, null|array $validationContext, array|string|false $input, array|string|false $output, string|array|bool $mercure, string|bool $messenger, null|bool $elasticsearch, null|int $urlGenerationStrategy, null|bool $read, null|bool $deserialize, null|bool $validate, null|bool $write, null|bool $serialize, null|bool $fetchPartial, null|bool $forceEager, null|int $priority, null|string $name, string|callable $provider, string|callable $processor, null|ApiPlatform\State\OptionsInterface $stateOptions, array $extraProperties)
    public getResolver(): string
    public withResolver(null|string $resolver): ApiPlatform\Metadata\GraphQl\Operation
    public getArgs(): array
    public withArgs(null|array $args): ApiPlatform\Metadata\GraphQl\Operation
    public getExtraArgs(): array
    public withExtraArgs(null|array $extraArgs): ApiPlatform\Metadata\GraphQl\Operation
    public getLinks(): array<int, ApiPlatform\Metadata\Link>
    public withLinks(array<int, ApiPlatform\Metadata\Link> $links): ApiPlatform\Metadata\GraphQl\Operation
    public withOperation($operation)
    public canRead(): bool
    public withRead(bool $read): ApiPlatform\Metadata\Operation
    public canDeserialize(): bool
    public withDeserialize(bool $deserialize): ApiPlatform\Metadata\Operation
    public canValidate(): bool
    public withValidate(bool $validate): ApiPlatform\Metadata\Operation
    public canWrite(): bool
    public withWrite(bool $write): ApiPlatform\Metadata\Operation
    public canSerialize(): bool
    public withSerialize(bool $serialize): ApiPlatform\Metadata\Operation
    public getPriority(): int
    public withPriority(int $priority): ApiPlatform\Metadata\Operation
    public getName(): string
    public withName(string $name): ApiPlatform\Metadata\Operation
    public getShortName(): string
    public withShortName(string $shortName): static
    public getClass(): string
    public withClass(string $class): static
    public getDescription(): string
    public withDescription(null|string $description): static
    public getUrlGenerationStrategy(): int
    public withUrlGenerationStrategy(int $urlGenerationStrategy): static
    public getDeprecationReason(): string
    public withDeprecationReason($deprecationReason): static
    public getNormalizationContext(): array
    public withNormalizationContext(array $normalizationContext): static
    public getDenormalizationContext(): array
    public withDenormalizationContext(array $denormalizationContext): static
    public getCollectDenormalizationErrors(): bool
    public withCollectDenormalizationErrors(null|bool $collectDenormalizationErrors): static
    public getValidationContext(): array
    public withValidationContext(array $validationContext): static
    public getFilters(): array<int, string>
    public withFilters(array $filters): static
    public getElasticsearch(): bool
    public withElasticsearch(bool $elasticsearch): static
    public getMercure(): array|bool
    public withMercure($mercure): static
    public getMessenger()
    public withMessenger($messenger): static
    public getInput()
    public withInput($input): static
    public getOutput()
    public withOutput($output): static
    public getOrder(): array
    public withOrder(array $order): static
    public getFetchPartial(): bool
    public withFetchPartial(bool $fetchPartial): static
    public getForceEager(): bool
    public withForceEager(bool $forceEager): static
    public getPaginationEnabled(): bool
    public withPaginationEnabled(bool $paginationEnabled): static
    public getPaginationType(): string
    public withPaginationType(string $paginationType): static
    public getPaginationItemsPerPage(): int
    public withPaginationItemsPerPage(int $paginationItemsPerPage): static
    public getPaginationMaximumItemsPerPage(): int
    public withPaginationMaximumItemsPerPage(int $paginationMaximumItemsPerPage): static
    public getPaginationPartial(): bool
    public withPaginationPartial(bool $paginationPartial): static
    public getPaginationClientEnabled(): bool
    public withPaginationClientEnabled(bool $paginationClientEnabled): static
    public getPaginationClientItemsPerPage(): bool
    public withPaginationClientItemsPerPage(bool $paginationClientItemsPerPage): static
    public getPaginationClientPartial(): bool
    public withPaginationClientPartial(bool $paginationClientPartial): static
    public getPaginationFetchJoinCollection(): bool
    public withPaginationFetchJoinCollection(bool $paginationFetchJoinCollection): static
    public getPaginationUseOutputWalkers(): bool
    public withPaginationUseOutputWalkers(bool $paginationUseOutputWalkers): static
    public getSecurity(): string
    public withSecurity($security): static
    public getSecurityMessage(): string
    public withSecurityMessage(string $securityMessage): static
    public getSecurityPostDenormalize(): string
    public withSecurityPostDenormalize($securityPostDenormalize): static
    public getSecurityPostDenormalizeMessage(): string
    public withSecurityPostDenormalizeMessage(string $securityPostDenormalizeMessage): static
    public getSecurityPostValidation(): string
    public withSecurityPostValidation(null|string $securityPostValidation): static
    public getSecurityPostValidationMessage(): string
    public withSecurityPostValidationMessage(null|string $securityPostValidationMessage): static
    public getProcessor(): callable|string
    public withProcessor(null|callable|string $processor): static
    public getProvider(): callable|string
    public withProvider(null|callable|string $provider): static
    public getStateOptions(): ApiPlatform\State\OptionsInterface
    public withStateOptions(null|ApiPlatform\State\OptionsInterface $stateOptions): static
    public getExtraProperties(): array
    public withExtraProperties(array $extraProperties): static
    protected copyFrom(ApiPlatform\Metadata\Metadata $resource): static
}
class ApiPlatform\Metadata\GraphQl\Operation extends ApiPlatform\Metadata\Operation
{
    public __construct(null|string $resolver, null|array $args, null|array $extraArgs, null|array<int, ApiPlatform\Metadata\Link> $links, null|string $shortName, null|string $class, null|bool $paginationEnabled, null|string $paginationType, null|int $paginationItemsPerPage, null|int $paginationMaximumItemsPerPage, null|bool $paginationPartial, null|bool $paginationClientEnabled, null|bool $paginationClientItemsPerPage, null|bool $paginationClientPartial, null|bool $paginationFetchJoinCollection, null|bool $paginationUseOutputWalkers, null|array $order, null|string $description, null|array $normalizationContext, null|array $denormalizationContext, null|bool $collectDenormalizationErrors, null|string $security, null|string $securityMessage, null|string $securityPostDenormalize, null|string $securityPostDenormalizeMessage, null|string $securityPostValidation, null|string $securityPostValidationMessage, null|string $deprecationReason, null|array $filters, null|array $validationContext, array|string|false $input, array|string|false $output, string|array|bool $mercure, string|bool $messenger, null|bool $elasticsearch, null|int $urlGenerationStrategy, null|bool $read, null|bool $deserialize, null|bool $validate, null|bool $write, null|bool $serialize, null|bool $fetchPartial, null|bool $forceEager, null|int $priority, null|string $name, string|callable $provider, string|callable $processor, null|ApiPlatform\State\OptionsInterface $stateOptions, array $extraProperties)
    public getResolver(): string
    public withResolver(null|string $resolver): ApiPlatform\Metadata\GraphQl\Operation
    public getArgs(): array
    public withArgs(null|array $args): ApiPlatform\Metadata\GraphQl\Operation
    public getExtraArgs(): array
    public withExtraArgs(null|array $extraArgs): ApiPlatform\Metadata\GraphQl\Operation
    public getLinks(): array<int, ApiPlatform\Metadata\Link>
    public withLinks(array<int, ApiPlatform\Metadata\Link> $links): ApiPlatform\Metadata\GraphQl\Operation
    public withOperation($operation)
    public canRead(): bool
    public withRead(bool $read): ApiPlatform\Metadata\Operation
    public canDeserialize(): bool
    public withDeserialize(bool $deserialize): ApiPlatform\Metadata\Operation
    public canValidate(): bool
    public withValidate(bool $validate): ApiPlatform\Metadata\Operation
    public canWrite(): bool
    public withWrite(bool $write): ApiPlatform\Metadata\Operation
    public canSerialize(): bool
    public withSerialize(bool $serialize): ApiPlatform\Metadata\Operation
    public getPriority(): int
    public withPriority(int $priority): ApiPlatform\Metadata\Operation
    public getName(): string
    public withName(string $name): ApiPlatform\Metadata\Operation
    public getShortName(): string
    public withShortName(string $shortName): static
    public getClass(): string
    public withClass(string $class): static
    public getDescription(): string
    public withDescription(null|string $description): static
    public getUrlGenerationStrategy(): int
    public withUrlGenerationStrategy(int $urlGenerationStrategy): static
    public getDeprecationReason(): string
    public withDeprecationReason($deprecationReason): static
    public getNormalizationContext(): array
    public withNormalizationContext(array $normalizationContext): static
    public getDenormalizationContext(): array
    public withDenormalizationContext(array $denormalizationContext): static
    public getCollectDenormalizationErrors(): bool
    public withCollectDenormalizationErrors(null|bool $collectDenormalizationErrors): static
    public getValidationContext(): array
    public withValidationContext(array $validationContext): static
    public getFilters(): array<int, string>
    public withFilters(array $filters): static
    public getElasticsearch(): bool
    public withElasticsearch(bool $elasticsearch): static
    public getMercure(): array|bool
    public withMercure($mercure): static
    public getMessenger()
    public withMessenger($messenger): static
    public getInput()
    public withInput($input): static
    public getOutput()
    public withOutput($output): static
    public getOrder(): array
    public withOrder(array $order): static
    public getFetchPartial(): bool
    public withFetchPartial(bool $fetchPartial): static
    public getForceEager(): bool
    public withForceEager(bool $forceEager): static
    public getPaginationEnabled(): bool
    public withPaginationEnabled(bool $paginationEnabled): static
    public getPaginationType(): string
    public withPaginationType(string $paginationType): static
    public getPaginationItemsPerPage(): int
    public withPaginationItemsPerPage(int $paginationItemsPerPage): static
    public getPaginationMaximumItemsPerPage(): int
    public withPaginationMaximumItemsPerPage(int $paginationMaximumItemsPerPage): static
    public getPaginationPartial(): bool
    public withPaginationPartial(bool $paginationPartial): static
    public getPaginationClientEnabled(): bool
    public withPaginationClientEnabled(bool $paginationClientEnabled): static
    public getPaginationClientItemsPerPage(): bool
    public withPaginationClientItemsPerPage(bool $paginationClientItemsPerPage): static
    public getPaginationClientPartial(): bool
    public withPaginationClientPartial(bool $paginationClientPartial): static
    public getPaginationFetchJoinCollection(): bool
    public withPaginationFetchJoinCollection(bool $paginationFetchJoinCollection): static
    public getPaginationUseOutputWalkers(): bool
    public withPaginationUseOutputWalkers(bool $paginationUseOutputWalkers): static
    public getSecurity(): string
    public withSecurity($security): static
    public getSecurityMessage(): string
    public withSecurityMessage(string $securityMessage): static
    public getSecurityPostDenormalize(): string
    public withSecurityPostDenormalize($securityPostDenormalize): static
    public getSecurityPostDenormalizeMessage(): string
    public withSecurityPostDenormalizeMessage(string $securityPostDenormalizeMessage): static
    public getSecurityPostValidation(): string
    public withSecurityPostValidation(null|string $securityPostValidation): static
    public getSecurityPostValidationMessage(): string
    public withSecurityPostValidationMessage(null|string $securityPostValidationMessage): static
    public getProcessor(): callable|string
    public withProcessor(null|callable|string $processor): static
    public getProvider(): callable|string
    public withProvider(null|callable|string $provider): static
    public getStateOptions(): ApiPlatform\State\OptionsInterface
    public withStateOptions(null|ApiPlatform\State\OptionsInterface $stateOptions): static
    public getExtraProperties(): array
    public withExtraProperties(array $extraProperties): static
    protected copyFrom(ApiPlatform\Metadata\Metadata $resource): static
}

Properties

resolver

string $resolver
string $resolver

args

array $args
array $args

extraArgs

array $extraArgs
array $extraArgs

links

array $links
array $links

shortName

string $shortName
string $shortName

class

string $class
string $class

paginationEnabled

bool $paginationEnabled
bool $paginationEnabled

The paginationEnabled option enables (or disables) the pagination for the current collection operation.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationEnabled: true)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationEnabled: true)]
class Book
{
    // ...
}

paginationType

string $paginationType
string $paginationType

The paginationType option defines the type of pagination (page or cursor) to use for the current collection operation.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationType: 'page')]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationType: 'page')]
class Book
{
    // ...
}

paginationItemsPerPage

int $paginationItemsPerPage
int $paginationItemsPerPage

The paginationItemsPerPage option defines the number of items per page for the current collection operation.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationItemsPerPage: 30)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationItemsPerPage: 30)]
class Book
{
    // ...
}

paginationMaximumItemsPerPage

int $paginationMaximumItemsPerPage
int $paginationMaximumItemsPerPage

The paginationMaximumItemsPerPage option defines the maximum number of items per page for the current resource.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationMaximumItemsPerPage: 50)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationMaximumItemsPerPage: 50)]
class Book
{
    // ...
}

paginationPartial

bool $paginationPartial
bool $paginationPartial

The paginationPartial option enables (or disables) the partial pagination for the current collection operation.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationPartial: true)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationPartial: true)]
class Book
{
    // ...
}

paginationClientEnabled

bool $paginationClientEnabled
bool $paginationClientEnabled

The paginationClientEnabled option allows (or disallows) the client to enable (or disable) the pagination for the current collection operation.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationClientEnabled: true)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationClientEnabled: true)]
class Book
{
    // ...
}

The pagination can now be enabled (or disabled) by adding a query parameter named pagination:

  • GET /books?pagination=false: disabled
  • GET /books?pagination=true: enabled

paginationClientItemsPerPage

bool $paginationClientItemsPerPage
bool $paginationClientItemsPerPage

The paginationClientItemsPerPage option allows (or disallows) the client to set the number of items per page for the current collection operation.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationClientItemsPerPage: true)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationClientItemsPerPage: true)]
class Book
{
    // ...
}

The number of items can now be set by adding a query parameter named itemsPerPage:

  • GET /books?itemsPerPage=50

paginationClientPartial

bool $paginationClientPartial
bool $paginationClientPartial

The paginationClientPartial option allows (or disallows) the client to enable (or disable) the partial pagination for the current collection operation.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationClientPartial: true)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationClientPartial: true)]
class Book
{
    // ...
}

The partial pagination can now be enabled (or disabled) by adding a query parameter named partial:

  • GET /books?partial=false: disabled
  • GET /books?partial=true: enabled

paginationFetchJoinCollection

bool $paginationFetchJoinCollection
bool $paginationFetchJoinCollection

The PaginationExtension of API Platform performs some checks on the QueryBuilder to guess, in most common cases, the correct values to use when configuring the Doctrine ORM Paginator: $fetchJoinCollection argument, whether there is a join to a collection-valued association.

When set to true, the Doctrine ORM Paginator will perform an additional query, in order to get the correct number of results. You can configure this using the paginationFetchJoinCollection option:

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationFetchJoinCollection: false)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationFetchJoinCollection: false)]
class Book
{
    // ...
}

For more information, please see the Pagination entry in the Doctrine ORM documentation.

paginationUseOutputWalkers

bool $paginationUseOutputWalkers
bool $paginationUseOutputWalkers

The PaginationExtension of API Platform performs some checks on the QueryBuilder to guess, in most common cases, the correct values to use when configuring the Doctrine ORM Paginator: $setUseOutputWalkers setter, whether to use output walkers.

When set to true, the Doctrine ORM Paginator will use output walkers, which are compulsory for some types of queries. You can configure this using the paginationUseOutputWalkers option:

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationUseOutputWalkers: false)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(paginationUseOutputWalkers: false)]
class Book
{
    // ...
}

For more information, please see the Pagination entry in the Doctrine ORM documentation.

paginationViaCursor

array $paginationViaCursor
array $paginationViaCursor

The paginationViaCursor option configures the cursor-based pagination for the current resource. Select your unique sorted field as well as the direction you'll like the pagination to go via filters. Note that for now you have to declare a RangeFilter and an OrderFilter on the property used for the cursor-based pagination:

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Doctrine\Odm\Filter\OrderFilter;
use ApiPlatform\Doctrine\Odm\Filter\RangeFilter;
 
#[GetCollection(paginationPartial: true, paginationViaCursor: [['field' => 'id', 'direction' => 'DESC']])]
#[ApiFilter(RangeFilter::class, properties: ["id"])]
#[ApiFilter(OrderFilter::class, properties: ["id" => "DESC"])]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Doctrine\Odm\Filter\OrderFilter;
use ApiPlatform\Doctrine\Odm\Filter\RangeFilter;
 
#[GetCollection(paginationPartial: true, paginationViaCursor: [['field' => 'id', 'direction' => 'DESC']])]
#[ApiFilter(RangeFilter::class, properties: ["id"])]
#[ApiFilter(OrderFilter::class, properties: ["id" => "DESC"])]
class Book
{
    // ...
}

To know more about cursor-based pagination take a look at this blog post on medium (draft).

order

array $order
array $order

description

string $description
string $description

normalizationContext

array $normalizationContext
array $normalizationContext

denormalizationContext

array $denormalizationContext
array $denormalizationContext

collectDenormalizationErrors

bool $collectDenormalizationErrors
bool $collectDenormalizationErrors

security

string $security
string $security

securityMessage

string $securityMessage
string $securityMessage

securityPostDenormalize

string $securityPostDenormalize
string $securityPostDenormalize

securityPostDenormalizeMessage

string $securityPostDenormalizeMessage
string $securityPostDenormalizeMessage

securityPostValidation

string $securityPostValidation
string $securityPostValidation

securityPostValidationMessage

string $securityPostValidationMessage
string $securityPostValidationMessage

deprecationReason

string $deprecationReason
string $deprecationReason

The deprecationReason option deprecates the current operation with a deprecation message.

<?php
// api/src/Entity/Parchment.php
use ApiPlatform\Metadata\Get;
 
#[Get(deprecationReason: 'Create a Book instead')]
class Parchment
{
    // ...
}
<?php
// api/src/Entity/Parchment.php
use ApiPlatform\Metadata\Get;
 
#[Get(deprecationReason: 'Create a Book instead')]
class Parchment
{
    // ...
}

filters

array $filters
array $filters

The filters option configures the filters (declared as services) available on the collection routes for the current resource.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(filters: ['app.filters.book.search'])]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\GetCollection;
 
#[GetCollection(filters: ['app.filters.book.search'])]
class Book
{
    // ...
}

validationContext

array $validationContext
array $validationContext

The validationContext option configure the context of validation for the current Operation. You can, for instance, describe the validation groups that will be used :

  #[Put(validationContext: ['groups' => ['Default', 'putValidation']])]
  #[Post(validationContext: ['groups' => ['Default', 'postValidation']])]
  #[Put(validationContext: ['groups' => ['Default', 'putValidation']])]
  #[Post(validationContext: ['groups' => ['Default', 'postValidation']])]

For more examples, read our guide on validation.

input

$input
$input

output

$output
$output

mercure

$mercure
$mercure

messenger

string|bool $messenger
string|bool $messenger

The messenger option dispatches the current resource through the Message Bus.

<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\Post;
 
#[Post(messenger: true)]
class Book
{
    // ...
}
<?php
// api/src/Entity/Book.php
use ApiPlatform\Metadata\Post;
 
#[Post(messenger: true)]
class Book
{
    // ...
}

Note: when using messenger=true on a Doctrine entity, the Doctrine Processor is not called. If you want it to be called, you should decorate a built-in state processor and implement your own logic.

Read how to use Messenger with an Input object.

elasticsearch

bool $elasticsearch
bool $elasticsearch

urlGenerationStrategy

int $urlGenerationStrategy
int $urlGenerationStrategy

read

bool $read
bool $read

deserialize

bool $deserialize
bool $deserialize

validate

bool $validate
bool $validate

write

bool $write
bool $write

serialize

bool $serialize
bool $serialize

fetchPartial

bool $fetchPartial
bool $fetchPartial

forceEager

bool $forceEager
bool $forceEager

priority

int $priority
int $priority

name

string $name
string $name

provider

$provider
$provider

processor

$processor
$processor

stateOptions

ApiPlatform\State\OptionsInterface $stateOptions
ApiPlatform\State\OptionsInterface $stateOptions

extraProperties

array $extraProperties
array $extraProperties

Methods

__construct

public __construct(null|string $resolver, null|array $args, null|array $extraArgs, null|array&lt;int, ApiPlatform\Metadata\Link&gt; $links, null|string $shortName, null|string $class, null|bool $paginationEnabled, null|string $paginationType, null|int $paginationItemsPerPage, null|int $paginationMaximumItemsPerPage, null|bool $paginationPartial, null|bool $paginationClientEnabled, null|bool $paginationClientItemsPerPage, null|bool $paginationClientPartial, null|bool $paginationFetchJoinCollection, null|bool $paginationUseOutputWalkers, null|array $order, null|string $description, null|array $normalizationContext, null|array $denormalizationContext, null|bool $collectDenormalizationErrors, null|string $security, null|string $securityMessage, null|string $securityPostDenormalize, null|string $securityPostDenormalizeMessage, null|string $securityPostValidation, null|string $securityPostValidationMessage, null|string $deprecationReason, null|array $filters, null|array $validationContext, array|string|false $input, array|string|false $output, string|array|bool $mercure, string|bool $messenger, null|bool $elasticsearch, null|int $urlGenerationStrategy, null|bool $read, null|bool $deserialize, null|bool $validate, null|bool $write, null|bool $serialize, null|bool $fetchPartial, null|bool $forceEager, null|int $priority, null|string $name, string|callable $provider, string|callable $processor, null|ApiPlatform\State\OptionsInterface $stateOptions, array $extraProperties)
public __construct(null|string $resolver, null|array $args, null|array $extraArgs, null|array&lt;int, ApiPlatform\Metadata\Link&gt; $links, null|string $shortName, null|string $class, null|bool $paginationEnabled, null|string $paginationType, null|int $paginationItemsPerPage, null|int $paginationMaximumItemsPerPage, null|bool $paginationPartial, null|bool $paginationClientEnabled, null|bool $paginationClientItemsPerPage, null|bool $paginationClientPartial, null|bool $paginationFetchJoinCollection, null|bool $paginationUseOutputWalkers, null|array $order, null|string $description, null|array $normalizationContext, null|array $denormalizationContext, null|bool $collectDenormalizationErrors, null|string $security, null|string $securityMessage, null|string $securityPostDenormalize, null|string $securityPostDenormalizeMessage, null|string $securityPostValidation, null|string $securityPostValidationMessage, null|string $deprecationReason, null|array $filters, null|array $validationContext, array|string|false $input, array|string|false $output, string|array|bool $mercure, string|bool $messenger, null|bool $elasticsearch, null|int $urlGenerationStrategy, null|bool $read, null|bool $deserialize, null|bool $validate, null|bool $write, null|bool $serialize, null|bool $fetchPartial, null|bool $forceEager, null|int $priority, null|string $name, string|callable $provider, string|callable $processor, null|ApiPlatform\State\OptionsInterface $stateOptions, array $extraProperties)

Parameters

resolverstring
argsarray
extraArgsarray
linksarray<int, ApiPlatform\Metadata\Link>
shortNamestring
classstring
paginationEnabledbool
paginationTypestring
paginationItemsPerPageint
paginationMaximumItemsPerPageint
paginationPartialbool
paginationClientEnabledbool
paginationClientItemsPerPagebool
paginationClientPartialbool
paginationFetchJoinCollectionbool
paginationUseOutputWalkersbool
orderarray
descriptionstring
normalizationContextarray
denormalizationContextarray
collectDenormalizationErrorsbool
securitystring
securityMessagestring
securityPostDenormalizestring
securityPostDenormalizeMessagestring
securityPostValidationstring
securityPostValidationMessagestring
deprecationReasonstring
filtersarray
validationContextarray
inputarray
string
false
https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation
outputarray
string
false
https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation
mercurestring
array
bool
https://api-platform.com/docs/core/mercure
messengerstring
bool
https://api-platform.com/docs/core/messenger/#dispatching-a-resource-through-the-message-bus
elasticsearchbool
urlGenerationStrategyint
readbool
deserializebool
validatebool
writebool
serializebool
fetchPartialbool
forceEagerbool
priorityint
namestring
providerstring
callable
https://api-platform.com/docs/core/state-providers/#state-providers
processorstring
callable
https://api-platform.com/docs/core/state-processors/#state-processors
stateOptionsApiPlatform\State\OptionsInterface
extraPropertiesarray

getResolver

public getResolver(): string
public getResolver(): string

Returns

string

withResolver

public withResolver(null|string $resolver): ApiPlatform\Metadata\GraphQl\Operation
public withResolver(null|string $resolver): ApiPlatform\Metadata\GraphQl\Operation

Parameters

resolverstring

Returns

ApiPlatform\Metadata\GraphQl\Operation

getArgs

public getArgs(): array
public getArgs(): array

Returns

array

withArgs

public withArgs(null|array $args): ApiPlatform\Metadata\GraphQl\Operation
public withArgs(null|array $args): ApiPlatform\Metadata\GraphQl\Operation

Parameters

argsarray

Returns

ApiPlatform\Metadata\GraphQl\Operation

getExtraArgs

public getExtraArgs(): array
public getExtraArgs(): array

Returns

array

withExtraArgs

public withExtraArgs(null|array $extraArgs): ApiPlatform\Metadata\GraphQl\Operation
public withExtraArgs(null|array $extraArgs): ApiPlatform\Metadata\GraphQl\Operation

Parameters

extraArgsarray

Returns

ApiPlatform\Metadata\GraphQl\Operation

getLinks

public getLinks(): array&lt;int, ApiPlatform\Metadata\Link&gt;
public getLinks(): array&lt;int, ApiPlatform\Metadata\Link&gt;

Returns

array<int, ApiPlatform\Metadata\Link>

withLinks

public withLinks(array&lt;int, ApiPlatform\Metadata\Link&gt; $links): ApiPlatform\Metadata\GraphQl\Operation
public withLinks(array&lt;int, ApiPlatform\Metadata\Link&gt; $links): ApiPlatform\Metadata\GraphQl\Operation

Parameters

linksarray<int, ApiPlatform\Metadata\Link>

Returns

ApiPlatform\Metadata\GraphQl\Operation

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop