mathsgod / r-graphql
This package is abandoned and no longer maintained.
No replacement package was suggested.
There is no license information available for the latest version (1.5.0) of this package.
GraphQL for php
1.5.0
2020-05-20 09:20 UTC
Requires
- firebase/php-jwt: ^5.2
- guzzlehttp/promises: ^1.3
- mathsgod/graphql-php-directive-resolvers: ^1.0
- webonyx/graphql-php: ^0.12.6
Requires (Dev)
- phpunit/phpunit: ^6.5
README
r-graphql
try { $schema = Schema::Build(file_get_contents(__DIR__ . "/schema.gql"), $this->app); } catch (Exception $e) { return ["error" => [ "message" => $e->getMessage() ]]; } $this->request->getBody()->getContents(); $input = json_decode($input, true); $query = $input['query']; $variableValues = $input['variables']; $schema->debug=true;//debug mode $result = $schema->executeQuery($query, $variableValues); $this->write(json_encode($result));
Scalar function added
JWT
try { $schema = Schema::Build(file_get_contents(__DIR__ . "/schema.gql"), $this->app); $schema->validation($jwt, $key, function ($payload) { print_r($payload); }); } catch (Exception $e) { return ["error" => [ "message" => $e->getMessage() ]]; }