https://github.com/thecodingmachine/graphqlite-bundle
A Symfony bundle for thecodingmachine/graphqlite.
https://github.com/thecodingmachine/graphqlite-bundle
Last synced: 21 days ago
JSON representation
A Symfony bundle for thecodingmachine/graphqlite.
- Host: GitHub
- URL: https://github.com/thecodingmachine/graphqlite-bundle
- Owner: thecodingmachine
- Created: 2019-01-29T15:32:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-21T01:14:33.000Z (9 months ago)
- Last Synced: 2025-05-15T20:09:17.264Z (8 months ago)
- Language: PHP
- Size: 369 KB
- Stars: 36
- Watchers: 15
- Forks: 42
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://packagist.org/packages/thecodingmachine/graphqlite-bundle)
[](https://packagist.org/packages/thecodingmachine/graphqlite-bundle)
[](https://github.com/thecodingmachine/graphqlite-bundle/actions/workflows/test.yaml/badge.svg)
# 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: https://graphqlite.thecodingmachine.io/docs/symfony-bundle
See [thecodingmachine/graphqlite](https://github.com/thecodingmachine/graphqlite).
## Requirements
- PHP 8.1+
- Supports:
- Symfony 6.4/7.0/8.0
- GraphQLite ^8
## Installation
```bash
composer require thecodingmachine/graphqlite-bundle
```
Ensure the bundle is enabled (Symfony Flex does this automatically via `config/bundles.php` after `composer require`).
### Configure routes
Import the bundle routes to expose `/graphql`:
```yaml
# config/routes/graphqlite.yaml
graphqlite_bundle:
resource: '@GraphQLiteBundle/Resources/config/routes.php'
```
### Configure namespaces
Tell GraphQLite where to look for controllers and types:
```yaml
# config/packages/graphqlite.yaml
graphqlite:
namespace:
controllers: App\\GraphQL\\Controller
types:
- App\\GraphQL\\Type
- App\\Entity
```
## Quickstart
Create a controller with GraphQLite attributes:
```php