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

  • TermObjectQuery
  • TermObjectType

Class TermObjectType

Class TermObjectType

This sets up the base TermObjectType. Custom taxonomies that are set to "show_in_graphql" will automatically use the TermObjectType and inherit the fields that are defined here. The fields get passed through a filter unique to each taxonomy, so each taxonomy can modify it's term schema via field filters.

NOTE: In some cases, (probably rare, I would guess) the "shape" of a custom taxonomy term might not make sense to inherit the fields defined here, so it might make sense for a Taxonomy to register it's own custom defined type for it's terms instead of utilizing the TermObjectType.

GraphQL\Type\Definition\ObjectType
Extended by WPGraphQL\Type\WPObjectType
Extended by WPGraphQL\Type\TermObject\TermObjectType
Namespace: WPGraphQL\Type\TermObject
Package: WPGraphQL\Type
Since: 0.0.5
Located at Type/TermObject/TermObjectType.php

Methods summary

public
# __construct( string $taxonomy )

TermObjectType constructor.

TermObjectType constructor.

Parameters

$taxonomy
The taxonomy name

Since

0.0.5

Overrides

WPGraphQL\Type\WPObjectType::__construct

Methods inherited from WPGraphQL\Type\WPObjectType

node_interface(), prepare_fields()

API documentation generated by ApiGen