coac-factory / api-client-php
API COAC GraphQL client
Package info
bitbucket.org/coac-factory/coac-api-client-php
pkg:composer/coac-factory/api-client-php
v1.0.1
2026-07-24 10:54 UTC
Requires
- php: ^8.1
- ext-curl: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-24 11:12:43 UTC
README
Framework-agnostic GraphQL client for PHP 8+ with JWT authentication (username/password -> Bearer token).
Features
- Composer installable library
- JWT authentication with token caching
- Retry on 401 (token refresh)
- Framework-agnostic (Symfony, WordPress, CLI, etc.)
Installation
composer require coac-factory/api-client-php
Usage
use CoacFactory\GraphQLClient\Config\ClientConfig;
use CoacFactory\GraphQLClient\Auth\JwtTokenProvider;
use CoacFactory\GraphQLClient\Http\GraphQLClient;
$config = new ClientConfig(
'https://api.example.com/graphql',
'user',
'password',
);
$client = new GraphQLClient($config);
$result = $client->query('
query {
items { id name }
}
');