Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple attribute filter to Index/Show Rest Actions #49

Open
feroult opened this issue Dec 21, 2015 · 3 comments
Open

Add simple attribute filter to Index/Show Rest Actions #49

feroult opened this issue Dec 21, 2015 · 3 comments

Comments

@feroult
Copy link
Owner

feroult commented Dec 21, 2015

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.

@luanpotter
Copy link
Collaborator

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

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

@rsolci
Copy link
Contributor

rsolci commented Dec 21, 2015

@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

@feroult
Copy link
Owner Author

feroult commented Dec 21, 2015

@luanpotter, agreed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants