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 secondary fields to www query sorts #10085

Merged
merged 1 commit into from
Nov 22, 2018

Conversation

Moocar
Copy link
Contributor

@Moocar Moocar commented Nov 22, 2018

While working on loki (#9919), I've run into lots of fun edge cases to do with sorting. One is that some connection queries specify a sort order, but some returned fields have the same value for the sort field. The behavior here is undefined, but by default sift will order by the order they were added to Gatsby. While that's not a terrible default, it makes testing sift and loki compatibility hard, since loki has undefined ordering for this case.

So this PR adds a specific secondary sort key to various www queries, mainly for the purpose of testing sift/loki compatibility, but also because it makes sense.

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Moocar!

@pieh pieh merged commit bcb03a6 into gatsbyjs:master Nov 22, 2018
pieh pushed a commit that referenced this pull request Nov 22, 2018
…tem section (#10096)

Instead by `slug` we sort the starters by `stars` (DESC) - solving #10085 (comment)
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
While working on loki (gatsbyjs#9919), I've run into lots of fun edge cases to do with sorting. One is that some connection queries specify a sort order, but some returned fields have the same value for the sort field. The behavior here is undefined, but by default sift will order by the order they were added to Gatsby. While that's not a terrible default, it makes testing sift and loki compatibility hard, since loki has undefined ordering for this case.

So this PR adds a specific secondary sort key to various `www` queries, mainly for the purpose of testing sift/loki compatibility, but also because it makes sense.
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
…tem section (gatsbyjs#10096)

Instead by `slug` we sort the starters by `stars` (DESC) - solving gatsbyjs#10085 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants