PHPackages                             ecodev/graphql-doctrine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ecodev/graphql-doctrine

ActiveLibrary[Database &amp; ORM](/categories/database)

ecodev/graphql-doctrine
=======================

Declare GraphQL types from Doctrine entities and attributes

11.0.1(4mo ago)102147.9k↓20.7%13[2 issues](https://github.com/Ecodev/graphql-doctrine/issues)3MITPHPPHP ^8.4CI passing

Since Nov 22Pushed 2mo ago13 watchersCompare

[ Source](https://github.com/Ecodev/graphql-doctrine)[ Packagist](https://packagist.org/packages/ecodev/graphql-doctrine)[ RSS](/packages/ecodev-graphql-doctrine/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (47)Used By (3)

GraphQL Doctrine
================

[](#graphql-doctrine)

[![Build Status](https://github.com/ecodev/graphql-doctrine/workflows/main/badge.svg)](https://github.com/ecodev/graphql-doctrine/actions)[![Total Downloads](https://camo.githubusercontent.com/bc3abfc66de43ee9227fdb0242af9d845c691d189aad06bab8e8399cadbdc324/68747470733a2f2f706f7365722e707567782e6f72672f65636f6465762f6772617068716c2d646f637472696e652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/ecodev/graphql-doctrine)[![Latest Stable Version](https://camo.githubusercontent.com/040d142fce58450f171dae556309585d659956d6edbee847169d23be289e56d5/68747470733a2f2f706f7365722e707567782e6f72672f65636f6465762f6772617068716c2d646f637472696e652f762f737461626c652e706e67)](https://packagist.org/packages/ecodev/graphql-doctrine)[![License](https://camo.githubusercontent.com/6cf271095576f23cdded8f469a4ff1de67910f342d19a2367360bed6737147c5/68747470733a2f2f706f7365722e707567782e6f72672f65636f6465762f6772617068716c2d646f637472696e652f6c6963656e73652e706e67)](https://packagist.org/packages/ecodev/graphql-doctrine)

A library to declare GraphQL types from Doctrine entities, PHP type hinting, and attributes, and to be used with [webonyx/graphql-php](https://github.com/webonyx/graphql-php).

It reads most information from type hints, complete some things from existing Doctrine attributes and allow further customizations with specialized attributes. It will then create [`ObjectType`](https://webonyx.github.io/graphql-php/type-system/object-types/#object-type-definition) and [`InputObjectType`](https://webonyx.github.io/graphql-php/type-system/input-types/#input-object-type)instances with fields for all getter and setter respectively found on Doctrine entities.

It will **not** build the entire schema. It is up to the user to use automated types, and other custom types, to define root queries.

Quick start
-----------

[](#quick-start)

Install the library via composer:

```
composer require ecodev/graphql-doctrine
```

And start using it:

```
