Hi there,
Instead of applying the IsAuthenticated() directive to individual fields, I'm looking to apply this to an entire schema.
I'd wondered if this might work, but it doesn't:
authenticated_schema = gql.Schema(
query=AuthenticatedQueries,
mutation=AuthenticatedMutations,
extensions=[SchemaDirectiveExtension],
directives=[IsAuthenticated()]
)
I get a type error:
Expected type 'Iterable[StrawberryDirective]', got 'list[IsAuthenticated]' instead
And an actual error:
AttributeError: 'IsAuthenticated' object has no attribute 'arguments'.
Any thoughts?
Hi there,
Instead of applying the
IsAuthenticated()directive to individual fields, I'm looking to apply this to an entire schema.I'd wondered if this might work, but it doesn't:
I get a type error:
Expected type 'Iterable[StrawberryDirective]', got 'list[IsAuthenticated]' insteadAnd an actual error:
AttributeError: 'IsAuthenticated' object has no attribute 'arguments'.Any thoughts?