whitespace-se / wordpress-plugin-wp-graphql-extras
Wordpress 插件,为 GraphQL API 添加额外的类型和字段
v1.1.1
2023-03-07 12:57 UTC
Requires
- composer/installers: ~1.0
Requires (Dev)
- wp-graphql/wp-graphql: ^1.3
- wpackagist-plugin/advanced-custom-fields: ^5.9
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-plugins
或 web/app/mu-plugins
。
然后通过 composer 获取插件
composer require whitespace-se/wordpress-plugin-wp-graphql-extras
功能
- 将
archiveDates
和archiveDatesGmt
字段添加到ContentNode
- 允许对
ContentType
上的labels
和hasArchive
进行公开查询 - 将
contentMedia
字段添加到NodeWithContentEditor
- 将
width
、height
、fileContent
和base64Uri
字段添加到MediaItem
- 将
slug
字段添加到ContentType
- 覆盖响应头、允许的请求头和
max_query_amount