Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 610 Bytes

finding-records.md

File metadata and controls

35 lines (28 loc) · 610 Bytes

Finding Records

Finding One Item By Id

return this.store.findRecord('user', 1, {
  include: 'posts',
});

Finding All Items

return this.store.findAll('post', {
  include: 'user',
});

Filtering

return this.store.query('post', {
  include: 'user,comments',
  filter: (ref) => {
    return ref
      .order('created_at', {
        ascending: false,
      })
      .limit(100);
  },
});

See https://supabase.com/docs/reference/javascript/using-filters for example filters that can be used.