Search by

hecht-a / graphql-orm

hecht-a

GraphQL ORM for Symfony

Package info

github.com/hecht-a/graphql-orm

Type:symfony-bundle

pkg:composer/hecht-a/graphql-orm

Statistics

Installs: 83

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v5.13.0 2026-10-19 14:09 UTC

README

GraphQL ORM is a lightweight GraphQL ORM for PHP/Symfony, inspired by concepts from Doctrine ORM.

It allows you to map PHP objects to a GraphQL API using attributes, and provides repositories, a query builder, automatic hydration, relation handling, schema validation, and deep Symfony integration.

Installation

composer require hecht-a/graphql-orm

Requirements: PHP 8.4+ and Symfony 7.4 or 8.x.

The bundle relies on the HTTP client service provided by FrameworkBundle (framework.http_client, enabled by default when symfony/http-client is installed).

Quick start

# config/packages/graphql_orm.yaml
graphql_orm:
  endpoint: 'http://localhost:4000/graphql'
  mapping:
    entity:
      dir: '%kernel.project_dir%/src/GraphQL/Entity'
      namespace: App\GraphQL\Entity
    repository:
      dir: '%kernel.project_dir%/src/GraphQL/Repository'
      namespace: App\GraphQL\Repository
php bin/console graphqlorm:make:entity Task
$tasks = $taskRepository->findAll();

$qb = $taskRepository->createQueryBuilder();
$tasks = $qb
    ->select('id', 'title', 'user.name')
    ->where($qb->expr()->eq('status', 'active'))
    ->limit(10)
    ->getQuery()
    ->getResult();

Documentation

The documentation is published at https://hecht-a.github.io/graphql-orm/, and its pages live in docs/:

Supported versions

Version Status
5.x Maintained: new features and fixes
4.x and earlier No longer maintained since 5.11.0: no release, fix included; see upgrading

License

MIT, see LICENSE.