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
Document UserOrderByInput #15
Comments
I found one here:
I don't know if I'm a fan of |
The naming There is an issue if we need to sort on several fields or on a field from a relation. Proposition : query { users(orderBy: [UserOrderByInput] ): [User!]}
query { users(orderBy: [role_ASC, name_DESC] ) {name}} query {
user(login:"GromNaN") {
issues(first:100, orderBy:{field:COMMENTS, direction:ASC}) {
edges {
node {
id
title
}
}
}
}
} |
Could the orderBy: UserOrderByInput! | [UserOrderByInput!]! Assuming GraphiQL and other tools handle this right, they would still provide auto-completion for |
Input type be a union is not supported (yet). graphql/graphql-spec#488 |
While GraphQL does not support union input types, a single input element is actually coerced into a single item list, so in this case we don't need a union type :-) See: prisma/prisma#95 (comment) |
It'd be nice to show an example for the UserOrderByInput type.
The text was updated successfully, but these errors were encountered: