Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axtiva/flexible-graphql-federation
Schema SDL first lib for generate php code from graphql sdl to TypeRegistry with webonyx/graphql-php for apollo federation properties
https://github.com/axtiva/flexible-graphql-federation
Last synced: about 2 months ago
JSON representation
Schema SDL first lib for generate php code from graphql sdl to TypeRegistry with webonyx/graphql-php for apollo federation properties
- Host: GitHub
- URL: https://github.com/axtiva/flexible-graphql-federation
- Owner: axtiva
- Created: 2021-10-16T10:27:12.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-02T18:05:42.000Z (over 2 years ago)
- Last Synced: 2024-10-08T09:09:05.572Z (3 months ago)
- Language: PHP
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# flexible-graphql-federation
Extension for [axtiva/flexible-graphql-php](https://github.com/axtiva/flexible-graphql-php) for support [Apollo Federation](https://www.apollographql.com/docs/federation/)
in php implementation as SDL first code generation.# Install
```
composer require axtiva/flexible-graphql-federation
```## Integration into [axtiva/flexible-graphql-php](https://github.com/axtiva/flexible-graphql-php)
```php
addFieldResolverGenerator(new _EntitiesResolverGenerator($fieldResolverConfig));
$builder->addFieldResolverGenerator(new _ServiceResolverGenerator($fieldResolverConfig));
$builder->addModelGenerator(new FederationRepresentationResolverGenerator($representationConfig));$generator = $builder->build();
$schema = FederationSchemaExtender::build(SchemaBuilder::build('/path/to/schema.graphql'));
foreach ($generator->generateAllTypes($schema) as $filename);
```