PHP Class GraphQL\Tests\StarWarsData

Exibir arquivo Open project: webonyx/graphql-php Class Usage Examples

Public Methods

Method Description
artoo ( ) We export artoo directly because the schema returns him from a root field, and hence needs to reference him.
droids ( )
getCharacter ( $id ) Helper function to get a character by ID.
getDroid ( $id ) : mixed | null
getFriends ( $character ) Allows us to query for a character's friends.
getHero ( $episode ) : array
getHuman ( $id ) : mixed | null
humans ( )

Private Methods

Method Description
han ( )
leia ( )
luke ( )
tarkin ( )
threepio ( )
vader ( )

Method Details

artoo() static public method

We export artoo directly because the schema returns him from a root field, and hence needs to reference him.
static public artoo ( )

droids() static public method

static public droids ( )

getCharacter() static public method

Helper function to get a character by ID.
static public getCharacter ( $id )

getDroid() static public method

static public getDroid ( $id ) : mixed | null
$id
return mixed | null

getFriends() static public method

Allows us to query for a character's friends.
static public getFriends ( $character )

getHero() static public method

static public getHero ( $episode ) : array
$episode
return array

getHuman() static public method

static public getHuman ( $id ) : mixed | null
$id
return mixed | null

humans() static public method

static public humans ( )