定制 netmex/lumina 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

netmex/lumina

最新稳定版本:1.0.0

Composer 安装命令:

composer require netmex/lumina

包简介

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

README 文档

README

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

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固