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 unicode folding to sanitizeGraphqlName #440

Open
ComLock opened this issue Jan 9, 2024 · 0 comments
Open

Add unicode folding to sanitizeGraphqlName #440

ComLock opened this issue Jan 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ComLock
Copy link
Member

ComLock commented Jan 9, 2024

Guillotine will use unicode folding to produce valid GraphQL names:
http://spec.graphql.org/October2021/#sec-Names

nextjs-adapter needs to do the same or it can generate queries with names that are just a bunch of underscores and doesn't match what guillotine has.

I've already done this in Explorer.
And I've made a fold function available in @enonic/js-utils
https://github.com/enonic/npm-js-utils/blob/main/string/fold.ts

We could import that, or make a copy.

@ComLock ComLock added the bug Something isn't working label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant