PHP Class GraphQL\Examples\Blog\Types

Acts as a registry and factory for your types. As simplistic as possible for the sake of clarity of this example. Your own may be more dynamic (or even code-generated).
Afficher le fichier Open project: webonyx/graphql-php Class Usage Examples

Méthodes publiques

Méthode Description
boolean ( ) Let's add internal types as well for consistent experience
comment ( ) : CommentType
contentFormatEnum ( ) : ContentFormatEnum
email ( )
float ( ) : FloatType
htmlField ( $name, null $objectKey = null ) : array
id ( ) : IDType
image ( ) : ImageType
imageSizeEnum ( ) : ImageSizeEnumType
int ( ) : IntType
listOf ( Type $type ) : ListOfType
mention ( ) : SearchResultType
node ( ) : NodeType
nonNull ( Type $type ) : NonNull
query ( ) : QueryType
story ( ) : StoryType
string ( ) : StringType
url ( ) : UrlType
user ( ) : UserType

Method Details

boolean() public static méthode

Let's add internal types as well for consistent experience
public static boolean ( )

comment() public static méthode

public static comment ( ) : CommentType
Résultat GraphQL\Examples\Blog\Type\CommentType

contentFormatEnum() public static méthode

public static contentFormatEnum ( ) : ContentFormatEnum
Résultat GraphQL\Examples\Blog\Type\Enum\ContentFormatEnum

email() public static méthode

public static email ( )

float() public static méthode

public static float ( ) : FloatType
Résultat GraphQL\Type\Definition\FloatType

htmlField() public static méthode

public static htmlField ( $name, null $objectKey = null ) : array
$name
$objectKey null
Résultat array

id() public static méthode

public static id ( ) : IDType
Résultat GraphQL\Type\Definition\IDType

image() public static méthode

public static image ( ) : ImageType
Résultat GraphQL\Examples\Blog\Type\ImageType

imageSizeEnum() public static méthode

public static imageSizeEnum ( ) : ImageSizeEnumType
Résultat GraphQL\Examples\Blog\Type\Enum\ImageSizeEnumType

int() public static méthode

public static int ( ) : IntType
Résultat GraphQL\Type\Definition\IntType

listOf() public static méthode

public static listOf ( Type $type ) : ListOfType
$type GraphQL\Type\Definition\Type
Résultat GraphQL\Type\Definition\ListOfType

mention() public static méthode

public static mention ( ) : SearchResultType
Résultat GraphQL\Examples\Blog\Type\SearchResultType

node() public static méthode

public static node ( ) : NodeType
Résultat GraphQL\Examples\Blog\Type\NodeType

nonNull() public static méthode

public static nonNull ( Type $type ) : NonNull
$type GraphQL\Type\Definition\Type
Résultat GraphQL\Type\Definition\NonNull

query() public static méthode

public static query ( ) : QueryType
Résultat GraphQL\Examples\Blog\Type\QueryType

story() public static méthode

public static story ( ) : StoryType
Résultat GraphQL\Examples\Blog\Type\StoryType

string() public static méthode

public static string ( ) : StringType
Résultat GraphQL\Type\Definition\StringType

url() public static méthode

public static url ( ) : UrlType
Résultat GraphQL\Examples\Blog\Type\Scalar\UrlType

user() public static méthode

public static user ( ) : UserType
Résultat GraphQL\Examples\Blog\Type\UserType