PHPackages                             watafactory/dwh-query-doctrine-bundle - 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. [API Development](/categories/api)
4. /
5. watafactory/dwh-query-doctrine-bundle

ActiveSymfony-bundle[API Development](/categories/api)

watafactory/dwh-query-doctrine-bundle
=====================================

This bundle extends DWH Bundle registering the types according the Doctrine to build the Graphql Schema

v1.0.0(3y ago)27GPL-3.0-or-laterPHPPHP &gt;=7.4

Since Feb 14Pushed 3y agoCompare

[ Source](https://github.com/watafactory/dwh-query-doctrine-bundle)[ Packagist](https://packagist.org/packages/watafactory/dwh-query-doctrine-bundle)[ RSS](/packages/watafactory-dwh-query-doctrine-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

DWH Query Doctrine Bundle
=========================

[](#dwh-query-doctrine-bundle)

About
-----

[](#about)

The DWH uses GraphQL specification to retrieve the data.

This bundle uses and extends [DwhQueryBundle](https://github.com/developmentwata/dwh-query-bundle) through registering the types according to a Doctrine definition.

Installation
============

[](#installation)

Via composer:

```
composer require watafactory/dwh-query-doctrine-bundle
```

Development
===========

[](#development)

In case you want to extend the library, you can set up a local installation using docker:

Run `docker-compose up -d` to run app. By default, the `docker-compose.yml` is used.

Run `docker-compose exec apache-php composer install` to install the vendors.

This docker-compose file is used for development. It starts the following container:

- php: it contains the application source code

Documentation
=============

[](#documentation)

This bundle automatically registers the types according the Doctrine definition of the entities and also create a resolver the automatically performs the query on this entity.

In order to use this bundle you need to change the schema\_builder service in the dwh\_query.yaml file:

```
dwh_query:
  schema_builder: 'dwh_query_doctrine.schema_builder'

```

Defining what entities you want to use
--------------------------------------

[](#defining-what-entities-you-want-to-use)

In the dwh\_query\_doctrine.yaml file you can configure what Doctrine entities you can query using GraphQL:

```
dwh_query_doctrine:
  doctrine_entities:
    - { class: 'App\Domain\Filter\Model\Filter', manager: 'default' }
    - { class: 'App\Domain\Result\Model\ResultCompany', manager: 'company' }
    - { class: 'App\Domain\Result\Model\ResultManager', manager: 'company_manager' }

```

The bundle will automatically look for those entities and it will registry them as a GraphQL type.

Defining the resolvers
----------------------

[](#defining-the-resolvers)

The bundle automatically will register a resolver for each of the types configured. This resolver is defined in the class Wata\\DwhQueryDoctrineBundle\\Resolver\\DoctrineQueryResolver and will use the Wata\\DwhQueryDoctrineBundle\\Query\\QueryBuilder to perform the query using Doctrine.

Defining the query
------------------

[](#defining-the-query)

A basic query can be the following:

```
{
    Filter {
        id,
        name
    }
}

```

And the result:

```
{
    "data": {
        "Filter": [
            {
                "id": "bea703b2-b100-45d8-9acd-8bc6ef7d7e34",
                "name": "Filter 0"
            },
            {
                "id": "2a3d6308-513e-45a0-8d99-50b850f76be2",
                "name": "Filter 1"
            }
        ]
    }
}

```

A query with where and orderBy arguments:

```
{
    Filter (where: {name: {neq: "Filter 2"}}, orderBy: {name: DESC})
    {
        id,
        name
    }
}

```

A query retrieving entity associations:

```
{
    Filter (where: {name: {eq: "Filter 2"}})
    {
        id,
        name,
        items
        {
            id,
            name
        }
    }
}

```

And the results:

```
{
    "data": {
        "Filter": [{
            "id": "9015a795-1673-4162-9dda-ddf656459010",
            "name": "Filter 2",
            "items": [
            {
                "id": "3931ecc9-d96b-4dd8-b200-bce6a320527e",
                "name": "adipisci"
            },
            {
                "id": "527c8fd5-dc00-4c6a-8c31-ca1f25bf0fa1",
                "name": "dolore"
            }
            ]
        }]
    }
}

```

A query with groupBy arguments:

```
{
    ResultCompany(where: {scaleName: {eq: "Zeitdruck"}}, groupBy: ["scaleName"]){
        count__scaleName
    }
}

```

When you define the groupBy arguments you can retrieve these special fields:

- count\_\_FIELDNAME: it performs a cound(FIELDNAME)
- sum\_\_FIELDNAME: it performs a sum(FIELDNAME)
- avg\_\_FIELDNAME: it performs a avg(FIELDNAME)

Operator in the where clause:

```
// between operator
Filter (where: {createdAt: {between: {from: "2000-01-01", to: "2023-01-02"}}})

// equal operator
Filter (where: {name: {eq: "Filter 2"}})

// not equal
Filter (where: {name: {neq: "Filter 2"}})

```

NOTE: if you want to use a field of an association in the where, orderBy or groupBy clauses you need to use association\_\_fieldName like this:

```
Filter (where: {items__name: {eq: "XXX"}}){

```

License
-------

[](#license)

See [LICENSE](LICENSE).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1182d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82c616541ba83e78e78782bb157f6d2b5d80f3db26c9751a643c5ef958ec287c?d=identicon)[watafactory](/maintainers/watafactory)

---

Top Contributors

[![jacaballerowata](https://avatars.githubusercontent.com/u/124883025?v=4)](https://github.com/jacaballerowata "jacaballerowata (1 commits)")

### Embed Badge

![Health badge](/badges/watafactory-dwh-query-doctrine-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/watafactory-dwh-query-doctrine-bundle/health.svg)](https://phpackages.com/packages/watafactory-dwh-query-doctrine-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[vich/uploader-bundle

Ease file uploads attached to entities

1.9k25.9M116](/packages/vich-uploader-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
