For now, Graphql querying in Gatsby is case sensitive. But for some situations, eg., pulling tag names, it could be better to ignore cases, so that grouping tags would be less messy than this.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Not stale!
Any update on this? Or is there a workaround to achieve case insensitivity in GraphQL queries?
FWIW, my workaround is doing some data post-processing after querying. something like:
const allTags = data.allMarkdownRemark.group
let hashMap = {}
allTags.forEach(({ fieldValue, totalCount }) => {
if (hashMap[fieldValue.toLowerCase()]) {
hashMap[fieldValue.toLowerCase()] += totalCount
} else {
hashMap[fieldValue.toLowerCase()] = totalCount
}
})
let cleanTags =
Object.entries(hashMap).map(([key, value]) => ({ fieldValue: key, totalCount: value }))
I worked around this by just making all my tags lowercase. This script is handy if anyone wants to do the same: https://github.com/isaacs/blog.izs.me/blob/master/lcase-tags.js It uses js-yaml to parse and re-encode all your yaml, so it might shift some stuff around a bit. Use at your own risk, inspect the diff before committing :)
Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
Thanks for being a part of the Gatsby community! 💪💜
Hey again!
It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
Thanks again for being part of the Gatsby community!
This works fine for tags, but what about titles?
Titles need to be case insensitively sorted.
The workaround is to do the sorting in code...
@baerrach Another workaround is to provide something other than the title to sort on? It's kludgey, but you could even do something like this:
title: A Short Walk Through The Park
sortTitle: a-short-walk-through-the-park
...
And, you could perhaps define this sortTitle field when ingesting the content, so it doesn't have to be hard-coded in the markdown files.
I personally haven't found any cases where I need to sort titles alphabetically. Usually there's either some kind of narrative ordering that makes more sense (for documentation sites), so I have an explicit position number, or a date on each post (blog content).
@isaacs Great idea thanks. I'll keep that in the pocket for later.
I'm already converting markdown front matter to fields so I can consistently treat nodes the same across my gatsby spaces.
It wouldn't be a huge burden to add another field for this type of thing.
I use https://www.gatsbyjs.org/packages/gatsby-plugin-node-fields/ to make this easier.
+1 — this is more than an issue of casing, though; Gatsby should offer a way to specify the collation ordering. Otherwise accented characters are also not westernized before sorting, so “épicerie” shows up after “zulu”, which is not what is actually desired in the vast majority of cases.
@KyleAMathews What are your thoughts on the above? Would this sort of change be accepted into Gatsby? If so, can someone on the team point toward the source responsible for sorting today?
Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 💪💜
Not stale !
Anyone working on this one?
Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 💪💜
Hey again!
It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community! 💪💜
Not Stale! Still looking for a solution
Are there any updates regarding the support of accented characters sorting as mentioned by @coreyward?
Most helpful comment
Not stale!