dotansimha / dotansimha/graphql-code-generator-community

near-operation-file-preset: Cannot use flattenGeneratedTypes w/ fragments across files

Open
#112 9 comments 10 reactions 1 assignee Claimed by @eddeee888 View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

**Describe the bug**
Using the `flattenGeneratedTypes` option (required to workaround [https://github.com/dotansimha/graphql-code-generator/issues/4212]()) causes GraphQL to fail to locate fragments when using `near-operation-file-preset` and the fragments are located in other files (regardless whether the queries are written in `.graphql` or `.ts` files w/ imports).

Similar to [https://github.com/dotansimha/graphql-code-generator/issues/528]()

**To Reproduce**
[https://codesandbox.io/s/empty-fast-xl915?file=/codegen.yml]()

**Expected behavior**
Should compile fine with or without `flattenGeneratedTypes`.

**Environment:**
n/a

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.