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

ActiveLibrary[API Development](/categories/api)

mindgram/graphql-federation
===========================

Utility for creating GraphQL microservices, which can be combined into a single endpoint through tools like Apollo Gateway

3.0.0(10mo ago)03.1kMITPHPPHP ^8.0

Since Oct 30Pushed 10mo agoCompare

[ Source](https://github.com/MindgramGit/php-graphql-federation)[ Packagist](https://packagist.org/packages/mindgram/graphql-federation)[ RSS](/packages/mindgram-graphql-federation/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (2)Versions (8)Used By (0)

GraphQL Federation for PHP
==========================

[](#graphql-federation-for-php)

Utility for creating GraphQL microservices, which can be combined into a single endpoint through tools like Apollo Gateway.

[![Build Status](https://camo.githubusercontent.com/0be6b3cafa6cde3279282957dd79671fd17ae4358f9bb7b26f3eece3547927bc/68747470733a2f2f7472617669732d63692e6f72672f70617363616c646576696e6b2f7068702d6772617068716c2d66656465726174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pascaldevink/php-graphql-federation)

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

[](#installation)

Use the package manager [composer](https://getcomposer.org) to install graphql-federation.

```
composer require pascaldevink/graphql-federation
```

Usage
-----

[](#usage)

Assuming you already have an existing GraphQL implementation using [webonyx/graphql-php](https://github.com/webonyx/graphql-php), these commands add federation:

```
# First, build your existing schema
$existingSchema = BuildSchema::build(file_get_contents(__DIR__ . '/schema.graphqls'));

# Then, extend it with Federation
$federation = new \PascalDeVink\GraphQLFederation\Federation();
$schema = $federation->extendSchema($existingSchema);

# Build your root value resolver
$rootValue = include __DIR__ . '/rootvalue.php';

# And extend it with Federation resolvers
$rootValue = $federation->addResolversToRootValue($rootValue);

# Finally, execute the query
GraphQL::executeQuery($schema, $query, $rootValue, null, $variableValues);
```

See [the example of webonyx/graphql-php](https://github.com/webonyx/graphql-php/tree/master/examples/02-shorthand)for the rest of the code to make it work.

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

41

—

FairBetter than 88% of packages

Maintenance58

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~691 days

Total

4

Last Release

308d ago

Major Versions

v0.1 → 1.02021-11-18

1.0 → 2.0.02023-09-08

2.0.0 → 3.0.02025-07-04

PHP version history (2 changes)v0.1PHP ^7.3

1.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/af339312d10b1cb3313275519d968cda4a64ae64f0fbb69cec415401f03b82a4?d=identicon)[in4m](/maintainers/in4m)

---

Top Contributors

[![jacekstolarski](https://avatars.githubusercontent.com/u/87297143?v=4)](https://github.com/jacekstolarski "jacekstolarski (6 commits)")[![pralatto](https://avatars.githubusercontent.com/u/15255899?v=4)](https://github.com/pralatto "pralatto (5 commits)")[![ViciousCabaret](https://avatars.githubusercontent.com/u/36229328?v=4)](https://github.com/ViciousCabaret "ViciousCabaret (2 commits)")

---

Tags

graphqlFederationapollo

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[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)[aimeos/ai-admin-graphql

Aimeos Admin GraphQL API extension

944100.0k4](/packages/aimeos-ai-admin-graphql)[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)[ivome/graphql-relay-php

A PHP port of GraphQL Relay reference implementation

271632.4k5](/packages/ivome-graphql-relay-php)[overblog/graphql-php-generator

GraphQL types generator

29518.9k](/packages/overblog-graphql-php-generator)

PHPackages © 2026

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