PHPackages                             thecodingmachine/graphqlite-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. thecodingmachine/graphqlite-bundle

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

thecodingmachine/graphqlite-bundle
==================================

A Symfony bundle for thecodingmachine/graphqlite.

v7.4.0(4mo ago)371.6M↓31%44[2 issues](https://github.com/thecodingmachine/graphqlite-bundle/issues)[2 PRs](https://github.com/thecodingmachine/graphqlite-bundle/pulls)2MITPHPPHP &gt;=8.1CI passing

Since Apr 26Pushed 1mo ago13 watchersCompare

[ Source](https://github.com/thecodingmachine/graphqlite-bundle)[ Packagist](https://packagist.org/packages/thecodingmachine/graphqlite-bundle)[ Docs](https://github.com/thecodingmachine/graphqlite)[ RSS](/packages/thecodingmachine-graphqlite-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (40)Used By (2)

[![Latest Stable Version](https://camo.githubusercontent.com/22d3075acb4e950098b75d49dbf095a15cf36b5ca018c84168bf34a9c70d8652/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d62756e646c652f762f737461626c65)](https://packagist.org/packages/thecodingmachine/graphqlite-bundle)[![License](https://camo.githubusercontent.com/a37388b35838b3036ed5af148a61dccb241a5a652a9db1d91a339d733495da6c/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d62756e646c652f6c6963656e7365)](https://packagist.org/packages/thecodingmachine/graphqlite-bundle)[![Build Status](https://github.com/thecodingmachine/graphqlite-bundle/actions/workflows/test.yaml/badge.svg)](https://github.com/thecodingmachine/graphqlite-bundle/actions/workflows/test.yaml/badge.svg)

GraphQLite bundle
=================

[](#graphqlite-bundle)

Symfony bundle for the `thecodingmachine/graphqlite` package. It discovers your annotated controllers and types, builds the schema, exposes the `/graphql` endpoint through a PSR-7 bridge (with optional upload handling), and keeps the Symfony request available as the GraphQL context.

Part of the bundle docs:

See [thecodingmachine/graphqlite](https://github.com/thecodingmachine/graphqlite).

Requirements
------------

[](#requirements)

- PHP 8.1+
- Supports:
    - Symfony 6.4/7.0/8.0
    - GraphQLite ^8

Installation
------------

[](#installation)

```
composer require thecodingmachine/graphqlite-bundle
```

Ensure the bundle is enabled (Symfony Flex does this automatically via `config/bundles.php` after `composer require`).

### Configure routes

[](#configure-routes)

Import the bundle routes to expose `/graphql`:

```
# config/routes/graphqlite.yaml
graphqlite_bundle:
  resource: '@GraphQLiteBundle/Resources/config/routes.php'
```

### Configure namespaces

[](#configure-namespaces)

Tell GraphQLite where to look for controllers and types:

```
# config/packages/graphqlite.yaml
graphqlite:
  namespace:
    controllers: App\\GraphQL\\Controller
    types:
      - App\\GraphQL\\Type
      - App\\Entity
```

Quickstart
----------

[](#quickstart)

Create a controller with GraphQLite attributes:

```
