承接 t3n/graphql-upload 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

t3n/graphql-upload

最新稳定版本:2.1.0

Composer 安装命令:

composer require t3n/graphql-upload

包简介

Extension for t3n/graphql that implements upload-handling

README 文档

README

Warning

This plugin is no longer being maintained and there is no superseding package at this time

t3n.GraphQL.Upload

Sidecar package for t3n/graphql that brings an Upload scalar and enables you to handle file uploads in your schema.

Simply install the package via composer:

composer require t3n/graphql-upload 

Configuration

This package ships all needed parts. However, you must add the typeDefs and the Resolver to your schema like this:

t3n: GraphQL: endpoints: 'your-endpoint': #use your endpoint variable here schemas: upload: typeDefs: 'resource://t3n.GraphQL.Upload/Private/GraphQL/schema.upload.graphql' resolvers: Upload: 't3n\GraphQL\Upload\Resolver\Type\UploadResolver'

This is everything you need to do. Once configured you can use the Upload scalar in your app.

Usage

To use the Upload scalar you might want to add it as an arg to a mutation like this:

type Mutation { uploadFile(file: Upload): String }

This package will handle the upload itself and pass an Neos\Http\Factories\FlowUploadedFile to your MutationResolver. Within your resolver method your could for instance import your resource:

class MutationResolver implements ResolverInterface { /**  * @Flow\Inject  *  * @var ResourceManager  */ protected $resourceManager; public function uploadFile($_, $variables): string { /** @var FlowUploadedFile $file */ $file = $variables['file']; $resource = $this->resourceManager->importResource($file->getStream()->detach()); $resource->setFilename($file->getClientFilename()); $resource->setMediaType($file->getClientMediaType()); return $file->getClientFilename(); } }

Some notes

To actually use file upload your frontend client must use multipart/form-data in your forms. This Package is tested with a react app that uses https://github.com/jaydenseric/apollo-upload-client

t3n/graphql-upload 适用场景与选型建议

t3n/graphql-upload 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 86.48k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 t3n/graphql-upload 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 t3n/graphql-upload 我们能提供哪些服务?
定制开发 / 二次开发

基于 t3n/graphql-upload 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2026-01-04