yawp
yawp copied to clipboard
Add simple attribute filter to Index/Show Rest Actions
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.
What about /api/people?q={w:['name, '=', 'John']}
?
We can keep both, the new for simplicity and the current for completeness.
@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
@luanpotter, agreed!