dotansimha / dotansimha/graphql-code-generator-community

typescript-urql plugin ignores `documentMode`

Open
#143 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

**Describe the bug**
typescript-urql plugin ignores `documentMode` `importDocumentNodeExternallyFrom` and `importOperationTypesFrom` settings

**To Reproduce**
```
schema: schema.graphql
documents: document.graphql
generates:
types.ts:
plugins:
- typescript
- typescript-operations
urql.ts:
plugins:
- "typescript-urql"
config:
documentMode: "external"
importDocumentNodeExternallyFrom: "./types.ts"
```

As you can see here the generated file ignores the external document mode.
https://codesandbox.io/s/confident-dream-l0sd5?file=/urql.ts

**Expected behavior**
To have the generated urql hooks to reference the external type file

This issue looks like the same from https://github.com/dotansimha/graphql-code-generator/pull/4765 and I've used the code from there to fix this issue

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.