(
    type_object: GraphQLNamedType,
    directive_name: str,
)
return any(d.name.value == directive_name for d in directives)
Check if specified type includes a directive.
Check if specified type includes a directive.
Check if specified type includes a directive .
def includes_directive(
    type_object: GraphQLNamedType,
    directive_name: str,
) -> bool:
    """Check if specified type includes a directive."""
    if isinstance(type_object, GraphQLInputObjectType):
        return False

    directives = gather_directives(type_object)
    return any(d.name.value == directive_name for d in directives)
def includes_directive ( type_object : GraphQLNamedType , directive_name : str , ) -> bool : if isinstance ( type_object , GraphQLInputObjectType ) : return False directives = gather_directives ( type_object ) return any ( d . name . value == directive_name for d in directives )