Automattic\WooCommerce\Api\Infrastructure\Schema

Type{}finalWC 1.0

Static facade for GraphQL scalar types and type modifiers referenced by autogenerated resolvers.

Autogenerated code emitted by ApiBuilder only touches the underlying GraphQL engine through this (and the other classes in the Api\Infrastructure\Schema namespace), so the engine can be swapped without invalidating already-committed generated code. Return types are intentionally omitted so a future migration can change the concrete return type without breaking callers.

No Hooks.

Usage

$Type = new Type();
// use class methods

Methods

  1. public static boolean()
  2. public static float()
  3. public static id()
  4. public static int()
  5. public static listOf( $inner )
  6. public static nonNull( $inner )
  7. public static string()
  8. ERROR: no method name found on line ``
  9. ERROR: no method name found on line ``
  10. ERROR: no method name found on line ``
  11. ERROR: no method name found on line ``
  12. ERROR: no method name found on line `* @param mixed $inner A schema type.`
  13. ERROR: no method name found on line ``
  14. ERROR: no method name found on line ``
  15. ERROR: no method name found on line ``
  16. ERROR: no method name found on line ``
  17. ERROR: no method name found on line `*`
  18. ERROR: no method name found on line ``
  19. ERROR: no method name found on line ``
  20. ERROR: no method name found on line ``
  21. ERROR: no method name found on line ``
  22. ERROR: no method name found on line ``
  23. ERROR: no method name found on line ``
  24. ERROR: no method name found on line ``
  25. ERROR: no method name found on line ``
  26. ERROR: no method name found on line ``
  27. ERROR: no method name found on line ``
  28. ERROR: no method name found on line ``
  29. ERROR: no method name found on line ``
  30. ERROR: no method name found on line ``

Type{} code WC 10.9.1

final class Type {
	/**
	 * The built-in GraphQL Int scalar.
	 */
	public static function int() {
		return WebonyxType::int();
	}

	/**
	 * The built-in GraphQL String scalar.
	 */
	public static function string() {
		return WebonyxType::string();
	}

	/**
	 * The built-in GraphQL Boolean scalar.
	 */
	public static function boolean() {
		return WebonyxType::boolean();
	}

	/**
	 * The built-in GraphQL Float scalar.
	 */
	public static function float() {
		return WebonyxType::float();
	}

	/**
	 * The built-in GraphQL ID scalar.
	 */
	public static function id() {
		return WebonyxType::id();
	}

	// phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid -- Method names mirror the webonyx Type factories so autogenerated imports of this facade and its webonyx counterpart are interchangeable.

	/**
	 * Wrap a nullable schema type as non-null (`T!`).
	 *
	 * @param mixed $inner A nullable schema type.
	 */
	public static function nonNull( $inner ) {
		return WebonyxType::nonNull( $inner );
	}

	/**
	 * Wrap a schema type as a list (`[T]`).
	 *
	 * @param mixed $inner A schema type.
	 */
	public static function listOf( $inner ) {
		return WebonyxType::listOf( $inner );
	}

	// phpcs:enable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
}