Пример #1
0
        private void VisitOperationTypeDefinition(
            OperationTypeDefinitionNode node,
            ISyntaxWriter writer)
        {
            writer.WriteIndent(_indented);

            writer.Write(node.Operation.ToString().ToLowerInvariant());
            writer.Write(": ");
            writer.WriteNamedType(node.Type);
        }
Пример #2
0
 protected sealed override ISyntaxVisitorAction Enter(
     ISyntaxNode node,
     ISyntaxVisitorContext context)
 {
     return(node switch
     {
         DocumentNode n => Enter(n, context),
         OperationDefinitionNode n => Enter(n, context),
         VariableDefinitionNode n => Enter(n, context),
         VariableNode n => Enter(n, context),
         SelectionSetNode n => Enter(n, context),
         FieldNode n => Enter(n, context),
         ArgumentNode n => Enter(n, context),
         FragmentSpreadNode n => Enter(n, context),
         InlineFragmentNode n => Enter(n, context),
         FragmentDefinitionNode n => Enter(n, context),
         DirectiveNode n => Enter(n, context),
         NamedTypeNode n => Enter(n, context),
         ListTypeNode n => Enter(n, context),
         NonNullTypeNode n => Enter(n, context),
         ListValueNode n => Enter(n, context),
         ObjectValueNode n => Enter(n, context),
         ObjectFieldNode n => Enter(n, context),
         IValueNode n => Enter(n, context),
         SchemaDefinitionNode n => Enter(n, context),
         OperationTypeDefinitionNode n => Enter(n, context),
         ScalarTypeDefinitionNode n => Enter(n, context),
         ObjectTypeDefinitionNode n => Enter(n, context),
         FieldDefinitionNode n => Enter(n, context),
         InputValueDefinitionNode n => Enter(n, context),
         InterfaceTypeDefinitionNode n => Enter(n, context),
         UnionTypeDefinitionNode n => Enter(n, context),
         EnumTypeDefinitionNode n => Enter(n, context),
         EnumValueDefinitionNode n => Enter(n, context),
         InputObjectTypeDefinitionNode n => Enter(n, context),
         DirectiveDefinitionNode n => Enter(n, context),
         SchemaExtensionNode n => Enter(n, context),
         ScalarTypeExtensionNode n => Enter(n, context),
         ObjectTypeExtensionNode n => Enter(n, context),
         InterfaceTypeExtensionNode n => Enter(n, context),
         UnionTypeExtensionNode n => Enter(n, context),
         EnumTypeExtensionNode n => Enter(n, context),
         InputObjectTypeExtensionNode n => Enter(n, context),
         _ => throw new NotSupportedException()
     });
Пример #3
0
 protected virtual ISyntaxVisitorAction Enter(
     OperationTypeDefinitionNode node,
     ISyntaxVisitorContext context) =>
 DefaultAction;
Пример #4
0
 protected virtual void VisitOperationTypeDefinition(OperationTypeDefinitionNode node)
 {
 }
Пример #5
0
 protected override void VisitOperationTypeDefinition(
     OperationTypeDefinitionNode node,
     TypeDefinitionItem context)
 {
     VisitNamedType(node.Type, context);
 }