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

Global types #3038

Closed
c0m1t opened this issue Mar 5, 2020 · 4 comments
Closed

Global types #3038

c0m1t opened this issue Mar 5, 2020 · 4 comments

Comments

@c0m1t
Copy link

c0m1t commented Mar 5, 2020

I looked over the relay documentation and I could not find my answer anywhere.
Im wondering if there is a thing like global types as in apollo.

For instance I have an enum which I use in different components, each time relay defines that enum over and over. Although that enum is something global.

@sibelius
Copy link
Contributor

sibelius commented Mar 5, 2020

yes

check this relay-tools/relay-compiler-language-typescript#175

we just need to implement it

wanna try it out?

@c0m1t
Copy link
Author

c0m1t commented Mar 7, 2020

@sibelius
I couldnt find any reference to RelayGraphQlEnumsGenerator in relay-compiler.
How would it will be called inside relay-compiler?
Shouldnt relay-compiler have a config named --enumGenerator or something?

@c0m1t
Copy link
Author

c0m1t commented Mar 20, 2020

#3051

@c0m1t
Copy link
Author

c0m1t commented Mar 22, 2020

I dont think relay has any intention to make this possible, so we wrote a package for this purpose:
relay-enum-generator.

@c0m1t c0m1t closed this as completed Mar 22, 2020
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

2 participants