anchor.diff:  
       let internal validateAllVariablesUsed (ctx : ValidationContext) =
           let fragmentDefinitions = getFragmentDefinitions ctx.Document
  +        let visitedFragments = ref  []
           ctx.Document.Definitions
           |> List.choose (function OperationDefinition def -> Some (def.Name, def.SelectionSet, def.VariableDefinitions) | _ -> None)
           |> List.fold (fun acc (operationName, selectionSet, varDefs) ->
               varDefs |> List.map (fun x -> x.VariableName) |> List.fold (fun acc varName ->
  -                let isUsed = selectionSet |> List.fold (fun acc selection -> acc || variableIsUsedInSelection varName fragmentDefinitions (ref []) selection) false
  +                let isUsed = selectionSet |> List.fold (fun acc selection -> acc || variableIsUsedInSelection varName fragmentDefinitions visitedFragments selection) false
                   match operationName, isUsed with
                   | _ , true -> acc
                   | Some operationName, _ -> acc @ Error.AsResult(sprintf "Variable definition '%s' is not used in operation '%s'. Every variable must be used." varName operationName)
  
positive.code: 
      let internal validateVariablesUsesDefined (ctx : ValidationContext) =
          let fragmentDefinitions = getFragmentDefinitions ctx.Document
          ctx.Document.Definitions
          |> List.choose (function OperationDefinition def -> Some (def.Name, def.SelectionSet, def.VariableDefinitions) | _ -> None)
          |> List.fold (fun acc (operationName, selectionSet, varDefs) ->
              let path = match operationName with | Some name -> [name] | None -> []
              selectionSet |> List.fold (fun acc selection -> checkVariablesDefinedInSelection acc fragmentDefinitions (ref []) varDefs path selection) acc) Success
  
      let rec private variableIsUsedInDirective (name : string) (directive : Directive) =
          let validArgNames = directive.Arguments |> List.choose (fun x -> match x.Value with | Variable varName -> Some varName | _ -> None)
  
negative.code:                         then acc
                          else acc @ Error.AsResult(sprintf "Field or alias '%s' has a directive '%s', but this directive location is not supported by the schema definition." field.AliasOrName directive.Name, path)
                      | None -> acc) acc
              checkDirectivesInSelectionSet acc schemaInfo fragmentDefinitions path visitedFragments field.SelectionSet
          | InlineFragment frag -> checkDirectivesInFragment acc schemaInfo fragmentDefinitions path visitedFragments frag
          | FragmentSpread spread ->
              spread.Directives
              |> List.fold (fun acc directive ->
  