x-graphql/schema-cache
最新稳定版本:0.1.1
Composer 安装命令:
composer require x-graphql/schema-cache
包简介
Caching GraphQL schema with PSR-16
README 文档
README
Save and lazy load GraphQL Schema from PSR-16 cache.
Getting Started
Install this package via Composer
composer require x-graphql/schema-cache symfony/cache
Usages
Create an instance of XGraphQL\SchemaCache\SchemaCache with PSR-16 to save and load:
use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Cache\Psr16Cache; use XGraphQL\SchemaCache\SchemaCache; $psr16 = new Psr16Cache(new ArrayAdapter()); $schemaCache = new SchemaCache($psr16); $schemaCache->save(/* $schema */); /// Lazy to load on another http requests $schemaFromCache = $schemaCache->load();
Note
This package not support to decorate type after load schema from cache, you need to add type resolvers before execute schema.
Credits
Created by Minh Vuong
统计信息
- 总下载量: 29.21k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-01