'Product', 'fromFieldName' => 'defaultAttributes', ) ) ); } /** * Given an array of $args, this returns the connection config, merging the provided args * with the defaults * * @access public * @param array $args - Connection configuration. * * @return array */ public static function get_connection_config( $args = array() ) { $defaults = array( 'fromType' => 'ProductVariation', 'toType' => 'VariationAttribute', 'fromFieldName' => 'attributes', 'connectionArgs' => array(), 'resolve' => function ( $root, $args, $context, $info ) { return Factory::resolve_variation_attribute_connection( $root, $args, $context, $info ); }, ); return array_merge( $defaults, $args ); } }