You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can filter entities based on whether a relation or backlink exists:
151
+
152
+
```tsx
153
+
const { data } =useEntities(Todo, {
154
+
filter: {
155
+
assignees: { exists: true },
156
+
},
157
+
});
158
+
```
159
+
160
+
### Filter by entity ID
161
+
162
+
You can filter entities by which specific entity is on the other end of a relation or backlink. This is useful when you want to find all entities connected to a specific entity.
163
+
164
+
```tsx
165
+
// string shorthand
166
+
const { data } =useEntities(Todo, {
167
+
filter: {
168
+
assignees: { entityId: 'user-id' },
169
+
},
170
+
});
171
+
172
+
// object form with `is`
173
+
const { data } =useEntities(Todo, {
174
+
filter: {
175
+
assignees: { entityId: { is: 'user-id' } },
176
+
},
177
+
});
178
+
179
+
// object form with `in` to match multiple entities
0 commit comments