Overview
  • Namespace
  • Class

Namespaces

  • WPGraphQL
    • Data
    • Type
      • Avatar
      • Comment
        • Connection
      • CommentAuthor
      • EditLock
      • Enum
      • MediaItem
        • Mutation
      • Plugin
        • Connection
      • PostObject
        • Connection
        • Mutation
      • PostType
      • Setting
      • Taxonomy
      • TermObject
        • Connection
        • Mutation
      • Theme
        • Connection
      • Union
      • User
        • Connection
        • Mutation
    • Utils

Classes

  • RootMutationType
  • RootQueryType
  • WPEnumType
  • WPInputObjectType
  • WPObjectType

Class WPObjectType

Class WPObjectType

Object Types should extend this class to take advantage of the helper methods and consistent filters.

GraphQL\Type\Definition\ObjectType
Extended by WPGraphQL\Type\WPObjectType

Direct known subclasses

WPGraphQL\Type\Avatar\AvatarType, WPGraphQL\Type\Comment\CommentType, WPGraphQL\Type\Taxonomy\TaxonomyType, WPGraphQL\Type\TermObject\TermObjectType, WPGraphQL\Type\Theme\ThemeType, WPGraphQL\Type\User\UserType, WPGraphQL\Type\CommentAuthor\CommentAuthorType, WPGraphQL\Type\EditLock\EditLockType, WPGraphQL\Type\Plugin\PluginType, WPGraphQL\Type\PostObject\PostObjectType, WPGraphQL\Type\PostType\PostTypeType, WPGraphQL\Type\RootMutationType, WPGraphQL\Type\RootQueryType, WPGraphQL\Type\Setting\SettingType

Namespace: WPGraphQL\Type
Package: WPGraphQL\Type
Since: 0.0.5
Located at Type/WPObjectType.php

Methods summary

public
# __construct( $config )

WPObjectType constructor.

WPObjectType constructor.

Since

0.0.5
public static array|WPGraphQL\Data\node_interface
# node_interface( )

node_interface

node_interface

This returns the node_interface definition allowing WPObjectTypes to easily implement the node_interface

Returns

array|WPGraphQL\Data\node_interface

Since

0.0.5
public static mixed
# prepare_fields( array $fields, string $type_name )

prepare_fields

prepare_fields

This function sorts the fields and applies a filter to allow for easily extending/modifying the shape of the Schema for the type.

Parameters

$fields
$type_name

Returns

mixed

Since

0.0.5
API documentation generated by ApiGen