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