vojtech-dobes/php-graphql-server-nette-integration 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

vojtech-dobes/php-graphql-server-nette-integration

Composer 安装命令:

composer require vojtech-dobes/php-graphql-server-nette-integration

包简介

README 文档

README

Checks

This integration provides:

  • Nette\DI\CompilerExtension for comfortable configuration
  • efficient loading of resolvers directly from Nette\DI\Container
  • Tracy-compatible error handler

Installation

To install the latest version, run the following command:

composer require vojtech-dobes/php-graphql-server-nette-integration

This package only works along vojtech-dobes/php-graphql-server. Make sure to install it explicitly as well.

Minimum supported PHP version is 8.4.

Documentation

Start by registering the Nette DI extension in your configuration:

extensions:
  graphql: Vojtechdobes\GraphQL\Integrations\Nette\Extension

The minimum configuration can look like this:

graphql:
  schemaPath: %appDir%/schema.graphqls
  tempDir: %tempDir%/graphql

  fieldResolvers:
    Query.ping: App\PingFieldResolver

Here are possible fields you can specify:

Field Mandatory Description
abstractTypeResolvers no Map of abstract types to their respective resolvers (see Resolving abstract types).
autoReload no By default false. Useful during development to automatically rebuild generated Schema factory class based on latest schema & implementation changes.
contextFactory no By default NullContextFactory. Allows to specify ContextFactory service (see Context).
enableIntrospection no By default false. Determines whether introspection should be enabled by default. Can be overridden per request.
enumClasses no Map of enum types to PHP BackedEnum class (see Native enum support).
errorHandler no By default TracyErrorHandler. Allows to specify ErrorHandler service (see Handling runtime errors).
fieldResolvers yes Map of individual fields in schema to their respective field resolvers (see Resolving fields).
scalarImplementations no Map of custom scalar types to their respective implementations (see Custom scalars).
schemaPath yes Path to your schema file.
tempDir yes Path to temp directory where generated Schema factory class will be stored.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2025-04-29