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

  • AppContext
  • Router
  • Types
  • WPSchema

Class Types

Class Types - Acts as a registry and factory for Types.

Each "type" is static ensuring that it will only be instantiated once and can be re-used throughout the system. The types that are "dynamic" (such as post_types, taxonomies, etc) are added as a sub-property to the Types class based on their unique identifier, and are therefore only instantiated once as well.

Namespace: WPGraphQL
Package: WPGraphQL
Since: 0.0.5
Located at Types.php

Methods summary

public static WPGraphQL\Type\Avatar\AvatarType
# avatar( )

This returns the definition for the AvatarType

This returns the definition for the AvatarType

Returns

WPGraphQL\Type\Avatar\AvatarType
object

Since

0.0.5
public static WPGraphQL\Type\Comment\CommentType
# comment( )

This returns the definition for the CommentType

This returns the definition for the CommentType

Returns

WPGraphQL\Type\Comment\CommentType
object

Since

0.0.5
public static WPGraphQL\Type\CommentAuthor\CommentAuthorType
# comment_author( )

This returns the definition for the CommentAuthorType

This returns the definition for the CommentAuthorType

Returns

WPGraphQL\Type\CommentAuthor\CommentAuthorType
object

Since

0.0.21
public static WPGraphQL\Type\Union\CommentAuthorUnionType
# comment_author_union( )

This returns the definition for the PostObjectUnionType

This returns the definition for the PostObjectUnionType

Returns

WPGraphQL\Type\Union\CommentAuthorUnionType
object

Since

0.0.21
public static WPGraphQL\Type\EditLock\EditLockType
# edit_lock( )

This returns the definition for the EditLock type

This returns the definition for the EditLock type

Returns

WPGraphQL\Type\EditLock\EditLockType
object
public static WPGraphQL\Type\Enum\MimeTypeEnumType
# mime_type_enum( )

This returns the definition for the MimeTypeEnumType

This returns the definition for the MimeTypeEnumType

Returns

WPGraphQL\Type\Enum\MimeTypeEnumType
object

Since

0.0.5
public static WPGraphQL\Type\Setting\SettingType
# setting( $setting_type )

This returns the definition for the SettingType

This returns the definition for the SettingType

Returns

WPGraphQL\Type\Setting\SettingType
object
public static WPGraphQL\Type\Plugin\PluginType
# plugin( )

This returns the definition for the PluginType

This returns the definition for the PluginType

Returns

WPGraphQL\Type\Plugin\PluginType
object

Since

0.0.5
public static WPGraphQL\Type\PostObject\PostObjectType
# post_object( string $post_type )

This returns the definition for the PostObjectType

This returns the definition for the PostObjectType

Parameters

$post_type
Name of the post type you want to retrieve the PostObjectType for

Returns

WPGraphQL\Type\PostObject\PostObjectType
object

Since

0.0.5
public static WPGraphQL\Type\Union\PostObjectUnionType
# post_object_union( )

This returns the definition for the PostObjectUnionType

This returns the definition for the PostObjectUnionType

Returns

WPGraphQL\Type\Union\PostObjectUnionType
object

Since

0.0.5
public static WPGraphQL\Type\Enum\PostObjectFieldFormatEnumType
# post_object_field_format_enum( )

This returns the definition for the PostObjectFieldFormatEnumType

This returns the definition for the PostObjectFieldFormatEnumType

Returns

WPGraphQL\Type\Enum\PostObjectFieldFormatEnumType
object

Since

0.1.18
public static WPGraphQL\Type\Enum\PostStatusEnumType
# post_status_enum( )

This returns the definition for the PostStatusEnumType

This returns the definition for the PostStatusEnumType

Returns

WPGraphQL\Type\Enum\PostStatusEnumType
object

Since

0.0.5
public static WPGraphQL\Type\Enum\MediaItemStatusEnumType
# media_item_status_enum( )

This returns the definition for the MediaItemStatusEnumType

This returns the definition for the MediaItemStatusEnumType

Returns

WPGraphQL\Type\Enum\MediaItemStatusEnumType
object
public static WPGraphQL\Type\Enum\PostTypeEnumType
# post_type_enum( )

This returns the definition for the PostStatusEnumType

This returns the definition for the PostStatusEnumType

Returns

WPGraphQL\Type\Enum\PostTypeEnumType
object

Since

0.0.5
public static WPGraphQL\Type\PostObject\Connection\PostObjectConnectionArgs
# post_object_query_args( )

This returns the definition for the PostObjectConnectionArgs

This returns the definition for the PostObjectConnectionArgs

Returns

WPGraphQL\Type\PostObject\Connection\PostObjectConnectionArgs
object

Since

0.0.5
public static WPGraphQL\Type\PostType\PostTypeType
# post_type( )

This returns the definition for the PostTypeType

This returns the definition for the PostTypeType

Returns

WPGraphQL\Type\PostType\PostTypeType
object

Since

0.0.5
public static WPGraphQL\Type\Enum\RelationEnumType
# relation_enum( )

This returns the definition for the RelationEnum

This returns the definition for the RelationEnum

Returns

WPGraphQL\Type\Enum\RelationEnumType
object

Since

0.0.5
public static WPGraphQL\Type\RootMutationType
# root_mutation( )

This returns the definition for the RootMutationType

This returns the definition for the RootMutationType

Returns

WPGraphQL\Type\RootMutationType
object

