Giter Club home page Giter Club logo

Comments (4)

alloy avatar alloy commented on July 24, 2024

That renaming of inputFieldWhiteList to optionalInputFields looks good to me, care to make a PR?

As for the second issue, that seems a bit more suspect to me. Could you try to reproduce it by upgrading the example app in this repo to 1.7.0?

from relay-compiler-language-typescript.

johntran avatar johntran commented on July 24, 2024

I'm fine with making a PR. Couple questions:

  • Would you want it to be backwards compatible?

It would look like

const props = Object.keys(fields)
  .map(key => fields[key])
  .filter(
    field =>
      // Relay 1.6.2 and below
      (state.inputFieldWhiteList &&
        state.inputFieldWhiteList.indexOf(field.name) < 0) ||
      // Relay 1.7.0
      (state.optionalInputFields &&
        state.optionalInputFields.indexOf(field.name) < 0),
  );
  • Is adding optionalInputField as an optional type and making inputFieldWhiteList an optional type ok?

I'll get back to you with a reproduction repo.

from relay-compiler-language-typescript.

kastermester avatar kastermester commented on July 24, 2024

@johntran Idk about @alloy - but personally I don't see the need to make it backwards compatible. Relay does not officially support this plugin before v1.7.x - it was only supported through a fork that @alloy has maintained. I do think we need to worry as much as possible about backwards compatibility going forward though.

from relay-compiler-language-typescript.

alloy avatar alloy commented on July 24, 2024

Due to other reasons upgrading to the latest relay isn’t trivial for us, but until any other new features/big fixes would be added there’s also no real reason for us to upgrade the plugin, so I’m fine with no backwards compatibility for this change 👍

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.