Enhancement of the customScalars format for typescript
Open
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
As of today, the customScalars format is straightforward, just a string / string mapping, and then limit the use of custom scalars to native types.
The customScalars format can be enhanced to support more complex types:
A proposal can be:
```typescript
const customScalars = {
MyType: {
type: 'MyType',
module: '../myModule'
},
MySimpleString: 'String'
}
```
this will add
```typescript
import { MyType } from '../myModule';
```
in the generated file.
Do you agree with that format?
I can do a PR on the [relay-tools/relay-compiler-language-typescript](/relay-tools/relay-compiler-language-typescript) repo.
Contributor guide
Assessment
This issue has not been assessed yet.