anchor.diff:                  |> Map.ofList
               selectionSet, varNamesAndTypeRefs)
           |> List.fold (fun acc (selectionSet, varNamesAndTypeRefs) ->
  -            selectionSet |> List.fold (fun acc selection -> checkVariableUsageAllowedOnSelection acc varNamesAndTypeRefs (ref []) selection) acc) Success
  +            selectionSet |> List.fold (fun acc selection -> checkVariableUsageAllowedOnSelection acc varNamesAndTypeRefs visitedFragments selection) acc) Success
   
       let private allValidations =
           [ validateFragmentsMustNotFormCycles
  
positive.code:                         | Some operationName -> acc @ Error.AsResult(sprintf "%s operation '%s' has a directive '%s', but this directive location is not supported by the schema definition." (operation.OperationType.ToString()) operationName directive.Name, path)
                          | None -> acc @ Error.AsResult(sprintf "This %s operation has a directive '%s', but this directive location is not supported by the schema definition." (operation.OperationType.ToString()) directive.Name, path)
                  | None -> acc) acc
          operation.SelectionSet |> List.fold (fun acc selection -> checkDirectivesInValidLocationOnSelection acc schemaInfo fragmentDefinitions path selection) acc
  
      let internal validateDirectivesAreInValidLocations (ctx : ValidationContext) =
          let fragmentDefinitions = ctx.FragmentDefinitions |> List.map (fun x -> x.Definition)
          ctx.Document.Definitions
          |> List.fold (fun acc def ->
              let path = match def.Name with | Some name -> [name] | None -> []
              match def with
              | OperationDefinition odef -> checkDirectivesInOperation acc ctx.Schema fragmentDefinitions path odef
              | FragmentDefinition frag -> checkDirectivesInFragment acc ctx.Schema fragmentDefinitions path (ref []) frag) Success
  
      let rec private getDirectiveNamesInSelection (path : Path) (selection : Selection) : (Path * string list) list =
          match selection with
  
negative.code: 
      let internal validateVariablesUsesDefined (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) ->
              let path = match operationName with | Some name -> [name] | None -> []
              selectionSet |> List.fold (fun acc selection -> checkVariablesDefinedInSelection acc fragmentDefinitions visitedFragments 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)
  