-
Notifications
You must be signed in to change notification settings - Fork 210
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
orderBy Query Parameter #320
Comments
By Query composer you have the
Just send the values what you want in body or, like you said, in you query string. You have another options, see http://nsipplswezey.github.io/nodal/docs/graphql.html |
@nogsantos Thanks for the help. I ended up doing the following: Created a function to parse the orderBy query.
Used the function inside my index method.
That worked for me. |
@edgar971 you should use __order instead of __orderBy param in your HTTP request. So in your case it will be looks like |
Hi,
I was searching through the documentation and example tutorials and I couldn't figure out how to use sortBy with query parameters. I want to be able to make API calls like
http://localhost:8080/v1/sites?__orderBy=created_at,DESC
to have a custom sort. Is there a way to do this natively with Nodal? I also tried the following versions:The controller looks like this:
Thanks!
The text was updated successfully, but these errors were encountered: