dotansimha / dotansimha/graphql-code-generator
Folders with a "=" in the name are ignored.
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Which packages are impacted by your issue?
@graphql-codegen/cli, @graphql-codegen/core, @graphql-codegen/client-preset
### Describe the bug
The generator does not take into account files inside a folder with the character **`=`**
Example: The file **`./src/routes/[[page=int]]/my_queries.ts`** will be ignored by the generator.
However, it is a classic folder pattern if you use sveltekit.
### Your Example Website or App
https://github.com/maarekj/graphql-code-generator-bug
### Steps to Reproduce the Bug or Issue
```
git clone https://github.com/maarekj/graphql-code-generator-bug
cd graphql-code-generator-bug
yarn install
yarn run codegen
```
**output**
```
> yarn run codegen
yarn run v1.22.18
$ graphql-codegen --config codegen.ts
✔ Parse Configuration
⚠ Generate outputs
❯ Generate to src/generated/
✔ Load GraphQL schemas
✖
Unable to find any GraphQL type definitions for the following pointers:
- ./src/**/*.ts
◼ Generate
error Command failed with exit code 1.
```
### Expected behavior
The generator will have to take the file into account. If we move the file inside ./src, everything works.
### Platform
- OS: Linux
- NodeJS: *
- `graphql` version: *
- `@graphql-codegen/cli`: 3.0.0
- `@graphql-codegen/client-preset`: 2.0.0
### Codegen Config File
```typescript
import type { CodegenConfig } from "@graphql-codegen/cli";
const config: CodegenConfig = {
overwrite: true,
schema: "./schema.graphql",
documents: ["./src/**/*.ts"],
generates: {
"src/generated/": {
preset: "client",
plugins: [],
},
},
};
export default config;
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.