class StringTypeParser implements TypeParserInterface (View source)

Parses a type, e.g. Int!(20) into an array defining the arg type

Traits

Injectable

Methods

static bool
isInternalType($type)

Returns true if the given type is an internal GraphQL type, e.g. "String" or "Int"

__construct(string $rawArg)

TypeParser constructor.

bool
isRequired()

No description

string
getName()

No description

null
getDefaultValue()

No description

Type
getType(bool $nullable = true)

No description

Details

static bool isInternalType($type)

Returns true if the given type is an internal GraphQL type, e.g. "String" or "Int"

Parameters

$type

Return Value

bool

__construct(string $rawArg)

TypeParser constructor.

Parameters

string $rawArg

bool isRequired()

Return Value

bool

string getName()

Return Value

string

null getDefaultValue()

Return Value

null

Type getType(bool $nullable = true)

Parameters

bool $nullable

If true, allow the type to be null. Otherwise, return the typename, which may be arbitrary.

Return Value

Type