yawp icon indicating copy to clipboard operation
yawp copied to clipboard

Add simple attribute filter to Index/Show Rest Actions

Open feroult opened this issue 8 years ago • 3 comments

Imagina an Endpoint:

public class Person {
  @Id
  IdRef<Person> id;

  @Index
  String name;

  @Index
  IdRef<Address> addressId;
}

We can have an automatic API like this: /api/people?name=john.

Finally, if it is an IdRef attribute, we can convert it automatically: /api/people?addressId=10

Today it is possible to achieve those simple APIs with the aid of a Hook.

feroult avatar Dec 21 '15 11:12 feroult

What about /api/people?q={w:['name, '=', 'John']}?

We can keep both, the new for simplicity and the current for completeness.

luanpotter avatar Dec 21 '15 12:12 luanpotter

@luanpotter this is getting close to what Facebook presented early this year with graphql: https://facebook.github.io/react/blog/2015/05/01/graphql-introduction.html

rsolci avatar Dec 21 '15 12:12 rsolci

@luanpotter, agreed!

feroult avatar Dec 21 '15 20:12 feroult