Reference
I
Interface

ApiPlatform\GraphQl\Type\TypeBuilderInterface

Interface implemented to build a GraphQL type.

interface ApiPlatform\GraphQl\Type\TypeBuilderInterface
{
    public getResourceObjectType(null|string $resourceClass, ApiPlatform\Metadata\Resource\ResourceMetadataCollection $resourceMetadataCollection, ApiPlatform\Metadata\GraphQl\Operation $operation, bool $input, bool $wrapped, int $depth): GraphQL\Type\Definition\ObjectType|GraphQL\Type\Definition\NonNull
    public getNodeInterface(): GraphQL\Type\Definition\InterfaceType
    public getResourcePaginatedCollectionType(GraphQL\Type\Definition\Type $resourceType, string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): GraphQL\Type\Definition\Type
    public isCollection(Symfony\Component\PropertyInfo\Type $type): bool
}
interface ApiPlatform\GraphQl\Type\TypeBuilderInterface
{
    public getResourceObjectType(null|string $resourceClass, ApiPlatform\Metadata\Resource\ResourceMetadataCollection $resourceMetadataCollection, ApiPlatform\Metadata\GraphQl\Operation $operation, bool $input, bool $wrapped, int $depth): GraphQL\Type\Definition\ObjectType|GraphQL\Type\Definition\NonNull
    public getNodeInterface(): GraphQL\Type\Definition\InterfaceType
    public getResourcePaginatedCollectionType(GraphQL\Type\Definition\Type $resourceType, string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): GraphQL\Type\Definition\Type
    public isCollection(Symfony\Component\PropertyInfo\Type $type): bool
}

Methods

getResourceObjectType

Gets the object type of the given resource.

public getResourceObjectType(null|string $resourceClass, ApiPlatform\Metadata\Resource\ResourceMetadataCollection $resourceMetadataCollection, ApiPlatform\Metadata\GraphQl\Operation $operation, bool $input, bool $wrapped, int $depth): GraphQL\Type\Definition\ObjectType|GraphQL\Type\Definition\NonNull
public getResourceObjectType(null|string $resourceClass, ApiPlatform\Metadata\Resource\ResourceMetadataCollection $resourceMetadataCollection, ApiPlatform\Metadata\GraphQl\Operation $operation, bool $input, bool $wrapped, int $depth): GraphQL\Type\Definition\ObjectType|GraphQL\Type\Definition\NonNull

Parameters

resourceClassstring
resourceMetadataCollectionApiPlatform\Metadata\Resource\ResourceMetadataCollection
operationApiPlatform\Metadata\GraphQl\Operation
inputbool
wrappedbool
depthint

Returns

GraphQL\Type\Definition\ObjectType
GraphQL\Type\Definition\NonNull

getNodeInterface

Get the interface type of a node.

public getNodeInterface(): GraphQL\Type\Definition\InterfaceType
public getNodeInterface(): GraphQL\Type\Definition\InterfaceType

Returns

GraphQL\Type\Definition\InterfaceType

getResourcePaginatedCollectionType

Gets the type of a paginated collection of the given resource type.

public getResourcePaginatedCollectionType(GraphQL\Type\Definition\Type $resourceType, string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): GraphQL\Type\Definition\Type
public getResourcePaginatedCollectionType(GraphQL\Type\Definition\Type $resourceType, string $resourceClass, ApiPlatform\Metadata\GraphQl\Operation $operation): GraphQL\Type\Definition\Type

Parameters

resourceTypeGraphQL\Type\Definition\Type
resourceClassstring
operationApiPlatform\Metadata\GraphQl\Operation

Returns

GraphQL\Type\Definition\Type

isCollection

Returns true if a type is a collection.

public isCollection(Symfony\Component\PropertyInfo\Type $type): bool
public isCollection(Symfony\Component\PropertyInfo\Type $type): bool

Parameters

typeSymfony\Component\PropertyInfo\Type

Returns

bool

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop