PHPackages                             idci/graphql-client-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. idci/graphql-client-bundle

ActiveSymfony-bundle[API Development](/categories/api)

idci/graphql-client-bundle
==========================

Help you to process graphql query

v2.0.2(1y ago)28.5k↓44.4%2[1 issues](https://github.com/IDCI-Consulting/IDCIGraphQLClientBundle/issues)1MITPHPPHP ^7.1 || ^8.0

Since Jan 2Pushed 1y ago2 watchersCompare

[ Source](https://github.com/IDCI-Consulting/IDCIGraphQLClientBundle)[ Packagist](https://packagist.org/packages/idci/graphql-client-bundle)[ RSS](/packages/idci-graphql-client-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (47)Used By (1)

IDCI GraphQL Client Bundle
==========================

[](#idci-graphql-client-bundle)

This symfony 4 bundle provide help with GraphQL api with php thanks to a client, a query builder and a cache management.

Installation
------------

[](#installation)

With composer:

```
$ composer require idci/graphql-client-bundle
```

Basic configuration
-------------------

[](#basic-configuration)

Define new GuzzleHttp client(s):

```
eight_points_guzzle:
    clients:
        my_guzzle_client_one:
            base_url: 'http://one.example.com/' # will target http://one.example.com/graphql/ as entrypoint
        my_guzzle_client_two:
            base_url: 'http://two.example.com/'  # will target http://two.example.com/graphql/ as entrypoint
```

Define new GraphQL client(s):

```
idci_graphql_client:
    clients:
        my_client_one:
            http_client: 'eight_points_guzzle.client.my_guzzle_client_one'
        my_client_two:
            http_client: 'eight_points_guzzle.client.my_guzzle_client_two'
```

```
framework:
    cache:
        my_provider_one: "%env(resolve:MY_CACHE_DSN)%"
        pools:
            cache.my_cache_one:
                adapter: app.cache.my_adapter_one.my_cache_one
                default_lifetime: 600
                public: true
            cache.my_cache_two:
                adapter: app.cache.my_adapter_two.my_cache_two
                default_lifetime: 3600
                public: true
```

Then you can call it by using the registry, for example:

```
