Skip to content

Commit

Permalink
Adds documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Arul- committed Aug 28, 2020
1 parent ea98416 commit 1f5d855
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/GraphQL/GraphQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
use Say;
use Throwable;

/**
* query language support
*/
class GraphQL
{
const UI_GRAPHQL_PLAYGROUND = 'graphql-playground';
Expand All @@ -44,20 +47,26 @@ class GraphQL
*/
private $graphQL;

public function get()
{
return PassThrough::file(__DIR__ . '/client/' . static::$UI . '.html');
}

public function __construct(Restler $restler, StaticProperties $graphQL)
{
$this->restler = $restler;
$graphQL->context['maker'] = [$restler, 'make'];
$this->graphQL = $graphQL;
}

/**
* loads graphql client
* @return \Psr\Http\Message\ResponseInterface
* @throws HttpException
*/
public function get()
{
return PassThrough::file(__DIR__ . '/client/' . static::$UI . '.html');
}


/**
* runs graphql queries
* @param string $query {@from body}
* @param array $variables {@from body}
*
Expand Down

0 comments on commit 1f5d855

Please sign in to comment.