Giter Club home page Giter Club logo

Comments (6)

sibelius avatar sibelius commented on July 24, 2024

This is to be type safe for future enum values

you could add more enum types for your graphql schema and it won't break old apps

from relay-compiler-language-typescript.

alloy avatar alloy commented on July 24, 2024

For more info see eg this upstream issue facebook/relay#2351

from relay-compiler-language-typescript.

artola avatar artola commented on July 24, 2024

@sibelius @alloy thanks for your prompt reply. From my point of view, a type system makes sense when you enforce it, and this kind of entry is not needed as stated in the upstream issue.
Anyway, see the code introduced in the upstream where is possible to use the flag noFutureProofEnums to avoid them.

https://github.com/facebook/relay/blob/f54557df14f992ce175153913736eed3e2419d7c/packages/relay-compiler/language/javascript/RelayFlowGenerator.js#L535

from relay-compiler-language-typescript.

alloy avatar alloy commented on July 24, 2024

Yup, that simply wasn’t ported over yet because we don’t use that option. A issue for this exists #80

from relay-compiler-language-typescript.

artola avatar artola commented on July 24, 2024

@alloy Sorry I did not see #80 ... absolutely same.

from relay-compiler-language-typescript.

alloy avatar alloy commented on July 24, 2024

No worries!

from relay-compiler-language-typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.