whitespace-se/wordpress-plugin-wp-graphql-extras

Wordpress 插件,为 GraphQL API 添加额外的类型和字段

v1.1.1 2023-03-07 12:57 UTC

This package is auto-updated.

Last update: 2024-09-07 16:16:03 UTC


README

Wordpress 插件,为 GraphQL API 添加额外的类型和字段。

安装方法

如果您想将此插件作为 MU 插件使用,首先将以下内容添加到您的 composer.json 中

{
  "extra": {
    "installer-paths": {
      "path/to/your/mu-plugins/{$name}/": [
        "whitespace-se/wordpress-plugin-wp-graphql-extras"
      ]
    }
  }
}

其中 path/to/your/mu-plugins 类似于 wp-content/mu-pluginsweb/app/mu-plugins

然后通过 composer 获取插件

composer require whitespace-se/wordpress-plugin-wp-graphql-extras

功能

  • archiveDatesarchiveDatesGmt 字段添加到 ContentNode
  • 允许对 ContentType 上的 labelshasArchive 进行公开查询
  • contentMedia 字段添加到 NodeWithContentEditor
  • widthheightfileContentbase64Uri 字段添加到 MediaItem
  • slug 字段添加到 ContentType
  • 覆盖响应头、允许的请求头和 max_query_amount