Skip to content

Releases: facebook/relay

v1.0.0-alpha.4

18 Apr 06:28
Compare
Choose a tag to compare
v1.0.0-alpha.4 Pre-release
Pre-release

Changes since v1.0.0-alpha.3

  • Solved a number of bugs when using the relay-compiler binary

v1.0.0-alpha.3

17 Apr 19:16
Compare
Choose a tag to compare
v1.0.0-alpha.3 Pre-release
Pre-release

Check it out!

npm install babel-plugin-relay@dev react-relay@dev relay-compiler@dev relay-runtime@dev

Changes since v1.0.0-alpha.2:

  • Lots of bug fixes, improvements to ease of use and API clarity.

  • The all new babel plugin: babel-plugin-relay now handles both modern graphql literals and classic Relay.QL literals. The existing babel-relay-plugin will be deprecated in the future. Configuring babel-plugin-relay should be easier as it now relies on modern babel conventions.

    An example .babelrc file:

    {
      "plugins": [
        ["relay", {"schema": "path/to/schema.graphql"}]
      ]
    }
    
  • Flow types are now generated inline in the relay-compiler output, so Relay Modern projects can leverage flow typed GraphQL responses. Recently flow types were added to the results of GraphQL mutations as well.

  • Generated files are now created inline with your source in __generated__ directories. This makes it easier to require the generated files and simplifies configuring the compiler (no more --out flag).

  • Support for prototype "live" queries via polling (88d09dc)

v1.0.0-alpha.2

10 Apr 17:54
Compare
Choose a tag to compare
v1.0.0-alpha.2 Pre-release
Pre-release

New additions since alpha.1:

  • Many bugs fixed found in the first Alpha
  • Travis CI builds are now green - all tests passing, yay! (Last passing build)
  • relay-compiler now comes with a bin of the same name you can run on your codebase
  • Support for GraphQL subscriptions!

Get Started:

npm install react-relay@dev relay-compiler@dev babel-plugin-relay@dev

Any existing Relay Classic code will need to replace require('react-relay') with require('react-relay/classic').

v1.0.0-alpha.1

31 Mar 02:11
Compare
Choose a tag to compare
v1.0.0-alpha.1 Pre-release
Pre-release

This is the first public alpha release of Modern Relay. While this release is pretty sparse on details and documentation, we wanted to get code to you soon so you can help us kick the tires and most importantly make sure that your existing apps are still working.

Install react-relay@dev to get this and future alpha releases.

After installing v1.0.0, existing applications will need to replace require('react-relay') with require('react-relay/classic').

v0.10.0

12 Dec 21:58
Compare
Choose a tag to compare
  • Update babel-relay-plugin to use graphql@0.8.2, which supports the latest revision of the GraphQL specification.
  • Fix an issue with custom scalar field arguments not printing correctly.
  • Promoted RelayGraphQLMutation to public API.
  • Added rollback method to RelayGraphQLMutation.
  • Added initial preparatory changes for moving to the new Relay API methods in a future release (eg. BabelPluginGraphQL).
  • Avoid unnecessary un-ready updates.
  • Add graphiqlPrinter argument to the RelayNetworkDebug constructor that can be used to print a link to view the request in GraphiQL.
  • Fix problem using "node" as a key in a mutation response payload.

v0.9.3

