/JavApiTopiaBundle

Symfony GraphQL API's scaffolding in under 2 minutes

Primary LanguagePHPMIT LicenseMIT

GitHub CI codecov Scrutinizer code quality (GitHub/Bitbucket) PHP Version Require phpstan level Latest Stable Version Total Downloads License

ApiTopia

This symfony bundle provides a set of annotations to define a full GraphQL schema, compliant with Relay specification

Annotations provided are:

  • Query
  • QueryCollection
  • Mutation
  • SubQuery
  • SubQueryCollection
  • Subscription

The naming convention and usage of this library is extremely similar to ApiPlatform, so if you are familiar with it, you should feel right at home. Key differences are:

  • Multi schemas support, each with their own endpoint
  • Full schema definition with PHP attributes, and reflection on DTOs
  • Named queries, mutations and subscriptions are not suffixed with the class name (you can call them whatever you want)
  • Fully configurable subquery and subquery collection
  • Paginated collection resolvers are called with 'limit' and 'offset' arguments computed, even with cursor based pagination type
  • Deferred subquery and subquery collection
  • No ORM/DataSource integration, you have to provide your own data from the resolvers (but you can use anything you want inside them since they are services)
  • No support for REST (yet?), only GraphQL

Read more: