register_graphql_connection
register_graphql_connection( array $config ): void;
Given a config array for a connection, this registers a connection by creating all appropriate fields and types for the connection
- Since: 0.1.0
- Source File:
plugins/wp-graphql/access-functions.php
Parameters
$config(array<string,mixed>): Array to configure the connection
Recipes
- Add Primary Category field for The SEO Framework plugin
- Page Siblings Connection
- Popular Posts
- Register Connection to Attached Media
- Tag to Content Node Connection
Source
function register_graphql_connection( array $config ): void {