Skip to content

v15.0.0

Compare
Choose a tag to compare
@captbaritone captbaritone released this 08 Mar 22:16
· 1354 commits to main since this release

Relay 15.0.0 Release Notes

Breaking

  • [6092ddb] Change signature of missing field handlers. Instead of accepting a Record (which is an untyped grabbag containing whatever the store has), we instead pass a ?ReadOnlyRecordProxy. Furthermore, we replace NormalizationLinkedField with CommonLinkedField, which both a ReaderLinkedField and NormalizationLinkedField "implement".
  • [Flow-Only] usePreloadedQuery, useQueryLoader, useRefetchableFragment, usePaginationFragment, useBlockingPaginationFragment. Updates in runtime, React APIs for better integration with Flow: and a first class support for types in flow for graphql tags. [a75a445] [ef29f06] [78bd12d] [614c747] [ab9f04a]

Features

  • Editor Integration. Our VSCode Extension is powered by tight integration with the Relay compiler. The following compiler improvements improve the experience of using the VSCode extension:
    • [a6eb291] Find field references for vscode extension
    • [96c7193] Feature: LSP Fragment completions (#4134)
    • [50266e1] Warn on deprecated field and directive args
    • [8f1d9be] Feature: Nested input type field completions (#4148)
    • [cbdec0b] Add recursive implementing objects method
    • [d24c295] Show schema field description in LSP hover
    • [298af34] Document __typename and __id in LSP hover
    • [c62cad9] Fix LSP completion icon for fields (#4131)
    • [7c06b6c] Fix: Field alias completions (#4135)
    • [233d41b] Add error reference link for unknown field error
    • [3b40fe5] Improve scoping of diagnostic location for duplicate queries/fragments
  • Improvements for Open Source contributors:
    • [ec91ebc] Validate compiler output in OSS (#4116)
    • [603bb4b] Add script to regenerate rust fixture tests (#4182)
    • [b1c9de3] Copy sort-imports rule to Relay's internal lint rules
  • [Experimental] Support of fragment argument syntax currently being proposed for the GraphQL spec
    • [b497aa3] Add spread arguments to Relay Compiler AST
  • [Experimental] Relay Resolvers. A significant portion of our development effort since our last release has gone into developing Relay Resolvers (a mechanism for exposing derived data in the graph) and Relay Live Resolvers (a mechanism for exposing non-Relay client state in the graph). While the features are still experimental and not documented for public use we’ve made significant progress. Some highlights:
    • [9d3a87d] Ability to define multiple resolvers per-file
    • [8dc927f] Terser syntax allows defining most resolvers with a single line docblock
    • [3a151b4] Model resolvers allow defining new GraphQL types that are backed by JS objects
    • [2e134d9] Retain Relay Resolver data during GC
    • [fb96666] Support resolvers that return plural @weak objects
    • [2bd9788] Support defining @weak types in docblocks
    • [f5467f2] Allow live Resolvers to be batched
    • [cb052fc] Clean up go to definition for resolvers
    • [dae3159] Fix LSP on Windows (#4160)
  • [e80d6ba] Compact GraphQL query text (#3983)
  • [e64db9b] Allow passing custom headers when persisting queries (#4066)
  • [44fe2bc] Don't print "default" project name in diagnostics
  • [10e20cc] Update types for LoadMoreFn: use variables directly, do not extract them from query
  • [8a44673] Adding support for client extensions in mock payload generator (#4030)
  • [9393fe5] Use relative to fragment location path for provided variables modules
  • [6acd8cb] Support import type for named imports in typescript
  • [c0d0198] Handle missing fields in readUpdatableQuery/Fragment
  • [d00df58] Add support for refetchable interfaces
  • [f070bc1] handle removed schema files in the incremental mode
  • [bdf1a41] Fix validate_selection_conflict and enable the optimization in relay
  • [ac5f397] More updates to LoadMoreFn types in custom pagination hooks
  • [bd0c22a] Log event when we find an operation to suspend on
  • [2e449af] Sort CustomScalarImports in runtime artifacts
  • [470a5fb] Add SDLSchema.get_unions() (#4036)
  • [aa261bf] Provide default to loadQuery TEnvironmentProviderOptions TParam
  • [8eea4aa] Improve error messages related to @refetchable
  • [1802a7d] Emit forced type assertions for ESModules
  • [872a64f] Sort types of interface when generating selections for abstract @outputTypes
  • [051d1c4] Add non-fatal validation warnings to Relay's compiler
  • [4cea5dd] Add TRawResponse type to ClientQuery
  • [f8c1c2d] Report related locations in diagnostics
  • [bcf7d6f] Use import type in typescript for all imports (#4029)
  • [831fa90] Upgrade to Flow 0.201.0
  • [96df067] Export ProfilerContext in react-relay (#4049)

Bug Fixes

  • [9790484] BUGFIX - pop errors in validate_selection_conflict
  • [6f248f1] Manually fix LTI errors
  • [196a57b] Fix bug where resolved promise was being reused
  • [9582ec7] Support Suspension of ReactRelayQueryRenderer
  • [121903d] Default FetchPolicy for Live Queries to "store-and-network"
  • [8d49006] Add assignClientAbstractTypes to the DataChecker
  • [68b6846] Fix suspense for client-only fragments that contains suspensible live resolvers
  • [8c11098] Fix schema name resolution
  • [3cb0415] ProvidedVariables and RelayResolver
  • [5799146] fix moduleImportConfig support for single project configs
  • [585ad64] Quote key in literal object argument
  • [5ea0fb9] Do not use path in snapshots, they are different on windows. (#4101)
  • [4bc0571] Fix printing nested condition nodes
  • [85ab73f] Fix types of useRefetchableFragment/usePaginationFragment for data/variables with/without optional keys.
  • [5028b31] Strip extensions on file import paths when writing out TypeScript generated code (#4057)
  • [976e6ee] Modifying @relay_test_operation to write metadata for client fields (#4047)
  • [e2a7e96] Fix printing repeated conditions
  • [ce5e1ed] Compiler incorrectly reports missing required fields (#4123)
  • [4ba3fe8] Import fragment types in typegen in non-haste setups
  • [54ba473] Fix duplicate field validation
  • [6d01338] Fix scheduling bug that caused extra queries
  • [4d12002] Stop generating js fields in query for 3D when local import is enabled
  • [39c774b] Don't treat generated fragments as dependencies

Misc

  • [98e7700] Validate against using Relay Resolvers in typesafe updaters
  • [963ada7] update to rust 1.64.0
  • [86e476d] Don't call schema.object 2x
  • [b17af8d] Add Interface.implementing_interfaces
  • [689dcb1] Cleanup relay-flight-experimental
  • [e0d62b1] Populate all types in flatbuffer schema