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

  • MediaItemType

Class MediaItemType

Class MediaItemType

This class isn't a full definition of a new Type, instead it's used to customize the shape of the mediaItemType (via filter), which is instantiated as a PostObjectType.

Namespace: WPGraphQL\Type\MediaItem
Package: WPGraphQL\Type\MediaItem
See: : wp-graphql.php - add_filter( 'graphql_mediaItem_fields', [ '\WPGraphQL\Type\MediaItem\MediaItemType', 'fields' ], 10, 1 );
Located at Type/MediaItem/MediaItemType.php

Methods summary

public static array
# fields( array $fields )

This customizes the fields for the mediaItem type ( attachment post_type) as the shape of the mediaItem Schema is different than a standard post

This customizes the fields for the mediaItem type ( attachment post_type) as the shape of the mediaItem Schema is different than a standard post

Parameters

$fields

Returns

array

See:

wp-graphql.php - add_filter( 'graphql_mediaItem_fields' );add_filter( 'graphql_mediaItem_fields', [ '\WPGraphQL\Type\MediaItem\MediaItemType', 'fields' ], 10, 1 );


API documentation generated by ApiGen