efabrica / nette-graphql
Nette implementation of efabrica/graphql package.
Installs: 24 414
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- ext-pdo: *
- efabrica/graphql: ^0.2.2
- nette/database: ^3.1
- nette/di: ^3.1
- symfony/string: ^5.4|^6.4|^7.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.5
README
This package is implementation of efabrica/graphql and generates GraphQL schema from nette database explorer.
Installation
Via composer
composer require efabrica/nette-graphql
Usage
Configuration
# config.neon extensions: graphql: Efabrica\GraphQL\Nette\Bridge\DI\NetteGraphQLExtension services: - Symfony\Component\String\Inflector\EnglishInflector graphql.schemaLoader: setup: - #... graphql.resolverFactory: setup: - #...
Loader options
Resolver options
Query execution
$input = json_decode(file_get_contents('php://input'), true); $response = $graphQL->executeQuery($input['query']);