We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
**The Problem: ** I've been looking around for a solution of sort in the official documentation, but I don't seem to find it.
**Possible solutions: ** After some Googling and found this post on Stack Overflow.
Stack Overflow: laravel-lighthouse-graphql-sorting-on-server-side
It works for me, but I'm not sure what's Repo owner/contributor on this. If this is by designed, can we make this into the official documentation?
Here's a quick look of the solution answer by: thekeymaster
type Query { user(firstName: String @eq orderBy: [OrderByClause!] @orderBy): [User!]! @paginate(type: "paginator" model: "App\\User") } type User { id: ID! firstName: String! lastName: String! birthDate: DateTime! email: String! created_at: DateTime! updated_at: DateTime! } input OrderByClause{ field: String! order: SortOrder! } enum SortOrder { ASC DESC }
query { user(count:20, firstName:"Foo", orderBy: [ { field: "birthDate" order: DESC } ]) { data { name region birthDate } } }
The text was updated successfully, but these errors were encountered:
@orderBy is the blessed solution, can you add a PR with a small section about it to https://github.com/nuwave/lighthouse/blob/master/docs/master/eloquent/getting-started.md?
@orderBy
Sorry, something went wrong.
9367531
No branches or pull requests
**The Problem: **
I've been looking around for a solution of sort in the official documentation, but I don't seem to find it.
**Possible solutions: **
After some Googling and found this post on Stack Overflow.
Stack Overflow: laravel-lighthouse-graphql-sorting-on-server-side
It works for me, but I'm not sure what's Repo owner/contributor on this. If this is by designed, can we make this into the official documentation?
Here's a quick look of the solution answer by: thekeymaster
The text was updated successfully, but these errors were encountered: