graffy icon indicating copy to clipboard operation
graffy copied to clipboard

Server should support more REST-like paths

Open aravindet opened this issue 5 years ago • 1 comments

This is a nice-to-have for 1.0.

As a prerequisite, we should add a soft convention for naming indexes, e.g. as '$<index_name>`, then we can do:

  • /posts?by=time&first=10&fields=slug,title,at,authors(first:1,name,avatar) should become:

    {
      'posts$time': [ { first: 10 }, {
        slug: 1, title: 1, at: 1,
        authors: [ { first: 1}, {
          name: 1, avatar: 1
        } ]
      } ]
    }
    
  • GET /posts/123?fields=slug,title,at,author(name,avatar) should become:

    {
      'posts': { 123: {
        slug: 1, title: 1, at: 1,
        author: { name: 1, avatar: 1 }
      } }
    }
    

aravindet avatar Nov 02 '19 02:11 aravindet