hasura-extra/api-client

The library provides an api client to interact with Hasura api.

5.0.0 2024-01-03 18:34 UTC

This package is auto-updated.

Last update: 2024-12-03 20:29:15 UTC


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:

License

This project is released under the MIT License.