aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/99designs/gqlgen/codegen/complexity.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/99designs/gqlgen/codegen/complexity.go')
-rw-r--r--vendor/github.com/99designs/gqlgen/codegen/complexity.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/99designs/gqlgen/codegen/complexity.go b/vendor/github.com/99designs/gqlgen/codegen/complexity.go
new file mode 100644
index 00000000..66d21a84
--- /dev/null
+++ b/vendor/github.com/99designs/gqlgen/codegen/complexity.go
@@ -0,0 +1,11 @@
+package codegen
+
+func (o *Object) UniqueFields() map[string]*Field {
+ m := map[string]*Field{}
+
+ for _, f := range o.Fields {
+ m[f.GoFieldName] = f
+ }
+
+ return m
+}