dotansimha / dotansimha/graphql-code-generator

Equals-Character(=) is classified as invalid path

Open
#7,959 0 comments 3 reactions 0 assignees View on GitHub
core
Dominant language
TypeScript
Stars
11.3k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
23

Description

When using SvelteKit, you may end up with folder names like this:
- routes/
- routes/[segments=mySegments]/index.ts

If index.ts would contain a graphql-tag, `graphql-code-generator` would not be able to read from that file. I have narrowed this issue down to the `=`-Sign in my Path Url. `@graphql-tools/utils` contains a function called `isValidPath`. This function checks if the path contains a forbidden character and if its the case, it says the path is invalid.

Sadly, the equal-character is one of those forbidden characters. I have attached a diff that fixes this issue for us.
[@graphql-tools+utils+8.6.10.txt](https://github.com/dotansimha/graphql-code-generator/files/8966642/%40graphql-tools%2Butils%2B8.6.10.txt)

Apparently, the equal-sign isnt valid in FAT32. Merging our patch would likely hurt users using FAT32 - if anybody still uses that.

It would greatly help us to see this improved as it allows us to write our queries where we consume them, using graphql-tags

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.