PHP Class Youshido\GraphQL\Parser\Ast\Query

Inheritance: extends AbstractAst, implements Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface
Show file Open project: youshido/graphql Class Usage Examples

Protected Properties

Property Type Description
$alias string
$arguments Argument[]
$fields Field[] | Query[]
$name string

Public Methods

Method Description
__construct ( string $name, string $alias = '', array $arguments, array $fields, Location $location ) Query constructor.
addArgument ( Argument $argument )
getAlias ( )
getArguments ( ) : Argument[]
getFields ( ) : Field[] | Query[] | Youshido\GraphQL\Parser\Ast\Interfaces\FragmentInterface[]
getKeyValueArguments ( )
getName ( )
hasArguments ( )
hasField ( $name, $deep = false )
hasFields ( ) : boolean
setArguments ( $arguments )
setFields ( Field[] | Query[] $fields )

Method Details

__construct() public method

Query constructor.
public __construct ( string $name, string $alias = '', array $arguments, array $fields, Location $location )
$name string
$alias string
$arguments array
$fields array
$location Youshido\GraphQL\Parser\Location

addArgument() public method

public addArgument ( Argument $argument )
$argument Argument

getAlias() public method

public getAlias ( )

getArguments() public method

public getArguments ( ) : Argument[]
return Argument[]

getFields() public method

public getFields ( ) : Field[] | Query[] | Youshido\GraphQL\Parser\Ast\Interfaces\FragmentInterface[]
return Field[] | Query[] | Youshido\GraphQL\Parser\Ast\Interfaces\FragmentInterface[]

getKeyValueArguments() public method

getName() public method

public getName ( )

hasArguments() public method

public hasArguments ( )

hasField() public method

public hasField ( $name, $deep = false )

hasFields() public method

public hasFields ( ) : boolean
return boolean

setArguments() public method

public setArguments ( $arguments )
$arguments Argument[]

setFields() public method

public setFields ( Field[] | Query[] $fields )
$fields Field[] | Query[]

Property Details

$alias protected property

protected string $alias
return string

$arguments protected property

protected Argument[],Youshido\GraphQL\Parser\Ast $arguments
return Argument[]

$fields protected property

protected Field[],Youshido\GraphQL\Parser\Ast|Query[],Youshido\GraphQL\Parser\Ast $fields
return Field[] | Query[]

$name protected property

protected string $name
return string