Download the PHP package t3n/graphql-apollofederation without Composer

On this page you can find all versions of the php package t3n/graphql-apollofederation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package graphql-apollofederation

t3n.GraphQL.ApolloFederation

Sidecar package for t3n.GraphQL to implement the Apollo Federation specification within your GraphQL schema.

Simply install it via composer:

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

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

In order to implement the specification you need do add some small adjustments to your existing schema. You can see an example implementation here.

Add Federation Spec schema

  1. Add the graphql specification to your schema:

  2. Add the ServiceQueryTrait to your Query-Resolver

  3. Add a new Entity union to your schema:

You need to make each of your entities part of the _Entity union. In order to do so add a new schema file to your Endpoint that defines the union:

  1. Add the EntitiesQueryTrait to your query resolver

This step is optional if do not have any entities.

The Federation specification needs a new query _entities. Add the trait to all of your QueryResolver:

Also add the _entities to your query type:

  1. Implement EntityResolverInterface

Once the _entities query is called the Entity union will be resolved. The Apollo Gateway server will send queries like

Depending on the representation input a concrete resolver will be instantiated. All of your Resolvers that resolves entities must therefore implement the EntityResolverInterface:

  1. Implement GraphQLTypeAwareInterface if needed

All of your data that you actually resolve and return which is part of the _Entity union type must be aware of it's type name. If it's an object you must implement the GraphQLTypeAwareInterface. If your data is an array there must be a key __typename on the first level.


All versions of graphql-apollofederation with dependencies

PHP Build Version
Package Version
Requires neos/flow Version *
t3n/graphql-tools Version *
php Version >=7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package t3n/graphql-apollofederation contains the following files

Loading the files please wait ....