示例#1
0
def field_node_with_args(name, type_, args, loc):
    return FieldDefinitionNode(name=name,
                               arguments=args,
                               type=type_,
                               directives=[],
                               loc=loc,
                               description=None)
示例#2
0
def field_node_with_args(name: NameNode, type_: TypeNode, args: List,
                         loc: Location):
    return FieldDefinitionNode(name=name,
                               arguments=args,
                               type=type_,
                               directives=[],
                               loc=loc,
                               description=None)
示例#3
0
 def check_type_system_definition_node():
     assert not is_type_system_definition_node(Node())
     assert not is_type_system_definition_node(DocumentNode())
     assert is_type_system_definition_node(TypeSystemDefinitionNode())
     assert not is_type_system_definition_node(TypeNode())
     assert not is_type_system_definition_node(DefinitionNode())
     assert is_type_system_definition_node(TypeDefinitionNode())
     assert is_type_system_definition_node(SchemaDefinitionNode())
     assert is_type_system_definition_node(ScalarTypeDefinitionNode())
     assert is_type_system_definition_node(FieldDefinitionNode())