Download the PHP package toppynl/api-platform-federation without Composer

On this page you can find all versions of the php package toppynl/api-platform-federation. 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 api-platform-federation

toppynl/api-platform-federation

GraphQL Federation v2 bridge for API Platform v3 — as a Symfony bundle.

CI

What it does

This zero-config Symfony bundle decorates API Platform's SchemaBuilderInterface to inject Federation v2 infrastructure (_service, _entities, @key directives) into the composed GraphQL schema. Mark any API Platform resource as a federation entity with a single #[FederationKey] attribute — no YAML, no XML, no extra wiring required. Reference resolution delegates to API Platform's own state providers by default, and can be overridden per type.

Requirements

Dependency Version
PHP ^8.1
api-platform/core ^3.0
symfony/framework-bundle ^6.4 \|\| ^7.0
toppynl/graphql-federation ^1.0

Installation

Register the bundle in config/bundles.php:

Quick start

That's it — _service, _entities, and @key(fields: "id") in the SDL are injected automatically.

Available attributes

Attribute Applies to Purpose
#[FederationKey(fields: 'id')] class Mark as resolvable entity key
#[FederationKey(fields: 'id', resolvable: false)] class Reference-only stub (no resolver registered)
#[FederationExternal] class / property Mark as externally owned
#[FederationShareable] class / property Allow field sharing across subgraphs
#[FederationInaccessible] class / property Hide from composed schema
#[FederationOverride(from: 'other-subgraph')] property Override field from another subgraph

Multiple keys

A type can expose more than one key field set by stacking #[FederationKey] — all instances must agree on resolvable:

Both keys are registered; the gateway may use either to resolve a Product reference.

Custom reference resolvers

By default the bundle resolves _entities lookups through API Platform's state provider. To override this for a specific type, pre-register a callable in ReferenceResolverRegistry before the schema is built — the loader skips types that already have a resolver:

How it works

License

MIT


All versions of api-platform-federation with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
toppynl/graphql-federation Version @dev
api-platform/core Version ^3.0 || ^4.0
symfony/framework-bundle Version ^6.4 || ^7.0
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 toppynl/api-platform-federation contains the following files

Loading the files please wait ...