Since

0.0.8
public static WPGraphQL\Type\RootQueryType
# root_query( )

This returns the definition for the RootQueryType

This returns the definition for the RootQueryType

Returns

WPGraphQL\Type\RootQueryType
object

Since

0.0.5
public static WPGraphQL\Type\Taxonomy\TaxonomyType
# taxonomy( )

This returns the definition for the TaxonomyType

This returns the definition for the TaxonomyType

Returns

WPGraphQL\Type\Taxonomy\TaxonomyType
object

Since

0.0.5
public static WPGraphQL\Type\Enum\TaxonomyEnumType
# taxonomy_enum( )

This returns the definition for the TaxonomyEnumType

This returns the definition for the TaxonomyEnumType

Returns

WPGraphQL\Type\Enum\TaxonomyEnumType
object

Since

0.0.5
public static WPGraphQL\Type\TermObject\TermObjectType
# term_object( string $taxonomy )

This returns the definition for the TermObjectType

This returns the definition for the TermObjectType

Parameters

$taxonomy
Name of the taxonomy you want to get the TermObjectType for

Returns

WPGraphQL\Type\TermObject\TermObjectType
object

Since

0.0.5
public static WPGraphQL\Type\TermObject\Connection\TermObjectConnectionArgs
# term_object_query_args( )

This returns the definition for the TermObjectConnectionArgs

This returns the definition for the TermObjectConnectionArgs

Returns

WPGraphQL\Type\TermObject\Connection\TermObjectConnectionArgs
object

Since

0.0.5
public static WPGraphQL\Type\Union\TermObjectUnionType
# term_object_union( )

This returns the definition for the termObjectUnionType

This returns the definition for the termObjectUnionType

Returns

WPGraphQL\Type\Union\TermObjectUnionType
object
public static WPGraphQL\Type\Theme\ThemeType
# theme( )

This returns the definition for the ThemeType

This returns the definition for the ThemeType

Returns

WPGraphQL\Type\Theme\ThemeType
object

Since

0.0.5
public static WPGraphQL\Type\User\UserType
# user( )

This returns the definition for the UserType

This returns the definition for the UserType

Returns

WPGraphQL\Type\User\UserType
object

Since

0.0.5
public static WPGraphQL\Type\User\Connection\UserConnectionArgs
# user_connection_query_args( )

This returns the definition for the UserConnectionArgs

This returns the definition for the UserConnectionArgs

Returns

WPGraphQL\Type\User\Connection\UserConnectionArgs
object

Since

0.0.5
public static GraphQL\Type\Definition\BooleanType
# boolean( )

This is a wrapper for the GraphQL type to give a consistent experience

This is a wrapper for the GraphQL type to give a consistent experience

Returns

GraphQL\Type\Definition\BooleanType

Since

0.0.5
public static GraphQL\Type\Definition\FloatType
# float( )

This is a wrapper for the GraphQL type to give a consistent experience

This is a wrapper for the GraphQL type to give a consistent experience

Returns

GraphQL\Type\Definition\FloatType

Since

0.0.5
public static GraphQL\Type\Definition\idType
# id( )

This is a wrapper for the GraphQL type to give a consistent experience

This is a wrapper for the GraphQL type to give a consistent experience

Returns

GraphQL\Type\Definition\idType

Since

0.0.5
public static GraphQL\Type\Definition\IntType
# int( )

This is a wrapper for the GraphQL type to give a consistent experience

This is a wrapper for the GraphQL type to give a consistent experience

Returns

GraphQL\Type\Definition\IntType

Since

0.0.5
public static GraphQL\Type\Definition\StringType
# string( )

This is a wrapper for the GraphQL type to give a consistent experience

This is a wrapper for the GraphQL type to give a consistent experience

Returns

GraphQL\Type\Definition\StringType

Since

0.0.5
public static GraphQL\Type\Definition\ListOfType
# list_of( callable $type )

This is a wrapper for the GraphQL type to give a consistent experience

This is a wrapper for the GraphQL type to give a consistent experience

Parameters

$type

instance of GraphQL\Type\Definition\Type or callable returning instance of that class

Returns

GraphQL\Type\Definition\ListOfType

Since

0.0.5
public static GraphQL\Type\Definition\NonNull
# non_null( callable $type )

This is a wrapper for the GraphQL type to give a consistent experience

This is a wrapper for the GraphQL type to give a consistent experience

Parameters

$type

instance of GraphQL\Type\Definition\Type or callable returning instance of that class

Returns

GraphQL\Type\Definition\NonNull

Since

0.0.5
public static GraphQL\Type\Definition\BooleanType|GraphQL\Type\Definition\FloatType|GraphQL\Type\Definition\IntType|GraphQL\Type\Definition\StringType
# get_type( $type )

Resolve the type on the individual setting field for the settingsType

Resolve the type on the individual setting field for the settingsType

Parameters

$type

Returns

GraphQL\Type\Definition\BooleanType|GraphQL\Type\Definition\FloatType|GraphQL\Type\Definition\IntType|GraphQL\Type\Definition\StringType
public static array
# map_input( array $args, array $map )

Maps new input query args and sanitizes the input

Maps new input query args and sanitizes the input

Parameters

$args
The raw query args from the GraphQL query
$map
The mapping of where each of the args should go

Returns

array

Since

0.5.0
API documentation generated by ApiGen