01 Sep 23:40
Compare
Choose a tag to compare
  • Fix issue where containers would forget variables previously set with setVariables, specifically when using array/object variables (closes #1357).
  • Add Relay.disableQueryCaching API (closes #754), which may be useful running Relay in a server context.
  • Suppress spurious warning when using IGNORE as a rangeBehavior (closes #1337).
  • Use a more accurate query name based on current route in RelayQuery.cloneWithRoute (see commit de954992), making logging and analytics that relies on query names more accurate.
  • RelayNetworkDebug now prints an estimated request size (see commit b94ba409).
  • Preserve type information in callsToGraphQL/callsFromGraphQL, fixing issues with null (closes #1256).
  • Fix a subtle ordering issue by writing linked IDs before traversing plural linked fields; this solves a rare edge case where data could be written to the wrong ID given a recursive query (see commit be45692f).
  • Expose injectCacheManager on RelayEnvironment (closes #1320).
  • Expose Relay.QueryConfig (closes #1279).
  • Ensure that instances of GraphQLRange get correctly deserialized (closes #1293).
  • Fix a case where tracked nodes would incorrectly trigger a refetch of plural fields with null linked field children (see commit 5c08fd60).
  • Make error-handling consistent between 200 status responses with errors attributes and non-200 responses (#1163).
  • Warn when producing a diff query involving a client: ID, necessitating the use of a path when a refetchable ID would be preferable in order to produce a correct result (commit 928411df).

v0.9.2

11 Jul 21:08
Compare
Choose a tag to compare
  • Added a context property useFakeData that you can use to silence the warning when using a RelayContainer with fake data.
  • You can now interpolate a function that returns an array of fragment references (eg. a route-conditional function) into a Relay.QL string. See #896
  • Added RelayStoreData#toJSON.
  • Fixed a bug where the query for a plural field might get diffed out, when in fact there was data missing in the store for which a query should have been produced.

v0.9.1

24 Jun 13:49
Compare
Choose a tag to compare
  • Added this.props.relay.pendingVariables which can be used to access variables from in-flight queries (to e.g. display a component-specific loading spinner).
  • Examples are moving from their former home inside the main Relay repo into a separate relay-examples repository.
  • npm run update-schema inside the Relay repo works again.
  • Fix a potential race condition in GraphQLQueryRunner (only relevant to users of the non-public cache manager API).
  • We now show line numbers in the Babel Relay plugin, making it easier to understand transform errors.
  • Relaxed validation when using a rangeBehaviors function to allow non-string calls.
  • subtractRelayQuery is removed.
  • The printer now knows how to print Subscription nodes.
  • RelayNetworkDebug is won't do anything unless console.groupCollapsed is available, because otherwise the output is too noisy to be useful.
  • RelayContainer now uses more descriptive names for stateless functional components, instead of Relay(props => ReactElement).

v0.9.0

27 May 06:27
Compare
Choose a tag to compare
  • Relay is now built with Babel 6.
  • Upgraded the Babel Relay plugin to graphql-js 0.6.0. Developers interested
    in upgrading to graphql-js 0.6.0 might have to make some changes to their
    existing GraphQL schemas. Read the migration guide for more information:
    https://gist.github.com/steveluscher/ffc1dfefbb10ad280c8a4c520a5c201c
  • Debug information detailing every step of a Relay mutation is now printed to
    the console when DEV is true, and console.groupCollapsed and
    console.groupEnd are available.
  • The this.props.relay prop passed into components by Relay.Container now
    exposes applyUpdate and commitUpdate methods for dispatching mutations
    in the context of the current Relay.Environment.
  • RANGE_DELETE mutations can now remove multiple nodes from a connection,
    because deletedIDFieldName can now point to a plural field.
  • You can now define rangeBehaviors as a function that receives the connection
    arguments and returns one of GraphQLMutatorConstants.RANGE_OPERATIONS.
  • RelayNetworkDebug#init now lets you pass in a RelayEnvironment against
    which you would like to debug. This does not yet allow you to debug more than
    one environment at a time, but at least you can make the choice of which one.
  • RelayReadyState now contains an events array; a stream of events that can
    be accessed from a RelayReadyStateCallback. You can reduce over this list of
    events to implement any kind of custom rendering logic you like.
  • this.props.variables now reflects the variables after being processed with
    prepareVariables. The fact that variables were the un-prepared values was
    a source of confusion for many.
  • Fixed a bug where prepareVariables could be called twice, breaking
    components with non-idempotent prepareVariables functions.
  • Relay now warns when you try to set a variable using setVariables, or
    produce one through prepareVariables, that you have not declared in
    initialVariables upfront.
  • It's now possible for the stale prop of a readyState to change even if
    there was previously an error present.
  • Fixed a bug formatting error messages when the error being pointed to starts
    at column 0.
  • A container definition can now optionally include a
    shouldComponentUpdate: () => boolean function. If specified, this function
    always overrides the default implementation (ie. there is no fall-through to
    the default).

v0.8.1

27 Apr 23:43
Compare
Choose a tag to compare
  • RelayNetworkDebug now logs query variables.
  • RelayNetworkDebug is now added as a subscriber instead of replacing any
    existing network layers. It also no longer replaces the global fetch.
  • Relay.Environment#injectNetworkLayer (and, by extension
    Relay#injectNetworkLayer) will now warn if injecting would overwrite a
    previously injected layer.
  • Added experimental low-level RelayGraphQLMutation API (still being
    finalized and not yet documented, so use at your own risk).