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

wp-graphql / wp-graphql / 14716683875

28 Apr 2025 07:58PM UTC coverage: 84.287% (+1.6%) from 82.648%
14716683875

push

github

actions-user
release: merge develop into master for v2.3.0

15905 of 18870 relevant lines covered (84.29%)

257.23 hits per line

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

96.67
/src/Type/ObjectType/RootMutation.php
1
<?php
2

3
namespace WPGraphQL\Type\ObjectType;
4

5
class RootMutation {
6

7
        /**
8
         * Register RootMutation type
9
         *
10
         * @return void
11
         */
12
        public static function register_type() {
593✔
13
                register_graphql_object_type(
593✔
14
                        'RootMutation',
593✔
15
                        [
593✔
16
                                'description' => static function () {
593✔
17
                                        return __( 'The root mutation', 'wp-graphql' );
69✔
18
                                },
593✔
19
                                'fields'      => static function () {
593✔
20
                                        return [
593✔
21
                                                'increaseCount' => [
593✔
22
                                                        'type'        => 'Int',
593✔
23
                                                        'description' => static function () {
593✔
24
                                                                return __( 'Increase the count.', 'wp-graphql' );
69✔
25
                                                        },
593✔
26
                                                        'args'        => [
593✔
27
                                                                'count' => [
593✔
28
                                                                        'type'        => 'Int',
593✔
29
                                                                        'description' => static function () {
593✔
30
                                                                                return __( 'The count to increase', 'wp-graphql' );
69✔
31
                                                                        },
593✔
32
                                                                ],
593✔
33
                                                        ],
593✔
34
                                                        'resolve'     => static function ( $root, $args ) {
593✔
35
                                                                return isset( $args['count'] ) ? absint( $args['count'] ) + 1 : null;
×
36
                                                        },
593✔
37
                                                ],
593✔
38
                                        ];
593✔
39
                                },
593✔
40
                        ]
593✔
41
                );
593✔
42
        }
43
}
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

© 2025 Coveralls, Inc