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

problem on sorting with graphql #3065

Closed
pinaudnico opened this issue Nov 29, 2017 · 5 comments
Closed

problem on sorting with graphql #3065

pinaudnico opened this issue Nov 29, 2017 · 5 comments
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation type: question or discussion Issue discussing or asking a question about Gatsby

Comments

@pinaudnico
Copy link

I try something like this:
allImageSharp (sort: {fields:id}){
edges {
node {
sizes {
src
originalImg
originalName
}
}
}
}

it works on the graphiQL web window but when I put it in my gatsby it says
GraphQLError: Argument "sort" has invalid value {fields: "id"}.
In field "fields": Expected type "ImageSharpConnectionSortByFieldsEnum", found "id".

Any ideas ? Thanks.

@pinaudnico
Copy link
Author

Ok I've found it :
allImageSharp (sort: {fields: [id]})
Enjoy...

@kristojorg
Copy link

Thank uuuuuuuu @pinaudnico

@dardub
Copy link
Contributor

dardub commented Jan 22, 2018

Is this documented anywhere? I couldn't find it even with the new docs search. :)

@pinaudnico
Copy link
Author

I've found it experimenting...

@fk fk added GraphQL type: question or discussion Issue discussing or asking a question about Gatsby type: documentation An issue or pull request for improving or updating Gatsby's documentation labels Jan 29, 2018
@jonathanbell
Copy link

@pinaudnico THANK YOU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation type: question or discussion Issue discussing or asking a question about Gatsby
Projects
None yet
Development

No branches or pull requests

5 participants