Class TermObjectConnectionResolver
Class TermObjectConnectionResolver
- WPGraphQL\Data\ConnectionResolver implements WPGraphQL\Data\ConnectionResolverInterface
-
WPGraphQL\Type\TermObject\Connection\TermObjectConnectionResolver
Namespace: WPGraphQL\Type\TermObject\Connection
Package: WPGraphQL\Data\Resolvers
Since: 0.0.5
Located at Type/TermObject/Connection/TermObjectConnectionResolver.php
Package: WPGraphQL\Data\Resolvers
Since: 0.0.5
Located at Type/TermObject/Connection/TermObjectConnectionResolver.php
Methods summary
public
|
|
public static
array
|
#
get_query_args( $source, array $args,
Returns an array of query_args to use in the WP_Term_Query to fetch the necessary terms for the connection |
public static
WP_Term_Query
|
|
public static
array
|
#
get_connection( array|mixed $query, array $items, mixed $source, array $args,
This gets the connection to return |
public static
array
|
|
public static
array
|
#
sanitize_input_fields( array $args, mixed $source, array $all_args,
This maps the GraphQL "friendly" args to get_terms $args. There's probably a cleaner/more dynamic way to approach this, but this was quick. I'd be down to explore more dynamic ways to map this, but for now this gets the job done. |
Methods inherited from WPGraphQL\Data\ConnectionResolver
get_amount_requested()
,
get_array_meta()
,
get_array_slice()
,
get_offset()
,
get_query_amount()
,
get_query_info()
,
resolve()