Skip to content

Commit bdc1946

Browse files
committed
feat(tool): add catalog_id filter
1 parent e81ecd7 commit bdc1946

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

apps/tool_picker/graphql/filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ class CatalogFilter:
1313
@strawberry_django.filters.filter(Tool, lookups=True)
1414
class ToolFilter:
1515
id: strawberry.ID | None
16+
catalog_id: strawberry.auto

schema.graphql

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,19 @@ type DjangoFileType {
141141
url: String!
142142
}
143143

144+
input IDBaseFilterLookup {
145+
"""Exact match. Filter will be skipped on `null` value"""
146+
exact: ID
147+
148+
"""Assignment test. Filter will be skipped on `null` value"""
149+
isNull: Boolean
150+
151+
"""
152+
Exact match of items in a given list. Filter will be skipped on `null` value
153+
"""
154+
inList: [ID!]
155+
}
156+
144157
type OffsetPaginationInfo {
145158
offset: Int!
146159
limit: Int
@@ -214,6 +227,7 @@ type ToolAnswerType {
214227
"""Model representing tool."""
215228
input ToolFilter {
216229
id: ID
230+
catalogId: IDBaseFilterLookup
217231
AND: ToolFilter
218232
OR: ToolFilter
219233
NOT: ToolFilter

0 commit comments

Comments
 (0)