\Pluf_Graphql

Render a result based on GraphQl

Summary

Methods
Properties
Constants
__construct()
render()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
loadSchema()
generateResult()
beautifyErrorMessage()
$cache
N/A

Properties

$cache

$cache : 

Type

Methods

__construct()

__construct(array  $cache = null) 

Creates new instance of the engine

If the schema file name is not provided, it will default to

Pluf::f('graphql_schema')

If the cache folder name is not provided, it will default to

Pluf::f('tmp_folder')

Parameters

array $cache

a folder path to store the schema file

render()

render(  $c,   $query) : 

Render the template with the given context and return the content.

Parameters

$c

Object Context.

$query

Returns

loadSchema()

loadSchema(  $schema,   $rootType,   $itemType) 

Parameters

$schema
$rootType
$itemType

generateResult()

generateResult(  $schema,   $c,   $query) 

Parameters

$schema
$c
$query

beautifyErrorMessage()

beautifyErrorMessage(  $errors) 

Parameters

$errors