aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/graphql-go/graphql/language/ast/document.go
blob: dcb67034c434e1f9350fe9087a1d25351fc5333a (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
package ast

import (
	"github.com/graphql-go/graphql/language/kinds"
)

// Document implements Node
type Document struct {
	Kind        string
	Loc         *Location
	Definitions []Node
}

func NewDocument(d *Document) *Document {
	if d == nil {
		d = &Document{}
	}
	return &Document{
		Kind:        kinds.Document,
		Loc:         d.Loc,
		Definitions: d.Definitions,
	}
}

func (node *Document) GetKind() string {
	return node.Kind
}

func (node *Document) GetLoc() *Location {
	return node.Loc
}