facebook/relay

Provide option for `casting_syntax=as` for `relay.config.js` when `language` is `flow`

short-dsb opened this issue · 0 comments

We’d like to enable casting_syntax=as in our project’s .flowconfig, however the generated Flow types from the Relay compiler use the old : syntax, resulting in thousands of invalid-type-cast-syntax errors, which makes it difficult to identify the cases in our codebase that require updating.

It would be nice if there were an option for relay.config.js where we could opt-in to the new syntax, as it will eventually become the default.

At some point in the future we will remove the option and only support “as” casts, so code update your codebase!

Thanks for looking!