dotansimha / dotansimha/graphql-code-generator

Non-primitive types are duplicated in the config schema

Open
#9,065 2 comments 8 reactions 0 assignees View on GitHub
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?

_No response_

### Describe the bug

There's an issue on the website with the generated config schema for properties with a non-primitive type, definitions will be duplicated as such: `ScalarsMap`, `ScalarsMap_1`, `ScalarsMap_2`, etc...

Additionally to that, I don't know if this is related, but examples are missing when the type is a duplicated definition (or just a non-primitive type?).

### Your Example Website or App

https://the-guild.dev/graphql/codegen/plugins/typescript/typescript#scalars

### Steps to Reproduce the Bug or Issue

- [`typescript/typescript#scalars`](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript#scalars)
- [`typescript/typescript#namingconvention`](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript#namingconvention)
- [`typescript/typescript-operations#scalars`](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-operations#scalars)
- [`typescript/typescript-operations#namingconvention`](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-operations#namingconvention)
- [`typescript/typescript-nhost#scalars`](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-nhost#scalars)
- [`c-sharp/c-sharp-operations#scalars`](https://the-guild.dev/graphql/codegen/plugins/c-sharp/c-sharp-operations#scalars)
- [`c-sharp/c-sharp-operations#namingconvention`](https://the-guild.dev/graphql/codegen/plugins/c-sharp/c-sharp-operations#namingconvention)
- [`typescript/typescript-resolvers#scalars`](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-resolvers#scalars)
- [`typescript/typescript-resolvers#namingconvention`](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-resolvers#namingconvention)
- [`typescript/typescript-document-nodes#scalars`](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-document-nodes#scalars)
- [`typescript/typescript-document-nodes#namingconvention`](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-document-nodes#namingconvention)

Screenshot:
Screenshot 2023-02-24 at 3 20 35 PM

### Expected behavior

Screenshot 2023-02-24 at 3 46 11 PM

### Screenshots or Videos

_No response_

### Platform

N/A, related to the website.

### Codegen Config File

_No response_

### Additional context

_No response_

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.