Skip to content

Commit

Permalink
use strawberry AnalysisStatus enum
Browse files Browse the repository at this point in the history
  • Loading branch information
dancoates committed Jun 24, 2024
1 parent 8d59fa7 commit d41a483
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/graphql/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ def to_internal_filter_mapped(self, f: Callable[[T], Y]) -> GenericFilter[Y]:
)


GraphQLAnalysisStatus = strawberry.enum(AnalysisStatus)


# The below concrete types are specified individually because there is a performance
# issue in strawberry graphql where the usage of generics in input types causes major
# slowdowns.
Expand Down Expand Up @@ -134,8 +131,11 @@ class GraphQLFilterBool(GraphQLFilter[bool]):
icontains: bool | None = None


GraphQLAnalysisStatus = strawberry.enum(AnalysisStatus)


@strawberry.input(description='Analysis status filter for GraphQL queries')
class GraphQLFilterAnalysisStatus(GraphQLFilter[AnalysisStatus]):
class GraphQLFilterAnalysisStatus(GraphQLFilter[GraphQLAnalysisStatus]):
"""Analysis status filter for GraphQL queries"""

eq: AnalysisStatus | None = None
Expand Down

0 comments on commit d41a483

Please sign in to comment.