josephfusco/wpgraphiql-query-injector 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

josephfusco/wpgraphiql-query-injector

最新稳定版本:1.0.0

Composer 安装命令:

composer require josephfusco/wpgraphiql-query-injector

包简介

Inject a custom query and variables into the WPGraphiQL editor

README 文档

README

Overview

WPGraphiQL Query Injector is a WordPress plugin designed to inject custom GraphQL queries and variables into your WPGraphiQL editor. The plugin aims to provide a straightforward way to populate the WPGraphiQL editor within a WordPress Playground environment.

Usage

Once the plugin is activated, it will automatically populate the WPGraphiQL editor with predefined queries and variables. You can modify these by applying WordPress filters.

Filters

wpgraphiql_query

Filter the GraphiQL Query input.

add_filter( 'wpgraphiql_query', function() {
    return <<<GRAPHQL
      query GeneralSettings {
        allSettings {
          siteTitle: generalSettingsTitle
          sideDescription: generalSettingsDescription
        }
      }
      GRAPHQL
});

wpgraphiql_variables

Filter the GraphiQL Variables input.

add_filter( 'wpgraphiql_variables', function() {
    return <<<JSON
      {
        "id": 716
      }
      JSON;
});

wpgraphiql_use_public_fetcher

Filter auth vs public requests.

add_filter( 'wpgraphiql_use_public_fetcher', function() {
  return 'true';
});

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2023-10-22