References TypeBuilderInterface
Reference
I
Interface

ApiPlatform\GraphQl\Type\TypeBuilderInterface

Interface implemented to build a GraphQL type.

interface ApiPlatform\GraphQl\Type\TypeBuilderInterface
{
    public getResourceObjectType(null|string $resourceClass, $resourceMetadataCollection, `<a href="/docs/main/references/Metadata/GraphQl/Operation">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, $resourceMetadataCollection, `<a href="/docs/main/references/Metadata/GraphQl/Operation">ApiPlatform\Metadata\GraphQl\Operation $operation, bool $input, bool $wrapped, int $depth): GraphQL\Type\Definition\ObjectType|GraphQL\Type\Definition\NonNull

Parameters

resourceClassstring
resourceMetadataCollection`ApiPlatform\Metadata\Resource\ResourceMetadataCollection`
operation`ApiPlatform\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

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

Parameters

resourceTypeGraphQL\Type\Definition\Type
resourceClassstring
operation`ApiPlatform\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

Parameters

typeSymfony\Component\PropertyInfo\Type

Returns

bool

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop