Relay-compiler-language-typescript: Enums not generating correctly with Relay 8

Created on 20 Dec 2019  路  6Comments  路  Source: relay-tools/relay-compiler-language-typescript

Hi, we tried to upgrade Relay to version 8 with this language plugin but the generated enums look a bit fishy, see:

@@ -2,7 +2,7 @@

 import { ReaderFragment } from "relay-runtime";
 import { FragmentRefs } from "relay-runtime";
-export type LabelColor = "BLUE" | "GRAY" | "GREEN" | "PURPLE" | "RED" | "YELLOW" | "%future added value";
+export type LabelColor = "%future added value" | "%future added value" | "%future added value" | "BLUE" | "GRAY" | "GREEN" | "PURPLE" | "RED" | "YELLOW" | "%future added value";
 export type Label_label = {
     readonly colorName: LabelColor | null;
     readonly name: string | null;

Notice the %future added value placeholder duplicates. Changelog which mentions the enums as well: https://github.com/facebook/relay/releases/tag/v8.0.0

Thanks for having a look! :)

Most helpful comment

All 6 comments

Oof, good catch. Is this the only issue you have spotted? (In which case I assume there鈥檚 no actual fallout?)

@alloy Hi! It seems like that's the only issue so far. :)

does the PR solves your problem?

Not 100% sure (didn't try) but this error should be visible there when upgrading Relay (there is a test fixture for such enums). So I'd say yes. 馃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

unludo picture unludo  路  9Comments

sorenhoyer picture sorenhoyer  路  3Comments

cberkom picture cberkom  路  15Comments

sgwilym picture sgwilym  路  7Comments

artola picture artola  路  14Comments