'RootQuery', 'toType' => 'PaymentGateway', 'fromFieldName' => 'paymentGateways', 'connectionArgs' => self::get_connection_args(), 'resolve' => static function ( $source, array $args, AppContext $context, ResolveInfo $info ) { $resolver = new Payment_Gateway_Connection_Resolver(); return $resolver->resolve( $source, $args, $context, $info ); }, ], $args ); } /** * Returns array of where args. * * @return array */ public static function get_connection_args(): array { return [ 'all' => [ 'type' => 'Boolean', 'description' => static function () { return __( 'Include disabled payment gateways?', 'graphql-for-ecommerce' ); }, ], ]; } }