Skip to content


Choose a tag to compare
@alunyov alunyov released this 30 Apr 00:01

Commits: v3.0.0...v4.0.0


  • Fragment Container, Refetch Container, Pagination Container now always expect an object as the fragment declaration (single graphql tag is no longer valid input), since graphql tags no longer implicitly produce object wrappers during our babel transform: 1f26086.
  • ConnectionTransform will generate additional selections under the existing edges/pageInfo fields. A side-effect of this is that if edges/pageInfo were aliased, the generated fields now show up under the alias rather than as non-aliased sibling selections: 50008ab -
  • Compiler no longer allows directives to be used in locations not defined in the schema. Previously the compiler doesn't check the directives' locations, it causes directives being used on wrong places, e.g. @connection on a fragment definition.
  • Compiler now validates that all @arguments are defined on the callee


  • Updates in testing tools:

    • There are two main modules that you may use in your tests:
      • createMockEnvironment(options): RelayMockEnvironment
      • MockPayloadGenerator and @relay_test_operation directive
    • With createMockEnvironment, you will be able to create an instance of RelayMockEnvironment, a Relay environment specifically for your tests. The instance created by createMockEnvironment is implementing the Relay Environment Interface and it also has an additional Mock layer, with methods that allow to resolve/reject and control the flow of operations (queries/mutations/subscriptions).
    • The main purpose of MockPayloadGenerator is to improve the process of creating and maintaining the mock data for tested components.
  • Added full support for client schema extensions: now full GraphQL types can be defined in the client schema (as opposed to just extending existing server types), and they will be properly retained during garbage collection when rendered.

  • Using new fetchQuery implementation inside QueryRenderer which de-dupes identical requests in flight.

  • Add config support for babel-plugin-relay/macro (#2646) @sgwilym


  • Fixed compiler error when watchman cli was missing: 2958b97


  • Changed main entry point in package.json for react-relay and relay-test-utils
  • createRelayContext now in relay-runtime package to prevent multiple instances of packages that have "peerDependencies".
  • RelayCompat is removed.


  • Added experimental support from @stream and @stream_connection
  • Improved support for @match directive
  • Fixed passing down and comparing fragment owners in a few places that were missing.
  • Added experimental scheduler to QueryExecutor.