Reference
I
Interface

ApiPlatform\GraphQl\Type\FieldsBuilderInterface

Interface implemented to build GraphQL fields.

interface ApiPlatform\GraphQl\Type\FieldsBuilderInterface
{
    public getNodeQueryFields(): array
    public getItemQueryFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $configuration): array
    public getCollectionQueryFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $configuration): array
    public getMutationFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): array
    public getSubscriptionFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): array
    public getResourceObjectTypeFields(null|string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, bool $input, int $depth, null|array $ioMetadata): array
    public resolveResourceArgs(array $args, ApiPlatform\Metadata\GraphQl\Operation $operation): array
}
interface ApiPlatform\GraphQl\Type\FieldsBuilderInterface
{
    public getNodeQueryFields(): array
    public getItemQueryFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $configuration): array
    public getCollectionQueryFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $configuration): array
    public getMutationFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): array
    public getSubscriptionFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): array
    public getResourceObjectTypeFields(null|string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, bool $input, int $depth, null|array $ioMetadata): array
    public resolveResourceArgs(array $args, ApiPlatform\Metadata\GraphQl\Operation $operation): array
}

Methods

getNodeQueryFields

Gets the fields of a node for a query.

public getNodeQueryFields(): array
public getNodeQueryFields(): array

Returns

array

getItemQueryFields

Gets the item query fields of the schema.

public getItemQueryFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $configuration): array
public getItemQueryFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $configuration): array

Parameters

resourceClassstring
operationApiPlatform\Metadata\GraphQl\Operation
configurationarray

Returns

array

getCollectionQueryFields

Gets the collection query fields of the schema.

public getCollectionQueryFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $configuration): array
public getCollectionQueryFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, array $configuration): array

Parameters

resourceClassstring
operationApiPlatform\Metadata\GraphQl\Operation
configurationarray

Returns

array

getMutationFields

Gets the mutation fields of the schema.

public getMutationFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): array
public getMutationFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): array

Parameters

resourceClassstring
operationApiPlatform\Metadata\GraphQl\Operation

Returns

array

getSubscriptionFields

Gets the subscription fields of the schema.

public getSubscriptionFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): array
public getSubscriptionFields(string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): array

Parameters

resourceClassstring
operationApiPlatform\Metadata\GraphQl\Operation

Returns

array

getResourceObjectTypeFields

Gets the fields of the type of the given resource.

public getResourceObjectTypeFields(null|string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, bool $input, int $depth, null|array $ioMetadata): array
public getResourceObjectTypeFields(null|string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation, bool $input, int $depth, null|array $ioMetadata): array

Parameters

resourceClassstring
operationApiPlatform\Metadata\GraphQl\Operation
inputbool
depthint
ioMetadataarray

Returns

array

resolveResourceArgs

Resolve the args of a resource by resolving its types.

public resolveResourceArgs(array $args, ApiPlatform\Metadata\GraphQl\Operation $operation): array
public resolveResourceArgs(array $args, ApiPlatform\Metadata\GraphQl\Operation $operation): array

Parameters

argsarray
operationApiPlatform\Metadata\GraphQl\Operation

Returns

array

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop