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

  • Config
  • ConnectionResolver
  • DataSource
  • Loader

Interfaces

  • ConnectionResolverInterface

Interface ConnectionResolverInterface

Class Connections

This class provides some helper methods to make creating connections easier.

Direct known implementers

WPGraphQL\Data\ConnectionResolver

Indirect known implementers

WPGraphQL\Type\Comment\Connection\CommentConnectionResolver, WPGraphQL\Type\PostObject\Connection\PostObjectConnectionResolver, WPGraphQL\Type\TermObject\Connection\TermObjectConnectionResolver, WPGraphQL\Type\User\Connection\UserConnectionResolver

Namespace: WPGraphQL\Data
Package: WPGraphQL\Data
Located at Data/ConnectionResolverInterface.php

Methods summary

public static
# get_query( $query_args )
public static array
# get_query_args( $source, array $args, WPGraphQL\AppContext $context, GraphQL\Type\Definition\ResolveInfo $info )

Placeholder class that should be implemented by the extending class.

Placeholder class that should be implemented by the extending class.

This prepares the $query_args for use in the connection query. This is where default $args are set, where dynamic $args from the $source get set, and where mapping the input $args to the actual $query_args occurs.

Parameters

$source
$args
$context
$info

Returns

array
public static array
# sanitize_input_fields( array $args, $source, array $all_args, WPGraphQL\AppContext $context, GraphQL\Type\Definition\ResolveInfo $info )

Placeholder class that should be implemented by the extending class.

Placeholder class that should be implemented by the extending class.

This validates, sanitizes and maps the input $args and maps them to the appropriate WP Query class (WP_Query, WP_Comment_Query, etc) ensuring the args being processed by the query are "safe" to process.

Parameters

$args
$source
$all_args
$context
$info

Returns

array
API documentation generated by ApiGen