graphql-python / graphql-core

A Python 3.6+ port of the GraphQL.js reference implementation of GraphQL.
MIT License
512 stars 136 forks source link

Use type guards for `language.predicates` #192

Closed nrbnlulu closed 1 year ago

nrbnlulu commented 1 year ago

currently 3.2.3 implemented like this

def is_definition_node(node: Node) -> bool:
    """Check whether the given node represents a definition."""
    return isinstance(node, DefinitionNode)

def is_executable_definition_node(node: Node) -> bool:
    """Check whether the given node represents an executable definition."""
    return isinstance(node, ExecutableDefinitionNode)
nrbnlulu commented 1 year ago

whops seems like this is solved in #183