commadore / graphql-client
A php GraphQL Client.
Installs: 3 020
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
Requires
- php: ^7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ^8
This package is auto-updated.
Last update: 2024-04-19 23:31:03 UTC
README
PHP GraphQL Client
Essentially a wrapper for Guzzle for GraphQL queries.
Inject a Guzzle Client, one method that takes a GraphQL Query, (optional) variables, (optional) headers.
Returns GraphQLResponse object with getPayload, getErrors methods to get at your delicious data. Both return associative arrays.
Allows Guzzle exceptions to bubble up other than TransferException which is thrown as a custom Network Exception