Getting Started
Hasura Extra is a set of framework-agnostic libraries, and also we provide package/bundle, application templates (boilerplate) for Laravel and Symfony out of the box.
Preparation
- Docker engine and Docker compose version 3.
Using application templates
If your get start with a new project, you should use Laravel or Symfony application templates, these had been config needed settings for you like local remote schema, handle event triggered by Hasura, structured Hasura metadata, Sailor graphql client code generator, authentication hook, Sanctum/JWT authentication, and Helm chart help you easy to deploy your project to Kubernetes.
Using Composer
- Laravel users
- Symfony users
composer require hasura-extra/laravel
Then you need to publish Hasura Extra config:
php artisan vendor:publish --provider="Hasura\Laravel\ServiceProvider\HasuraServiceProvider"
and publish Laravel GraphQLite config:
php artisan vendor:publish --provider="TheCodingMachine\GraphQLite\Laravel\Providers\GraphQLiteServiceProvider"
Alter publish config files, you should read a comment inside config file and edit if needed.
composer require hasura-extra/bundle
Symfony Flex will automatically add config files and routes, then you need to open
config/packages/hasura.yaml
file to set Hasura base uri, admin secret.