code: func OverlappingFieldsCanBeMergedRule(context *ValidationContext) *ValidationRuleInstance {
  
  	// A memoization for when two fragments are compared "between" each other for
  	// conflicts. Two fragments may be compared many times, so memoizing this can
  	// dramatically improve the performance of this validator.
  	comparedSet := newPairSet()
  
  	// A cache for the "field map" and list of fragment names found in any given
  	// selection set. Selection sets may be asked for this information multiple
  	// times, so this improves the performance of this validator.
  	cacheMap := map[*ast.SelectionSet]*fieldsAndFragmentNames{}
  
  	visitorOpts := &visitor.VisitorOptions{
  		KindFuncMap: map[string]visitor.NamedVisitFuncs{
  			kinds.SelectionSet: {
  				Kind: func(p visitor.VisitFuncParams) (string, interface{}) {
  					if selectionSet, ok := p.Node.(*ast.SelectionSet); ok && selectionSet != nil {
  						parentType, _ := context.ParentType().(Named)
  
  						rule := &overlappingFieldsCanBeMergedRule{
  							context:     context,
  							comparedSet: comparedSet,
  							cacheMap:    cacheMap,
  						}
  						conflicts := rule.findConflictsWithinSelectionSet(parentType, selectionSet)
  						if len(conflicts) > 0 {
  							for _, c := range conflicts {
  								responseName := c.Reason.Name
  								reason := c.Reason
  								reportError(
  									context,
  									fieldsConflictMessage(responseName, reason),
  									append(c.FieldsLeft, c.FieldsRight...),
  								)
  							}
  							return visitor.ActionNoChange, nil
  						}
  					}
  					return visitor.ActionNoChange, nil
  				},
  			},
  		},
  	}
  	return &ValidationRuleInstance{
  		VisitorOpts: visitorOpts,
  	}
  }
docs: // OverlappingFieldsCanBeMergedRule Overlapping fields can be merged
  //
  // A selection set is only valid if all fields (including spreading any
  // fragments) either correspond to distinct response names or can be merged
  // without ambiguity.