Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type generation for custom scallars #2718

Closed
steida opened this issue May 5, 2019 · 4 comments
Closed

Type generation for custom scallars #2718

steida opened this issue May 5, 2019 · 4 comments

Comments

@steida
Copy link

steida commented May 5, 2019

Something like this:

backingTypeMap: {
  EmailAddress: 'string',
  DateTime: 'string',
  Max1024Chars: 'string',
  Max140Chars: 'string',
  URL: 'string',
},

It would be awesome.

@TrySound
Copy link
Contributor

TrySound commented May 5, 2019

I currently solve this by copying RelayCompilerBin and RelayCopilerMain into the project and replacing empty customScalars: {} with this.

        customScalars: {
          Date: 'String',
          DateTime: 'String',
        }

AFAIK guys discuss config file which should solve this problem.

@zth
Copy link
Contributor

zth commented May 6, 2019

I do the same thing, replace in the generated compiler bin and then check that into VCS. Not ideal, a config file would be very nice.

@sibelius
Copy link
Contributor

sibelius commented May 6, 2019

Right now you can use patch-package to make this easier

The right solution is a relay.config.js

@alloy
Copy link
Contributor

alloy commented May 27, 2019

This seems a duplicate of #2162, for which there’s a PR at #2745.

@alloy alloy closed this as completed May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants