dotansimha / dotansimha/graphql-code-generator
Timestamp scalar clashes with Hasuras timestamp scalar
- 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/typescript
### Describe the bug
The `Timestamp` scalar from [graphql-scalars](https://the-guild.dev/graphql/scalars/docs) clashes with Hasura's `timestamp` scalar.
We get the following error when using the generated TypeScript code:
```
TS2717: Subsequent property declarations must have the same type. Property 'name' must be of type '"Timestamp"', but here has type '"timestamp"'.
56869 |
56870 | export interface TimestampScalarConfig extends GraphQLScalarTypeConfig {
> 56871 | name: 'timestamp';
| ^^^^
56872 | }
```
How do we fix this?
Can we maybe rename `TimestampScalarConfig` to `HasuraTimestampScalarConfig`?
### Your Example Website or App
.
### Steps to Reproduce the Bug or Issue
.
### Expected behavior
.
### Screenshots or Videos
_No response_
### Platform
- OS: [e.g. macOS, Windows, Linux]
- NodeJS: [e.g. 18.5.0]
- `graphql` version: [e.g. 16.3.0]
- `@graphql-codegen/*` version(s): [e.g. 2.6.2]
### Codegen Config File
```yaml
overwrite: true
generates:
...:
schema: ...
documents: ...
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-resolvers'
- 'typescript-graphql-request'
config:
dedupeFragments: true
legacyMode: true
arrayInputCoercion: false
immutableTypes: true
documentMode: 'documentNodeImportFragments'
```
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.