blob: 0c8a8c0ef8dc011fc5a1de043540c41ecefa3e82 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package ast
import (
"github.com/graphql-go/graphql/language/kinds"
)
// Directive implements Node
type Directive struct {
Kind string
Loc *Location
Name *Name
Arguments []*Argument
}
func NewDirective(dir *Directive) *Directive {
if dir == nil {
dir = &Directive{}
}
return &Directive{
Kind: kinds.Directive,
Loc: dir.Loc,
Name: dir.Name,
Arguments: dir.Arguments,
}
}
func (dir *Directive) GetKind() string {
return dir.Kind
}
func (dir *Directive) GetLoc() *Location {
return dir.Loc
}
|