@@ -7,12 +7,12 @@ import (
77 "github.com/vektah/gqlparser/errors"
88)
99
10- var operationVisitor []func (vctx * vctx , operation * gqlparser.OperationDefinition )
11- var fieldVisitors []func (vctx * vctx , parentDef * gqlparser.Definition , fieldDef * gqlparser.FieldDefinition , field * gqlparser.Field )
12- var fragmentVisitors []func (vctx * vctx , parentDef * gqlparser.Definition , fragment * gqlparser.FragmentDefinition )
13- var inlineFragmentVisitors []func (vctx * vctx , parentDef * gqlparser.Definition , inlineFragment * gqlparser.InlineFragment )
14- var directiveVisitors []func (vctx * vctx , parentDef * gqlparser.Definition , directiveDef * gqlparser.DirectiveDefinition , directive * gqlparser.Directive , location gqlparser.DirectiveLocation )
15- var directiveListVisitors []func (vctx * vctx , parentDef * gqlparser.Definition , directives []gqlparser.Directive , location gqlparser.DirectiveLocation )
10+ var operationVisitor []func (ctx * vctx , operation * gqlparser.OperationDefinition )
11+ var fieldVisitors []func (ctx * vctx , parentDef * gqlparser.Definition , fieldDef * gqlparser.FieldDefinition , field * gqlparser.Field )
12+ var fragmentVisitors []func (ctx * vctx , parentDef * gqlparser.Definition , fragment * gqlparser.FragmentDefinition )
13+ var inlineFragmentVisitors []func (ctx * vctx , parentDef * gqlparser.Definition , inlineFragment * gqlparser.InlineFragment )
14+ var directiveVisitors []func (ctx * vctx , parentDef * gqlparser.Definition , directiveDef * gqlparser.DirectiveDefinition , directive * gqlparser.Directive , location gqlparser.DirectiveLocation )
15+ var directiveListVisitors []func (ctx * vctx , parentDef * gqlparser.Definition , directives []gqlparser.Directive , location gqlparser.DirectiveLocation )
1616
1717func init () {
1818 //fieldVisitors = append(fieldVisitors, func(vctx *vctx, parentDef *gqlparser.Definition, fieldDef *gqlparser.FieldDefinition, field *gqlparser.Field) {
@@ -24,6 +24,9 @@ type vctx struct {
2424 schema * gqlparser.Schema
2525 document * gqlparser.QueryDocument
2626 errors []errors.Validation
27+
28+ // todo: Move this somewhere better
29+ seenFragments map [string ]bool
2730}
2831
2932func (c * vctx ) walk () {
0 commit comments