hasura-extra / api-client
The library provides an api client to interact with Hasura api.
Installs: 64 043
Dependents: 5
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 0
pkg:composer/hasura-extra/api-client
Requires
- php: >=8.2
- symfony/http-client: ^7.0
Requires (Dev)
- phpunit/phpunit: ^10.4
Conflicts
- hasura-extra/auth-hook: <5.0.0
- hasura-extra/bundle: <5.0.0
- hasura-extra/event-dispatcher: <5.0.0
- hasura-extra/graphql-scalars: <5.0.0
- hasura-extra/hasura-bundle: *
- hasura-extra/laravel: <2.5.0
- hasura-extra/metadata: <5.0.0
README
Library to help interact with Hasura api.
Installation
Install via Composer:
composer require hasura-extra/api-client
Usages
Create client and call api:
<?php $client = new \Hasura\ApiClient\Client('Your Hasura base uri', 'Your Hasura admin secret (optional)'); // Get Hasura config $config = $client->config()->get(); // Export Hasura metadata $metadata = $client->metadata()->query('export_metadata', []); // Execute graphql query: $data = $client->graphql()->query('query { __typename }'); // And more...
Client method provides to interact with Hasura api:
| Method | Api reference | 
|---|---|
| config | link | 
| graphql | link | 
| relay graphql | link | 
| metadata | link | 
| version | link | 
License
This project is released under the MIT License.