Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/two-moose-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@graphprotocol/hypergraph-react": patch
"@graphprotocol/hypergraph": patch
---

add value filtering for useQuery(Type, { mode: "public", … })

5 changes: 5 additions & 0 deletions apps/events/src/components/playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export const Playground = ({ spaceId }: { spaceId: string }) => {
jobOffers: {},
},
},
// filter: {
// name: {
// startsWith: 'test',
// },
// },
first: 100,
space: spaceId,
});
Expand Down
12 changes: 5 additions & 7 deletions docs/docs/filtering-query-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

The filter API allows you to filter the results of a query by property values and in the future also by relations.

Note: Filtering is not yet supported for public data.

## Filtering by property values

```tsx
Expand Down Expand Up @@ -89,8 +87,8 @@ The filter API supports different filters for different property types and offer
const { data } = useQuery(Person, {
filter: {
or: [
not: { name: { is: "Jane Doe" } },
not: { name: { is: "John Doe" } },
{ not: { name: { is: 'Jane Doe' } } },
{ not: { name: { is: 'John Doe' } } },
],
},
});
Expand All @@ -99,11 +97,11 @@ const { data } = useQuery(Person, {
const { data } = useQuery(Person, {
filter: {
age: {
equals: 42
is: 42
},
or: [
not: { name: { is: "Jane Doe" } },
not: { name: { is: "John Doe" } },
{ not: { name: { is: 'Jane Doe' } } },
{ not: { name: { is: 'John Doe' } } },
],
not: {
or: [
Expand Down
Loading
Loading