PHPackages                             garlic/graphql - 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. garlic/graphql

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

garlic/graphql
==============

GraphQL Bundle uses for sending and receiving graphql queries among microservices through Garlic Message Bus.

1.4.3(6y ago)32.5k1[1 PRs](https://github.com/garlicservices/graphql-bundle/pulls)1MITPHPPHP &gt;=7.1

Since Sep 17Pushed 6y ago7 watchersCompare

[ Source](https://github.com/garlicservices/graphql-bundle)[ Packagist](https://packagist.org/packages/garlic/graphql)[ RSS](/packages/garlic-graphql/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (4)Versions (44)Used By (1)

Garlic GraphQL bundle
=====================

[](#garlic-graphql-bundle)

This bundle allow to communicate microservices via graphql to each other. It should be installed on both endpoints for proper message encode/decode flow.

This bundle based on [youshido-php/GraphQLBundle](https://github.com/youshido-php/GraphQLBundle), so special thanks to this guys for the excellent work! We've just made a couple updates ;)

Configuration
-------------

[](#configuration)

There are necessary things make this bundle works:

### Add bundle to the Symfony project

[](#add-bundle-to-the-symfony-project)

```
composer require garlic/graphql
```

### Initialize GraphQL schema(create schema, query and mutation fields)

[](#initialize-graphql-schemacreate-schema-query-and-mutation-fields)

```
bin/console make:graphql:init
```

### Create graphql type (command able to get fields from existing Entity)

[](#create-graphql-type-command-able-to-get-fields-from-existing-entity)

```
bin/console make:graphql:type
```

The command suggest you to create full CRUD mutations and queries, just type "y" to do so. There would be created CRUD-classes with related functionality. Last thing you need to make this bundle working is to update your service.yaml

```
# Make graphql services public
App\Service\GraphQL\:
    resource: '../src/Service/GraphQL/*'
    public: true
```

### Make your first graphql query or mutation

[](#make-your-first-graphql-query-or-mutation)

```
bin/console make:graphql:query
```

Now you can review and update newly created files!

It's time to run your first query! Try to send your query to **mydomain.com/graphql**

Usage
-----

[](#usage)

### Example steps to use bundle after init

[](#example-steps-to-use-bundle-after-init)

1. Create Entity (for example Apartments)
2. Create GraphQL type by using command above (for example name it Apartment), type "y" to make CRUD mutations automatically.
3. Try to execute a query

```
{
  ApartmentFind(id:1){
    id
  }
}

```

### Using related types

[](#using-related-types)

1. Let's create new Entity (for example Address) and connect it to Apartments by using many to one relation.
2. Create GraphQL type "Address" similar to step one
3. Add newly created type to Apartment type as `new Address()`
4. Try to find Apartment with address fields (for example id)

```
{
  ApartmentFind(id:1){
    id
    address {
        id
    }
  }
}

```

or directly by Address "where" query (for example id)

```
{
  ApartmentFind(address:{id:1}){
    id
    address {
        id
    }
  }
}

```

GraphiQL extension
------------------

[](#graphiql-extension)

You can write queries in interactive editor with integrated documentation about schemas, queries and mutation. To run this editor just run graphiql extension. Type to access to extension - **mydomain.com/graphql/explorer**Extension is accessible only in development mode of Symfony application.

Enjoy!
------

[](#enjoy)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 57.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Recently: every ~21 days

Total

31

Last Release

2335d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/911fb3b905a102069ad8345c1ccb6547636e7fafc75b4da58213d3fe679be486?d=identicon)[garlic](/maintainers/garlic)

---

Top Contributors

[![imaximius](https://avatars.githubusercontent.com/u/5578878?v=4)](https://github.com/imaximius "imaximius (11 commits)")[![Chyslovsky](https://avatars.githubusercontent.com/u/19927239?v=4)](https://github.com/Chyslovsky "Chyslovsky (4 commits)")[![am0nshi](https://avatars.githubusercontent.com/u/7633061?v=4)](https://github.com/am0nshi "am0nshi (3 commits)")[![demotivationme](https://avatars.githubusercontent.com/u/5822900?v=4)](https://github.com/demotivationme "demotivationme (1 commits)")

---

Tags

graphqlgraphql-bundlemicroservicessymfony-bundlegraphqlmicroservices

### Embed Badge

![Health badge](/badges/garlic-graphql/health.svg)

```
[![Health](https://phpackages.com/badges/garlic-graphql/health.svg)](https://phpackages.com/packages/garlic-graphql)
```

###  Alternatives

[webonyx/graphql-php

A PHP port of GraphQL reference implementation

4.7k77.3M333](/packages/webonyx-graphql-php)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k10.7M93](/packages/nuwave-lighthouse)[overblog/graphql-bundle

This bundle provides tools to build a GraphQL server in your Symfony App.

8027.9M28](/packages/overblog-graphql-bundle)[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[gmostafa/php-graphql-client

GraphQL client and query builder.

3217.6M25](/packages/gmostafa-php-graphql-client)[mll-lab/graphql-php-scalars

A collection of custom scalar types for usage with https://github.com/webonyx/graphql-php

1394.2M28](/packages/mll-lab-graphql-php-scalars)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
