aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/graphql-go/graphql/language/source
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/graphql-go/graphql/language/source')
-rw-r--r--vendor/github.com/graphql-go/graphql/language/source/source.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/github.com/graphql-go/graphql/language/source/source.go b/vendor/github.com/graphql-go/graphql/language/source/source.go
new file mode 100644
index 00000000..f14af003
--- /dev/null
+++ b/vendor/github.com/graphql-go/graphql/language/source/source.go
@@ -0,0 +1,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
+}