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

AbandonedArchivedNeos-package[API Development](/categories/api)

t3n/graphql-apollofederation
============================

Apollo Federation spec implementation for t3n.GraphQL

0.2.0(6y ago)34.6kPHPPHP &gt;=7.2

Since Jul 16Pushed 8mo agoCompare

[ Source](https://github.com/t3n/graphql-federation)[ Packagist](https://packagist.org/packages/t3n/graphql-apollofederation)[ RSS](/packages/t3n-graphql-apollofederation/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (3)Versions (7)Used By (0)

Warning

**This plugin is no longer being maintained and there is no superseding package at this time**

t3n.GraphQL.ApolloFederation
============================

[](#t3ngraphqlapollofederation)

Sidecar package for [t3n.GraphQL](https://github.com/t3n/graphql) to implement the [Apollo Federation specification](https://www.apollographql.com/docs/apollo-server/federation/federation-spec/) within your GraphQL schema.

Simply install it via composer:

```
composer require "t3n/graphql-apollofederation"
```

*Note: This package is still under progress and might change in it's implementation*

About Apollo Federation
-----------------------

[](#about-apollo-federation)

Apollo Federation is an architecture for composing multiple GraphQL services into a single graph. This package provides all functionality to implement the specification to your endpoints so you can use your service with Apollo's tools.

Adjustments
-----------

[](#adjustments)

In order to implement the specification you need do add some small adjustments to your existing schema. You can see an [example implementation here](https://github.com/t3n/graphql-federation-demo).

### Add Federation Spec schema

[](#add-federation-spec-schema)

1. Add the graphql specification to your schema:

```
t3n:
  GraphQL:
    endpoints:
      'your-endpoint':
        schemas:
          federationSpec: # make sure to start this key with "federation"
            typeDefs: 'resource://t3n.GraphQL.ApolloFederation/Private/GraphQL/federation-schema.graphql'
              resolvers:
                _Entity: 't3n\GraphQL\ApolloFederation\Resolver\EntityResolver'
                _Service: 't3n\GraphQL\ApolloFederation\Resolver\ServiceResolver'
```

2. Add the `ServiceQueryTrait` to your Query-Resolver

```
