Guides
Tutorials
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
}
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)
propertyNameCollectionFactory | ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface | |
propertyMetadataFactory | ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface | |
resourceMetadataCollectionFactory | ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface | |
resourceClassResolver | ApiPlatform\Api\ResourceClassResolverInterface | |
typesContainer | ApiPlatform\GraphQl\Type\TypesContainerInterface | |
typeBuilder | ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface ApiPlatform\GraphQl\Type\TypeBuilderInterface | |
typeConverter | ApiPlatform\GraphQl\Type\TypeConverterInterface | |
itemResolverFactory | ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface | |
collectionResolverFactory | ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface | |
itemMutationResolverFactory | ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface | |
itemSubscriptionResolverFactory | ApiPlatform\GraphQl\Resolver\Factory\ResolverFactoryInterface | |
filterLocator | Psr\Container\ContainerInterface | |
pagination | ApiPlatform\State\Pagination\Pagination | |
nameConverter | Symfony\Component\Serializer\NameConverter\NameConverterInterface | |
nestingSeparator | string |
Gets the fields of a node for a query.Gets the fields of a node for a query.
public getNodeQueryFields(): array
public getNodeQueryFields(): array
array
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
resourceClass | string | |
operation | ApiPlatform\Metadata\GraphQl\Operation | |
configuration | array |
array
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
resourceClass | string | |
operation | ApiPlatform\Metadata\GraphQl\Operation | |
configuration | array |
array
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
resourceClass | string | |
operation | ApiPlatform\Metadata\GraphQl\Operation |
array
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
resourceClass | string | |
operation | ApiPlatform\Metadata\GraphQl\Operation |
array
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
resourceClass | string | |
operation | ApiPlatform\Metadata\GraphQl\Operation | |
input | bool | |
depth | int | |
ioMetadata | array |
array
Gets the fields (cases) of the enum.
public getEnumFields(string $enumClass): array
public getEnumFields(string $enumClass): array
enumClass | string |
array
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
args | array | |
operation | ApiPlatform\Metadata\GraphQl\Operation |
array