Download the PHP package linkorb/graphael without Composer
On this page you can find all versions of the php package linkorb/graphael. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download linkorb/graphael
More information about linkorb/graphael
Files in linkorb/graphael
Package graphael
Short Description Graphael: GraphQL Server builder
License MIT
Homepage http://www.github.com/linkorb/graphael
Informations about the package graphael
Graphael
Graphael is a framework for rapidly building GraphQL API Servers.
Usage
Create a new project directory, and add the following line to your composer.json
in the require
section:
Create a public/
directory, with an index.php
file like the following:
Application configuration
The server is being instantiated with a $config
array that contains the following configuration required options:
environment_prefix
: Prefix of your environment config variablestype_path
: Directory to scan for Type class filestype_namespace
: Namespace of your Type classes. Should match PSR 4 namespace in yourcomposer.json
type_postfix
: Postfix of your type classes. Defaults toType
.
And following optional:
jwt_username_claim
: Claim in JWT that will be used to get username (default:'username'
)jwt_roles_claim
: Claim in JWT for user roles (default:'roles'
)jwt_default_role
: Default user role in case of absenceroles
claim (default:'AUTHENTICATED'
)
Environment configuration
Create a .env
file (or use other means to configure your application's environment variables).
Each variable is prefixed with the environment_prefix
defined earlier, in this example MY_API_
:
Supported environment variables:
DEBUG
: Set to1
to run the app in debug modePDO_URL
: Connection string to your database. Supports all PDO backendsJWT_KEY
: Optional. If defined, the API only allows connections with JWTs signed with this key. Can be a string value or an absolute path to a public key file.
Authentication
If the JWT_KEY
environment variable is defined, the server checks for a JWT in one of two places:
- A
jwt
query parameter (i.e./graphql?jwt=abc.def.ghi
) - A
Authorization
HTTP header (i.e.Authorization: Bearer abc.def.ghi
)
All versions of graphael with dependencies
symfony/options-resolver Version ~3.0
symfony/dependency-injection Version ~3.3
webonyx/graphql-php Version ^0.13.8
linkorb/connector Version ~1.0
firebase/php-jwt Version ~5.0
pwa/time-elapsed Version ^1.0
symfony/security-core Version ^4.2 || ^5.0
symfony/http-foundation Version ^4.2 || ^5.0
ext-pdo Version *
doctrine/cache Version ^1.10