1
<?php
2

3
namespace Nuwave\Lighthouse\Schema\Directives;
4

5
class ModelDirective extends BaseDirective
6
{
7 1
    public static function definition(): string
8
    {
9
        return /** @lang GraphQL */ <<<'GRAPHQL'
10 1
"""
11
Map a model class to an object type.
12

13
This can be used when the name of the model differs from the name of the type.
14
"""
15
directive @model(
16
  """
17
  The class name of the corresponding model.
18
  """
19
  class: String!
20
) on OBJECT
21
GRAPHQL;
22
    }
23
}

Read our documentation on viewing source code .

Loading