netmexmedia / Lumina by Zany101

LuminaBundle: A Symfony bundle providing Lighthouse-inspired GraphQL support with automatic Doctrine integration, custom resolvers, scalars, directives, queries, and mutations.
0
0
0
Package Data
Maintainer Username: Zany101
Maintainer Contact: d.verhoeven@netmex.nl (Danny)
Package Create Date: 2025-12-31
Package Last Update: 2026-01-15
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2026-02-03 03:03:15
Package Statistics
Total Downloads: 0
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 0
Total Forks: 0
Total Open Issues: 0

Netmex Lumina

Packagist Version PHP Version License

LuminaBundle — A Symfony bundle providing Lighthouse-inspired GraphQL support with automatic Doctrine integration, custom resolvers, scalars, directives, queries, and mutations.

About

Netmex Lumina is a directive-driven GraphQL framework for Symfony.

Instead of writing resolvers, repositories, or query builders by hand, Lumina lets you describe behavior directly in your GraphQL schema using custom directives. Those directives are compiled once into Intents, which are then executed efficiently at runtime.

Lumina focuses on:

  • Clean architecture
  • Zero boilerplate resolvers
  • Strong separation between schema, intent, and execution
  • First-class Symfony & Doctrine integration

Core Concepts

1. Schema-Driven Behavior

Your GraphQL schema is the source of truth.

type Query {
  users(name: String @where): [User] @all
}

No resolver classes.

No wiring.

The schema defines everything.


2. Directives = Behavior

Each directive represents a unit of intent.

Examples:

  • @all - Fetch all records.
  • @where - Filter records by field.
  • @orderBy - Sort records.

Directives are:

  • Reusable
  • Composable
  • Framework-agnostic at the schema level

3. Intent Compilation

At schema compile time:

  1. The GraphQL AST is traversed once
  2. Directives are instantiated
  3. Intents are built per Type.Field

These intents are stored in an IntentRegistry and reused during execution.

  • No runtime AST traversal
  • No resolver discovery
  • No reflection hacks

4. Execution via Doctrine

At runtime:

  • Lumina resolves a field
  • Looks up its compiled intent
  • Builds a Doctrine QueryBuilder
  • Applies argument directives
  • Executes the resolver directive

Installation

composer require netmex/lumina

Using Directives

Lumina comes with many built-in directives, including:

  • Query directives: @all, @find, @where, @orderBy, @limit, @offset, @paginate
  • Relation directives: @hasMany, @belongsTo, @join
  • Mutation directives: @create, @update, @delete, @validate
  • Aggregation directives: @count, @sum, @avg
  • Access control directives: @can, @role, @owner
  • Utilities: @deprecated

For detailed usage and examples, see the Directive Documentation.


Extending Lumina

Creating a Directive

Lumina allows you to create custom directives that can:

  1. Modify query execution
  2. Create input types
  3. Attach arguments to fields
  4. Modify the field’s output type
  5. Transform runtime output data

See the Creating a Directive Guide for a full example.

Why Lumina?

  1. No resolvers
  2. No controller logic
  3. No duplicated query code
  4. One AST pass
  5. Explicit intent
  6. Symfony & Doctrine native

Lumina is ideal if you want:

  • Schema-first GraphQL
  • Strong consistency
  • Minimal boilerplate
  • High performance

Project Status

Actively developed

The core architecture is stable and functional. More directives and documentation are planned.

License

MIT License