omnilance/graphql-php-client 问题修复 & 功能扩展

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

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

omnilance/graphql-php-client

Composer 安装命令:

composer require omnilance/graphql-php-client

包简介

A simple client to help execute queries and mutations across GraphQL

README 文档

README

A simple client to help execute queries and mutations across GraphQL

Installation

composer require omnilance/graphql-php-client or composer require "omnilance/graphql-php-client": ">=0.0.3"

Simple Usage

use Omnilance\GraphQL\Client;
$client = new Client($api_token);

additionaly you can set custom host

$client->setHost($host);

Run query

$query = '{ 
	domain_check(domain: "rx-name.net" {
		cost,
		avail
	}
}';
$response = $client->response($query);

$query = '{
    	allDomains(first:10) {
		domain {
		    	id,
		    	name,
		    	register_date,
		    	expired_date,
		}
    }
}';

$response = $client->response($query);

foreach($response->allDomains->domain as $domain) {
    print $domain->name;
}

Response class

all()

Use $response->all(); to get all of the data returned in the response

errors()

Use $response->errors(); to get all the errors returned in the response

hasErrors()

Use $response->hasErrors(); to check if the response contains any errors

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-clause
  • 更新时间: 2017-05-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固