Reference
C
Class

ApiPlatform\GraphQl\Type\FieldsBuilder

Builds the GraphQL fields.

class ApiPlatform\GraphQl\Type\FieldsBuilder implements `<a href="/docs/reference/GraphQl/Type/FieldsBuilderInterface">ApiPlatform\GraphQl\Type\FieldsBuilderInterface</a>`, `<a href="/docs/reference/GraphQl/Type/FieldsBuilderEnumInterface">ApiPlatform\GraphQl\Type\FieldsBuilderEnumInterface</a>`
{
    public __construct(ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\GraphQl\Type\TypesContainerInterface $typesContainer, ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface|ApiPlatform\GraphQl\Type\TypeBuilderInterface $typeBuilder, ApiPlatform\GraphQl\Type\TypeConverterInterface $typeConverter, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $collectionResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemMutationResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemSubscriptionResolverFactory, Psr\Container\ContainerInterface $filterLocator, ApiPlatform\State\Pagination\Pagination $pagination, null|Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter, string $nestingSeparator)
    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 getEnumFields(string $enumClass): array
    public resolveResourceArgs(array $args, ApiPlatform\Metadata\GraphQl\Operation $operation): array
}
class ApiPlatform\GraphQl\Type\FieldsBuilder implements `<a href="/docs/reference/GraphQl/Type/FieldsBuilderInterface">ApiPlatform\GraphQl\Type\FieldsBuilderInterface</a>`, `<a href="/docs/reference/GraphQl/Type/FieldsBuilderEnumInterface">ApiPlatform\GraphQl\Type\FieldsBuilderEnumInterface</a>`
{
    public __construct(ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\GraphQl\Type\TypesContainerInterface $typesContainer, ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface|ApiPlatform\GraphQl\Type\TypeBuilderInterface $typeBuilder, ApiPlatform\GraphQl\Type\TypeConverterInterface $typeConverter, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $collectionResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemMutationResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemSubscriptionResolverFactory, Psr\Container\ContainerInterface $filterLocator, ApiPlatform\State\Pagination\Pagination $pagination, null|Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter, string $nestingSeparator)
    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 getEnumFields(string $enumClass): array
    public resolveResourceArgs(array $args, ApiPlatform\Metadata\GraphQl\Operation $operation): array
}

Methods

__construct

public __construct(ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\GraphQl\Type\TypesContainerInterface $typesContainer, ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface|ApiPlatform\GraphQl\Type\TypeBuilderInterface $typeBuilder, ApiPlatform\GraphQl\Type\TypeConverterInterface $typeConverter, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $collectionResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemMutationResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemSubscriptionResolverFactory, Psr\Container\ContainerInterface $filterLocator, ApiPlatform\State\Pagination\Pagination $pagination, null|Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter, string $nestingSeparator)
public __construct(ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\GraphQl\Type\TypesContainerInterface $typesContainer, ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface|ApiPlatform\GraphQl\Type\TypeBuilderInterface $typeBuilder, ApiPlatform\GraphQl\Type\TypeConverterInterface $typeConverter, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $collectionResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemMutationResolverFactory, ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface $itemSubscriptionResolverFactory, Psr\Container\ContainerInterface $filterLocator, ApiPlatform\State\Pagination\Pagination $pagination, null|Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter, string $nestingSeparator)

Parameters

propertyNameCollectionFactoryApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface
propertyMetadataFactoryApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface
resourceMetadataCollectionFactoryApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface
resourceClassResolverApiPlatform\Api\ResourceClassResolverInterface
typesContainerApiPlatform\GraphQl\Type\TypesContainerInterface
typeBuilderApiPlatform\GraphQl\Type\TypeBuilderEnumInterface
ApiPlatform\GraphQl\Type\TypeBuilderInterface
typeConverterApiPlatform\GraphQl\Type\TypeConverterInterface
itemResolverFactoryApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface
collectionResolverFactoryApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface
itemMutationResolverFactoryApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface
itemSubscriptionResolverFactoryApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface
filterLocatorPsr\Container\ContainerInterface
paginationApiPlatform\State\Pagination\Pagination
nameConverterSymfony\Component\Serializer\NameConverter\NameConverterInterface
nestingSeparatorstring

getNodeQueryFields

Gets the fields of a node for a query.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.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.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.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.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.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

getEnumFields

Gets the fields (cases) of the enum.

public getEnumFields(string $enumClass): array
public getEnumFields(string $enumClass): array

Parameters

enumClassstring

Returns

array

resolveResourceArgs

Resolve the args of a resource by resolving its types.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