Reference
I
Interface

ApiPlatform\GraphQl\Type\TypeConverterInterface

Converts a type to its GraphQL equivalent.

interface ApiPlatform\GraphQl\Type\TypeConverterInterface
{
    public convertType(Symfony\Component\PropertyInfo\Type $type, bool $input, ApiPlatform\Metadata\GraphQl\Operation $rootOperation, string $resourceClass, string $rootResource, null|string $property, int $depth): GraphQL\Type\Definition\Type|string
    public resolveType(string $type): GraphQL\Type\Definition\Type
}
interface ApiPlatform\GraphQl\Type\TypeConverterInterface
{
    public convertType(Symfony\Component\PropertyInfo\Type $type, bool $input, ApiPlatform\Metadata\GraphQl\Operation $rootOperation, string $resourceClass, string $rootResource, null|string $property, int $depth): GraphQL\Type\Definition\Type|string
    public resolveType(string $type): GraphQL\Type\Definition\Type
}

Methods

convertType

Converts a built-in type to its GraphQL equivalent. A string can be returned for a custom registered type.

public convertType(Symfony\Component\PropertyInfo\Type $type, bool $input, ApiPlatform\Metadata\GraphQl\Operation $rootOperation, string $resourceClass, string $rootResource, null|string $property, int $depth): GraphQL\Type\Definition\Type|string
public convertType(Symfony\Component\PropertyInfo\Type $type, bool $input, ApiPlatform\Metadata\GraphQl\Operation $rootOperation, string $resourceClass, string $rootResource, null|string $property, int $depth): GraphQL\Type\Definition\Type|string

Parameters

typeSymfony\Component\PropertyInfo\Type
inputbool
rootOperationApiPlatform\Metadata\GraphQl\Operation
resourceClassstring
rootResourcestring
propertystring
depthint

Returns

GraphQL\Type\Definition\Type
string

resolveType

Resolves a type written with the GraphQL type system to its object representation.

public resolveType(string $type): GraphQL\Type\Definition\Type
public resolveType(string $type): GraphQL\Type\Definition\Type

Parameters

typestring

Returns

GraphQL\Type\Definition\Type

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop