jav/apitopia-bundle

GraphQL APIs made simpler

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 4

Forks: 1

Open Issues: 1

Type:symfony-bundle

dev-main 2024-02-05 10:04 UTC

This package is auto-updated.

Last update: 2024-04-05 10:20:43 UTC


README

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: