'RootQuery', 'toType' => 'TaxRate', 'fromFieldName' => 'taxRates', 'connectionArgs' => self::get_connection_args(), 'resolve' => static function ( $source, array $args, AppContext $context, ResolveInfo $info ) { $resolver = new Tax_Rate_Connection_Resolver( $source, $args, $context, $info ); return $resolver->get_connection(); }, ], $args ); } /** * Returns array of where args. * * @return array */ public static function get_connection_args(): array { return [ 'class' => [ 'type' => 'TaxClassEnum', 'description' => static function () { return __( 'Sort by tax class.', 'graphql-for-ecommerce' ); }, ], 'postCode' => [ 'type' => 'String', 'description' => static function () { return __( 'Filter results by a post code.', 'graphql-for-ecommerce' ); }, ], 'postCodeIn' => [ 'type' => [ 'list_of' => 'String' ], 'description' => static function () { return __( 'Filter results by a group of post codes.', 'graphql-for-ecommerce' ); }, ], 'orderby' => [ 'type' => [ 'list_of' => 'TaxRateConnectionOrderbyInput' ], 'description' => static function () { return __( 'What paramater to use to order the objects by.', 'graphql-for-ecommerce' ); }, ], ]; } }