Guides
Tutorials
Converts a type to its GraphQL equivalent.
class ApiPlatform\GraphQl\Type\TypeConverter implements `<a href="/docs/reference/GraphQl/Type/TypeConverterInterface">ApiPlatform\GraphQl\Type\TypeConverterInterface</a>`
{
public __construct(ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface|ApiPlatform\GraphQl\Type\TypeBuilderInterface $typeBuilder, ApiPlatform\GraphQl\Type\TypesContainerInterface $typesContainer, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory)
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
}class ApiPlatform\GraphQl\Type\TypeConverter implements `<a href="/docs/reference/GraphQl/Type/TypeConverterInterface">ApiPlatform\GraphQl\Type\TypeConverterInterface</a>`
{
public __construct(ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface|ApiPlatform\GraphQl\Type\TypeBuilderInterface $typeBuilder, ApiPlatform\GraphQl\Type\TypesContainerInterface $typesContainer, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory)
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
}public __construct(ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface|ApiPlatform\GraphQl\Type\TypeBuilderInterface $typeBuilder, ApiPlatform\GraphQl\Type\TypesContainerInterface $typesContainer, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory)public __construct(ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface|ApiPlatform\GraphQl\Type\TypeBuilderInterface $typeBuilder, ApiPlatform\GraphQl\Type\TypesContainerInterface $typesContainer, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface $propertyMetadataFactory)| typeBuilder | ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface ApiPlatform\GraphQl\Type\TypeBuilderInterface | |
| typesContainer | ApiPlatform\GraphQl\Type\TypesContainerInterface | |
| resourceMetadataCollectionFactory | ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface | |
| propertyMetadataFactory | ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface |
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|stringpublic 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| type | Symfony\Component\PropertyInfo\Type | |
| input | bool | |
| rootOperation | ApiPlatform\Metadata\GraphQl\Operation | |
| resourceClass | string | |
| rootResource | string | |
| property | string | |
| depth | int |
GraphQL\Type\Definition\Type
string
Resolves a type written with the GraphQL type system to its object representation.
public resolveType(string $type): GraphQL\Type\Definition\Typepublic resolveType(string $type): GraphQL\Type\Definition\Type| type | string |
GraphQL\Type\Definition\Type