PostGraphile Community PluginsPostGraphile 社区插件
Community members can write plugins for PostGraphile that extends its functionality; this page lists some of them. Issues with these plugins should be directed to the plugin authors, not to this project. This page is maintained by the community and is not an endorsement by the project.
社区成员可以为 PostGraphile 编写插件来扩展其功能,本页列出了其中一部分。如遇这些插件的相关问题,请直接联系对应插件作者,而非提交给 PostGraphile 项目本身。本页面由社区维护,并不代表官方背书。
If you have written a PostGraphile plugin (or have found one that is not listed here), then please feel free to add it, you can use the “edit this page” link below to do so.
如果你自己编写了 PostGraphile 插件(或发现了尚未收录的插件),欢迎随时补充——只需点击页面底部的“edit this page”链接即可编辑添加。
See the configuration docs for how to load plugins.
关于如何加载插件,请参阅配置文档。
Schema extension plugins for PostGraphile:
用于扩展 PostGraphile schema 的插件:
-
postgraphile-plugin-connection-filter - adds a
filter:arg to connections that offers a more powerful alternative to the built in filtering operations ✅postgraphile-plugin-connection-filter —— 为 Connection 添加
filter:参数,提供比内置过滤操作更强大的筛选能力 ✅ -
@graphile/pg-aggregates - aggregate support on connections ✅
@graphile/pg-aggregates —— 为 Connection 提供聚合查询支持 ✅
-
@graphile/simplify-inflection - simplifies field names by automatically removing
ByFooIdAndBarId-style suffixes. ✅@graphile/simplify-inflection —— 自动移除诸如
ByFooIdAndBarId之类的后缀,简化字段命名。 ✅ -
@graphile-contrib/pg-omit-archived - allows soft-deletes and automatic hiding of records with a particular flag ✅
@graphile-contrib/pg-omit-archived —— 支持软删除,并自动隐藏带有特定标记的记录 ✅
-
@graphile-contrib/pg-many-to-many - adds connection fields for many-to-many relations. ✅
@graphile-contrib/pg-many-to-many —— 为多对多 relation 添加 Connection 字段。 ✅
-
postgraphile-plugin-connection-filter-polymorphic - adds association filter on top of connection filter for polymorphic associations. ❓(Not yet ported to V5)
postgraphile-plugin-connection-filter-polymorphic —— 在 Connection Filter 基础上为多态关联添加关联过滤功能。 ❓(尚未移植到 V5)
-
postgraphile-polymorphic-relation-plugin - create associations (forward and backward) between models via polymorphic associations. (same concept as postgraphile-plugin-connection-filter-polymorphic). ❓(Not yet ported to V5)
postgraphile-polymorphic-relation-plugin —— 通过多态关联在模型之间创建正反向关联(与 postgraphile-plugin-connection-filter-polymorphic 理念相同)。 ❓(尚未移植到 V5)
-
postgraphile-index-to-unique-constraint-plugin - extends PostGraphile’s unique constraint detection to unique indexes also. See requirements for a V5-compatible example.
postgraphile-index-to-unique-constraint-plugin —— 将 PostGraphile 的唯一约束检测范围扩展到唯一索引。兼容 V5 的示例请参阅环境与数据库要求。
-
postgraphile-table-extension-plugin - extend a table’s fields (non-association) to another table via unique foreign key constraint. Useful for vertical partitioned tables. ❓(Not yet ported to V5)
postgraphile-table-extension-plugin —— 通过唯一外键约束将一张表的(非关联)字段扩展到另一张表,适用于垂直分表场景。 ❓(尚未移植到 V5)
-
postgraphile-plugin-custom-filter - adds a
customFilter:arg to connections that offers user defined filters on any conditions, as long as they can be fit into awhere❓(Not yet ported to V5)postgraphile-plugin-custom-filter —— 为 Connection 添加
customFilter:参数,支持基于任意可写入where子句的条件进行自定义过滤。 ❓(尚未移植到 V5) -
postgraphile-plugin-atomic-mutations - enables mutation atomicity with GraphQL requests containing multiple mutations ❓(Not yet ported to V5)
postgraphile-plugin-atomic-mutations —— 使包含多个 mutation 的 GraphQL 请求具备原子性。 ❓(尚未移植到 V5)
-
postgraphile-plugin-nested-mutations - enables a single mutation to create/update many related records ❓(Not yet ported to V5)
postgraphile-plugin-nested-mutations —— 支持通过单个 mutation 创建或更新多条关联记录。 ❓(尚未移植到 V5)
-
graphile-upsert-plugin - adds upsert mutations ❓(Not yet ported to V5)
graphile-upsert-plugin —— 添加 upsert 类型的 mutation。 ❓(尚未移植到 V5)
-
@fullstackio/postgraphile-upsert-plugin - another upsert mutations plugin - adds upsert
whereconditions ❓(Not yet ported to V5)@fullstackio/postgraphile-upsert-plugin —— 另一个 upsert mutation 插件,支持为 upsert 添加
where条件。 ❓(尚未移植到 V5) -
@graphile-contrib/pg-order-by-related - enables ordering by related table columns. ❓(Not yet ported to V5)
@graphile-contrib/pg-order-by-related —— 支持按关联表的列进行排序。 ❓(尚未移植到 V5)
-
@graphile-contrib/pg-order-by-multi-column-index - enables ordering by multi-column indexes when using
ignoreIndexes: false. ❓(Not yet ported to V5)@graphile-contrib/pg-order-by-multi-column-index —— 在启用
ignoreIndexes: false时支持按多列索引排序。 ❓(尚未移植到 V5) -
postgraphile-plugin-derived-field - provides an interface for adding derived fields ❓(Not yet ported to V5)
postgraphile-plugin-derived-field —— 提供用于添加衍生字段的接口。 ❓(尚未移植到 V5)
-
postgraphile-plugin-upload-field - enables file uploads (see
postgraphile-upload-examplebelow) ❓(Not yet ported to V5)postgraphile-plugin-upload-field —— 启用文件上传功能(参见下方的
postgraphile-upload-example)。 ❓(尚未移植到 V5) -
postgraphile-plugin-connection-multi-tenant - "Filtering Connections in PostGraphile by Tenants" ❓(Not yet ported to V5)
postgraphile-plugin-connection-multi-tenant —— “在 PostGraphile 中按租户过滤 Connection”。 ❓(尚未移植到 V5)
-
graphile-build-postgis - PostGIS support (WIP) ❓(Not yet ported to V5)
graphile-build-postgis —— PostGIS 支持(开发中)。 ❓(尚未移植到 V5)
-
postgraphile-pm2-status - expose pm2 process status thru a query ❓(Not yet ported to V5)
postgraphile-pm2-status —— 通过 GraphQL 查询暴露 PM2 进程状态。 ❓(尚未移植到 V5)
-
PassportLoginPlugin - example plugin to add a username/password
loginandregistermutations using Passport.js ❓(Not yet ported to V5)PassportLoginPlugin —— 示例插件,演示如何使用 Passport.js 添加基于用户名和密码的
login与registermutation。 ❓(尚未移植到 V5) -
postgraphile-plugin-fulltext-filter - adds support for
tsvectorfull text search fields to postgraphile-plugin-connection-filter ❓(Not yet ported to V5)postgraphile-plugin-fulltext-filter —— 为 postgraphile-plugin-connection-filter 添加对
tsvector全文检索字段的支持。 ❓(尚未移植到 V5) -
postgraphile-plugin-zombodb - adds advanced search capabilities using ZomboDB and ElasticSearch ❓(Not yet ported to V5)
postgraphile-plugin-zombodb —— 利用 ZomboDB 和 ElasticSearch 提供高级搜索能力。 ❓(尚未移植到 V5)
-
postgraphile-plugin-many-create-update-delete - generates batch create, update, & delete mutations ❓(Not yet ported to V5)
postgraphile-plugin-many-create-update-delete —— 生成批量创建、更新和删除的 mutation。 ❓(尚未移植到 V5)
-
graphile-column-privileges-mutations - generates mutations safe to use with column-level select grants ❓(Not yet ported to V5; but not needed?)
graphile-column-privileges-mutations —— 生成可安全配合列级 SELECT 权限(column-level select grant)使用的 mutation。 ❓(尚未移植到 V5;可能已不再需要?)
-
postgraphile-remove-foreign-key-fields-plugin - Removes all foreign key fields from the GraphQL schema while still allowing foreign relationships to be created. ❓(Not yet ported to V5, but use the "relay" preset instead?)
postgraphile-remove-foreign-key-fields-plugin —— 从 GraphQL schema 中移除所有外键字段,同时仍允许创建外键关联。 ❓(尚未移植到 V5,或许可直接改用 “relay” preset?)
-
postgraphile-plugin-timestamp-format - Format timestamps with PostgreSQL’s tochar function. Supports timezones too ❓(Not yet ported to V5)_
postgraphile-plugin-timestamp-format —— 使用 PostgreSQL 的 to_char 函数格式化时间戳,同时支持时区。 ❓(尚未移植到 V5)
-
@haathie/postgraphile-fancy-mutations - Plugin for performant bulk upserts with nested relations, bulk updates, and deletes. ✅
@haathie/postgraphile-fancy-mutations —— 高性能批量 upsert(支持嵌套 relation)、批量更新及批量删除插件。 ✅
-
@haathie/postgraphile-targeted-conditions - Plugin for advanced filtering, including relational conditions, ParadeDB support, and more. ✅
@haathie/postgraphile-targeted-conditions —— 高级过滤插件,支持关联条件过滤、ParadeDB 集成等特性。 ✅
-
@haathie/postgraphile-realtime - Plugin for performant, conditional subscriptions, allowing real-time updates from any table in your Postgres database. ✅
@haathie/postgraphile-realtime —— 高性能条件订阅插件,支持从 Postgres 数据库的任意表实时推送更新。 ✅
-
@haathie/postgraphile-rate-limits - Plugin for rate limiting queries and mutations. Add rate limits using smart tags and get reasonably friendly error messages. ✅
@haathie/postgraphile-rate-limits —— 查询与变更的限流插件。可通过 smart tag 添加限流规则,并返回较为友好的错误提示。 ✅
-
@haathie/postgraphile-otel - Plugin for OpenTelemetry Tracing Capabilities for GraphQL Requests. ✅
@haathie/postgraphile-otel —— 为 GraphQL 请求提供 OpenTelemetry 链路追踪能力的插件。 ✅
-
@haathie/postgraphile-reasonable-limits - Plugin to enforce reasonable limits on queries, preventing excessive data retrieval. ✅
@haathie/postgraphile-reasonable-limits —— 为查询强制施加合理限制的插件,防止一次性拉取过多数据。 ✅
Examples of using these plugins:
使用这些插件的示例项目:
-
postgraphile-upload-example - demonstrates how to add file upload support to PostGraphile using the GraphQL Multipart Request Spec. ❓(Not yet ported to V5)
postgraphile-upload-example —— 演示如何依据 GraphQL Multipart Request 规范为 PostGraphile 添加文件上传支持。 ❓(尚未移植到 V5)
These extensions extend PostGraphile in different ways:
以下扩展以其他方式扩展 PostGraphile:
-
@grafserv/persisted - adds support for persisted operations to Grafserv (and thus PostGraphile)
@grafserv/persisted —— 为 Grafserv(进而也为 PostGraphile)添加持久化操作(persisted operations)支持。
-
hapi-postgraphile - add PostGraphile to your HAPI application ❓(Not yet ported to V5)
hapi-postgraphile —— 将 PostGraphile 集成到 HAPI 应用中。 ❓(尚未移植到 V5)