1
<?php
2

3
namespace Nuwave\Lighthouse\Schema;
4

5
class RootType
6
{
7
    public const QUERY = 'Query';
8
    public const MUTATION = 'Mutation';
9
    public const SUBSCRIPTION = 'Subscription';
10

11 1
    public static function isRootType(string $typeName): bool
12
    {
13 1
        return in_array(
14
            $typeName,
15
            [
16 1
                self::QUERY,
17 1
                self::MUTATION,
18 1
                self::SUBSCRIPTION,
19
            ]
20
        );
21
    }
22
}

Read our documentation on viewing source code .

Loading