Beispiel #1
0
        private static void CollectFieldNames(
            DelegateDirective directive,
            Types.IHasName type,
            ISet <FieldDependency> dependencies)
        {
            IImmutableStack <SelectionPathComponent> path =
                SelectionPathParser.Parse(directive.Path);

            foreach (SelectionPathComponent component in path)
            {
                foreach (string fieldName in component.Arguments
                         .Select(t => t.Value)
                         .OfType <ScopedVariableNode>()
                         .Where(t => ScopeNames.Fields.Equals(t.Scope.Value))
                         .Select(t => t.Name.Value))
                {
                    dependencies.Add(new FieldDependency(type.Name, fieldName));
                }
            }
        }
 private void UpdateContextData(
     IResolverContext context,
     IReadOnlyQueryResult result,
     DelegateDirective delegateDirective)
 {
     if (result.ContextData is { Count : > 0 })