Skip to content

Commit 054fa48

Browse files
committed
fix: search with filter not working in GetResources queries
1 parent 05a48b7 commit 054fa48

File tree

2 files changed

+19
-3
lines changed
  • apps/back-office/src/app/dashboard/pages/dashboard/components/context-datasource/graphql
  • libs/safe/src/lib/components/widgets/map-settings/graphql

2 files changed

+19
-3
lines changed

apps/back-office/src/app/dashboard/pages/dashboard/components/context-datasource/graphql/queries.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,18 @@ export interface GetResourceQueryResponse {
2020
// === GET RESOURCES ===
2121
/** Graphql request for getting resources */
2222
export const GET_RESOURCES = gql`
23-
query GetResources($first: Int, $afterCursor: ID, $sortField: String) {
24-
resources(first: $first, afterCursor: $afterCursor, sortField: $sortField) {
23+
query GetResources(
24+
$first: Int
25+
$afterCursor: ID
26+
$sortField: String
27+
$filter: JSON
28+
) {
29+
resources(
30+
first: $first
31+
afterCursor: $afterCursor
32+
sortField: $sortField
33+
filter: $filter
34+
) {
2535
edges {
2636
node {
2737
id

libs/safe/src/lib/components/widgets/map-settings/graphql/queries.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,16 @@ export const GET_RESOURCES = gql`
5252
$first: Int
5353
$afterCursor: ID
5454
$sortField: String
55+
$filter: JSON
5556
$layout: [ID!]
5657
$aggregation: [ID!]
5758
) {
58-
resources(first: $first, afterCursor: $afterCursor, sortField: $sortField) {
59+
resources(
60+
first: $first
61+
afterCursor: $afterCursor
62+
sortField: $sortField
63+
filter: $filter
64+
) {
5965
edges {
6066
node {
6167
id

0 commit comments

Comments
 (0)