aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/graphql-go/graphql/language/source/source.go
blob: f14af0032504eeadf56e6448805c2569c3484d1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package source

const (
	name = "GraphQL"
)

type Source struct {
	Body []byte
	Name string
}

func NewSource(s *Source) *Source {
	if s == nil {
		s = &Source{Name: name}
	}
	if s.Name == "" {
		s.Name = name
	}
	return s
}