Automattic\WooCommerce\Vendor\GraphQL\Utils
BuildClientSchema::build
Build a schema for use by client tools.
Given the result of a client running the introspection query, creates and returns a \Automattic\WooCommerce\Vendor\GraphQL\Type\Schema instance which can be then used with all graphql-php tools, but cannot be used to execute a query, as introspection does not represent the "resolver", "parse" or "serialize" functions or any other server-internal mechanisms.
This function expects a complete introspection result. Don't forget to check the "errors" field of a server response before calling this function.
Method of the class: BuildClientSchema{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = BuildClientSchema::build( $introspectionQuery, $options ): Schema;
- $introspectionQuery(array) (required)
- .
- $options(array)
- .
Default:[]
BuildClientSchema::build() BuildClientSchema::build code WC 10.9.1
public static function build(array $introspectionQuery, array $options = []): Schema
{
return (new self($introspectionQuery, $options))->buildSchema();
}