• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

AxeWP / wp-graphql-rank-math / 15507492505

07 Jun 2025 11:44AM UTC coverage: 86.429% (-2.0%) from 88.44%
15507492505

push

github

web-flow
dev: add support for lazy-loading `description`/`deprecationReason` config values (#121)

* chore: update strauss and deps

* dev: use callable descriptions/deprecations

* fix: dont prefix `NodeWithRankMathSeo`

* chore: fix backcompat on connections

* chore: update dep

* chore: update deps

* tests: ensure schema can build

* chore: update and cleanup

* fix: regenerate autoloader

357 of 367 new or added lines in 66 files covered. (97.28%)

60 existing lines in 60 files now uncovered.

2541 of 2940 relevant lines covered (86.43%)

11.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/src/Type/WPObject/Settings/Sitemap/Author.php
1
<?php
2
/**
3
 * The Author sitemap GraphQL object.
4
 *
5
 * @package WPGraphQL\RankMath\Type\WPObject\Settings\Sitemap
6
 */
7

8
declare( strict_types = 1 );
9

10
namespace WPGraphQL\RankMath\Type\WPObject\Settings\Sitemap;
11

12
use WPGraphQL\Data\Connection\UserConnectionResolver;
13
use WPGraphQL\RankMath\Vendor\AxeWP\GraphQL\Abstracts\ObjectType;
14
use WPGraphQL\RankMath\Vendor\AxeWP\GraphQL\Interfaces\TypeWithConnections;
15

16
/**
17
 * Class - Author
18
 */
19
class Author extends ObjectType implements TypeWithConnections {
20
        /**
21
         * {@inheritDoc}
22
         */
23
        protected static function type_name(): string {
24
                return 'SitemapAuthorSettings';
20✔
25
        }
26

27
        /**
28
         * {@inheritDoc}
29
         */
30
        public static function get_connections(): array {
31
                return [
20✔
32
                        'connectedAuthors' => [
20✔
33
                                'toType'      => 'User',
20✔
34
                                'description' => static fn () => __( 'The connected authors whose URLs are included in the sitemap', 'wp-graphql-rank-math' ),
20✔
35
                                'resolve'     => static function ( $source, $args, $context, $info ) {
20✔
36
                                        $resolver = new UserConnectionResolver( $source, $args, $context, $info );
1✔
37

38
                                        if ( ! empty( $source->excludedRoles ) ) {
1✔
39
                                                $resolver->set_query_arg( 'role__not_in', $source->excludedRoles );
×
40
                                        }
41

42
                                        if ( ! empty( $source->excludedUserDatabaseIds ) ) {
1✔
43
                                                $resolver->set_query_arg( 'exclude', $source->excludedUserDatabaseIds );
×
44
                                        }
45

46
                                        return $resolver->get_connection();
1✔
47
                                },
20✔
48
                        ],
20✔
49
                ];
20✔
50
        }
51

52
        /**
53
         * {@inheritDoc}
54
         */
55
        public static function get_description(): string {
UNCOV
56
                return __( 'The RankMath SEO Sitemap general settings.', 'wp-graphql-rank-math' );
×
57
        }
58

59
        /**
60
         * {@inheritDoc}
61
         */
62
        public static function get_fields(): array {
63
                return [
20✔
64
                        'excludedRoles'           => [
20✔
65
                                'type'        => [ 'list_of' => 'UserRoleEnum' ],
20✔
66
                                'description' => static fn () => __( 'List of user roles excluded from the sitemap.', 'wp-graphql-rank-math' ),
20✔
67
                        ],
20✔
68
                        'excludedUserDatabaseIds' => [
20✔
69
                                'type'        => [ 'list_of' => 'Int' ],
20✔
70
                                'description' => static fn () => __( 'List of user IDs excluded from the sitemap.', 'wp-graphql-rank-math' ),
20✔
71
                        ],
20✔
72
                        'sitemapUrl'              => [
20✔
73
                                'type'        => 'String',
20✔
74
                                'description' => static fn () => __( 'The sitemap URL.', 'wp-graphql-rank-math' ),
20✔
75
                        ],
20✔
76
                ];
20✔
77
        }
78
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc