Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 10, 2021

This PR contains the following updates:

Package Change Age Confidence
relay-runtime (source) ^10.1.3 -> ^20.1.1 age confidence

Release Notes

facebook/relay (relay-runtime)

v20.1.1

Compare Source

Version 20.1.1 Release Notes

This patch release reverts the change that disabled persisted queries in validate mode (added in #​5013) as it was breaking the --validate command. The release also contains a bug fix for GraphQL payloads without a prototype and a of couple docs improvements.

Bug fixes
  • Fix(relay-runtime): prototype less payloads (#​5043) by Pavel Glac (commit)
  • Back out "Disable persisted queries in validate mode" by Jordan Eldredge (commit)
Documentation Improvements
  • Handle json schema consts in compiler config doc generation (#​5047) by Jordan Eldredge (commit)
  • Doc(useSubscription): config argument should be memoized (#​5033) by Pavel Glac (commit)

v20.1.0

Compare Source

Breaking Changes
Bug fixes
  • Fix conflicting lint by Steven Gschwind ([commit](4622d48))
  • Required-on-nonnull-field checking to consider fields in sibling inline fragments by Gordy French ([commit](3c494fc))
  • Disable persisted queries in validate mode (#​5013) by Aryan Iyappan ([commit](ff27db4))
Improvements
  • Config: allow 'extra' in root of single-project config files (#​5030) by Sean Barag ([commit](292ae5a))
  • Make schema def rendering more robust (#​5036) by Jordan Eldredge ([commit](e2aaaa8))
  • Add config + validation to enable enforcement of not using fields by Steven Gschwind ([commit](19c2529))
  • Support quickfix suggestions in validation rules by Jianfeng Chen ([commit](193d6c3))
  • Improve missing fragment data error message to point to @alias docs. by Jordan Eldredge ([commit](f933d6c))
  • Make variables arg in fetchQuery NoInfer to improve errors by Sam Zhou ([commit](6314d78))
  • Rust code for Hack Client LSP by Deepak Singh ([commit](c3b07ef))
  • Make variables prop in useLazyLoadQuery NoInfer to improve errors by Sam Zhou ([commit](11932da))
  • Required-on-nonnull-field checking to descend into inline fragments by Gordy French ([commit](94f107a))
  • Make variables prop in commitMutation param NoInfer to improve errors by Sam Zhou ([commit](3330731))
  • Add pass through renders type TChildren (#​5021) by Jenny Chen ([commit](a6ab8e5))
  • Make MockResolvers readonly by Sam Zhou ([commit](94eaa54))
  • Add platform info maker fn for fragment spread by Janette Cheng ([commit](40e7b46))
  • Emit raw query text in artifact for @relay_test_operation operations (#​4999) by Jakob Hansen ([commit](3320532))
Documentation Improvements
  • Update broken url in error message by Matthew Saunders ([commit](8839d34))
  • Update compiler.md to correct spelling of support (#​5034) by UKEME BASSEY ([commit](4660b13))
Miscellaneous
Experimental Changes

v20.0.0

Compare Source

Version 20.0.0 Release Notes
Announcement: ESLint Plugin v2.0.0 Released

Relay's ESLint plugin, eslint-plugin-relay, was recently updated to v2.0.0. This release includes a number of compatibility updates and removes a couple of deprecated rules. For more info, see the eslint-plugin-relay changelog.

Generated Documentation

This release includes a brand new page covering the Relay compiler config. This has largely been undocumented so far and now includes autogenerated documentation! We also added tooling to autogenerate API docs from source code. The documentation for useRelayEnvironment and useLazyLoadQuery are examples of the new autogenerated tooling.

Breaking Changes
  • Deprecate returning non-model weak types from resolvers. If you were using client side resolvers with the @outputType directive, these must be migrated to be strong or weak objects. You can continue to use the @outputType directive by enabling the allow_output_type_resolvers feature flag in the compiler config. (#​5004) by Jordan Eldredge (commit)
Bug fixes
  • Fix operation cleanup in RelayModernMockEnvironment by Martin Booth (commit)
  • Fix nested @​defer + 3D when server doesn't support streaming by Tianyu Yao (commit)
  • Fix nested @​defer when server doesn't support streaming by Tianyu Yao (commit)
  • Fix incremental bug where resolver artifacts were not cleaned up by Jordan Eldredge (commit)
  • Fetch missing client edge server queries discovered in nested fragments (#​4992) by Jordan Eldredge (commit)
  • Pass client edge context to resolver root fragments by Jordan Eldredge (commit)
  • Fix variable name for imported model resolvers when using ES module imports (#​4984) by Jordan Eldredge (commit)
  • Fix excluding generated dir under xplat_react by Tianyu Yao (commit)
Improvements
  • Add more time loggings in try_saved_state by Tianyu Yao (commit)
  • Log saved state info query time in relay compiler by Lynn Yu (commit)
  • Annotate read time resolver promises by Tianyu Yao (commit)
  • Add VSCode tasks for common commands (#​5003) by Jordan Eldredge (commit)
  • Surface prefetchExpiryInHours from the entrypoint by Alice Liu (commit)
  • Regression test for client edge server data discovered missing in resolver root fragment (#​4994) by Jordan Eldredge (commit)
  • Run client edge tests for both versions of useFragment by Jordan Eldredge (commit)
  • Update babel transform to default to default to ES modules to match compiler behavior (#​4982) by Jordan Eldredge (commit)
  • Stop unnecessary runtime transforms by Lynn Yu (commit)
  • Support enquoted field alias by Arseniy Panfilov (commit)
  • Parser option to allow literal string aliases by Arseniy Panfilov (commit)
Documentation Improvements
  • Update graphql.md readability (#​5018) by Josh Maloon (commit)
  • Add argument definitions to usePaginationFragment docs (#​5015) by DrillableBit (commit)
  • Remove docs on comet_routing_prefetch by Nithik Balachandran (commit)
  • Fix typo in description of the @​throwOnFieldError directive by Marius Schulz (commit)
  • A couple grammar fixes (#​5008) by Roman A (commit)
  • Replace out of date compiler readme with link to up-to-date docs page (#​5005) by Jordan Eldredge (commit)
  • Handle args and returns, convert useLazyLoadQuery by Tianyu Yao (commit)
  • Parse some docblock syntax and gen markdown for useRelayEnvironment by Tianyu Yao (commit)
  • Pass compiler config json schema as a prop (#​4997) by Jordan Eldredge (commit)
  • Add docs page describing the Relay lint rules by Jordan Eldredge (commit)
  • Prevent json schema css for h2 from leaking into the rest of the site by Jordan Eldredge (commit)
  • Compiler Docs: Improve separators in JSON arrays and objects (#​4990) by Jordan Eldredge (commit)
  • Make comment into doc comment in config struct (#​4989) by Jordan Eldredge (commit)
  • Fill in missing documentation in compiler config by Jordan Eldredge (commit)
  • Add page documenting the compiler config (#​4985) by Jordan Eldredge (commit)
  • Add missing generic type parameter for mutation tutorial example (#​4981) by Joey Yu (commit)
  • Fixups to quickstart (#​4983) by Jordan Eldredge (commit)
  • Update quick start guide to align with new version of Relay by Jordan Eldredge (commit)
Experimental Changes
  • Do not mark a query as inactive when waiting for resolver or server payload by Tianyu Yao (commit)
  • In a exec time query, mark query as completed if all initial payloads are received by Tianyu Yao (commit)
  • Fix operation executor for exec time by Tianyu Yao (commit)
  • Expose a loadClientQuery helper by Tianyu Yao (commit)
  • Support normalized responses in OperationExecutor by Tianyu Yao (commit)

v19.0.0

Compare Source

Version 19.0.0 Release Notes

Relay 19.0.0 includes many documementation improvements, bug fixes, and improved capabilities.

@alias required on conditional fragments

To improve type safety, the @alias directive is now required on all fragments that are only conditionally fetched either due to @skip/@include or fragment type conditions which only conditionally match. You can opt out of this validation on a per-fragment basis with the @dangerously_unaliased_fixme directive.

To enable incremental migration we include a codemod which will automatically add the @dangerously_unaliased_fixme in all required places:

npx relay-compiler codemod mark-dangerous-conditional-fragment-spreads

You can also opt out of this validation entirely via compiler config feature flag:

{
  // ...
  "featureFlags": {
    "enforce_fragment_alias_where_ambiguous": {
      "kind": "disabled"
    }
  }
}
Improved Docs

We've merged ~30 commits to clean up and improve our docs since the last release:

  • Added new pages:
  • Removed outdated or orphaned doc pages
  • Streamlined and fixed issues in existing docs
React 19 Compatible

React 19 is now a valid peer dependency of Relay (#​4944) by Krzysztof Karol (commit)

Breaking Changes
  • Relay now defaults to generating ES module imports in its generated js files. You can add "eagerEsModules": false in your relay.config.json to opt back into the old behavior. (commit)
  • Relay's NPM modules nolonger include a pre-bundled module. (#​4935) by Iha Shin (commit)
Improvements
  • Avoid duplication in config JSON Schema by Jordan Eldredge (commit)
  • Go to definition in the LSP can now navigate to the correct column (#​4969) by Jordan Eldredge (commit)
  • Make store an optional argument when constructing a Relay Environment by Jordan Eldredge (commit)
  • Include mixed loggerContext in handled snapshot errors by Itamar Kestenbaum (commit)
  • Add id collision logging in RelayResponseNormalizer with typename metadata by Monica Tang (commit)
  • Mark useLazyLoadQuery options as ReadOnly by Marco Wang (commit)
  • Add onPause in cacheConfig for Relay subscriptions by Aria Fallah (commit)
  • Add typename metadata to id collision log event by Monica Tang (commit)
  • Allow @​dangerously_unaliased_fixme on updatable fragment spreads by Jordan Eldredge (commit)
  • Add a feature flag to throw on nested updates in dev by Tianyu Yao (commit)
  • Do not emit union type for __typename selection on non-abstract type (#​4923) by tobias-tengler (commit)
  • Reenable warning if fetchQuery is called in render (using new unsatable React APIs) by Jordan Eldredge (commit)
  • Log ID collisions in production by Monica Tang (commit)
  • Add log events by Monica Tang (commit)
  • Pass operation availability to the network layer for loadQuery by Tianyu Yao (commit)
  • Add compiler validation to error on resolver that returns plural server type by Jordan Eldredge (commit)
  • Enable by default recreating loadMore optimization by Andrei Marchenko (commit)
  • Allow @​dangerously_unaliased_fixme in updatable fragments by Jordan Eldredge (commit)
  • Error on empty selections after fragment argument transform (#​4908) by tobias-tengler (commit)
  • Add error message to Resolver error by Itamar Kestenbaum (commit)
  • Fix codemod crashing on aliases in inline fragments by Gordy French (commit)
  • Allow required alias codemod to be applied to a rollout range by Jordan Eldredge (commit)
  • Add onResume in cacheConfig for Relay subscriptions by Xiangxin Sun (commit)
  • Shorten relay read time resolver key prefix by Tianyu Yao (commit)
  • Arguments in prefetch pagination variables bug fix by Lynn Yu (commit)
  • handle local variables vs global variables in prefetch pagination by Lynn Yu (commit)
  • Manual rebase of: Enable __token field based on compiler schema config #​4347 (#​4889) by Jordan Eldredge (commit)
  • Fix conditional sub-selections in raw response type (#​4774) by tobias-tengler (commit)
  • Add execute.unsubsribe logging by Tianyu Yao (commit)
  • Enhance schemaExtensions to Support Both Files and Directories (#​4859) by Sverre Johansen (commit)
  • Add plural fragment support to observeFragment() (#​4862) by Iha Shin (commit)
  • Handle CRLF when parsing docblocks (#​4865) by Sverre Johansen (commit)
  • Validate that client schema extensions within @​throwOnFieldError have @​catch by Jordan Eldredge (commit)
  • Add @​catch to client schema extension fields within @​throwOnFieldError by Jordan Eldredge (commit)
  • Make Result type fields readonly by Jordan Eldredge (commit)
  • Limit WalkDir to the root directories referenced by the configuration (#​4850) by Sverre Johansen (commit)
  • Simplify dependencies for loadMore function by Andrei Marchenko (commit)
  • Propegate empty arrays into the store when handling errors on noncompliant lists by Ryan Holdren (commit)
Bug fixes
  • Fix nullable refetchedFragmentRef in checkSameIDAfterRefetch (#​4945) by Krzysztof Karol (commit)
  • Add missing readFragment export in relay-runtime (#​4931) by Jay Jaeho Lee (commit)
  • Fix bug with caching incomplete used variables for fragment cycles by Jordan Eldredge (commit)
  • Fix observeFragment triggering unhandled rejections on network error (#​4885) by Iha Shin (commit)
  • Checked for missed updates in effect create phase by Jack Pope (commit)
  • Avoid writing to stdout in LSP by Jordan Eldredge (commit)
  • Run requried transform on IR before validating @​required on semantic non null fields in LSP by Jordan Eldredge (commit)
  • Fix: Don't report @​required on field that can be null due to @​required bubbling as unnessesary by Jordan Eldredge (commit)
  • Unbreak LiveState unsub when references.size === 0 (#​4832) by Tom Aylott (commit)
  • Remove PointerAddress from generate_typename by Gordy French (commit)
  • Context not properly provided through data injector and subscriptions (#​4846) by Mark Polak (commit)
  • Fix rare client_extension instability by Gordy French (commit)
  • Enforce TTL-based GC when release buffer is full by Monica Tang (commit)
  • Fix usePagination stuck in isLoading by Tianyu Yao (commit)
Documentation Improvements
  • Update language to reference hooks not containers (#​4964) by Jordan Eldredge (commit)
  • Move the "Organizing Operations" tutorial page into the guides by Evan Yeung (commit)
  • Fix code examples in the connections tutorial page by Evan Yeung (commit)
  • Migrate most blockquotes in our docs to admonitions by Evan Yeung (commit)
  • Update VSCode docs/errors to use pathToRelay (#​4965) by Jordan Eldredge (commit)
  • Iteration on new quick start guide based on feedback (#​4966) by Jordan Eldredge (commit)
  • Quick Start: Add note about watchman by Jordan Eldredge (commit)
  • Remove "TBD" sections from the docs by Evan Yeung (commit)
  • Rework onboarding flow by Jordan Eldredge (commit)
  • Remove migration and compatability pages by Jordan Eldredge (commit)
  • Make footer logo smaller by Monica Tang (commit)
  • Delete some pages by Monica Tang (commit)
  • Remove orphaned page "workflow" by Jordan Eldredge (commit)
  • Delete empty docs pages by Monica Tang (commit)
  • Fix typos and improve clarity in the tutorial by Evan Yeung (commit)
  • Delete legacy API docs (with broken links) by Monica Tang (commit)
  • Fix subscription call signature in observeFragment docs by Jordan Eldredge (commit)
  • Fix broken markdown in OssOnly blocks by Itamar Kestenbaum (commit)
  • Fix broken markdown in FbInternalOnly blocks by Itamar Kestenbaum (commit)
  • Document configuring relay runtime globally (#​4906) by Jordan Eldredge (commit)
  • Update docs on usePaginationFragement & transitions in Relay tutorial. (#​4842) by Daniel Stocks (commit)
  • fix mistake in refetching-queries-with-different-data by Lynn Yu (commit)
  • Add documentation for RecordSourceProxy by Lynn Yu (commit)
  • Remove dead links from Relay users page by Evan Yeung (commit)
  • Add documentation for Relay performance logger by Tianyu Yao (commit)
  • Add docs for @​gqlField resolvers by Evan Yeung (commit)
  • Document resolvers returning abstract types by Jordan Eldredge (commit)
  • Start to fix Updating Data section of relay docs by Lynn Yu (commit)
  • make it clear that 3D @module will only work if each fragment is on a different concrete type by Lynn Yu (commit)
  • Fix typo in documentation by Allan Spreys (commit)
Experimental Changes
  • Fix relay reader module import bug by Lynn Yu (commit)
  • Load component module earlier into record store 1/2 by Lynn Yu (commit)
  • Generate data driven dependencies for static resources used by exec resolver normalization artifacts by Lynn Yu (commit)
  • add ability to configure operationModuleProvider path separately from componentModuleProvider by Lynn Yu (commit)
  • Check for .read_time_resolvers in module_metadata before adding exec time directive in split_module_import by Lynn Yu (commit)
  • add exec time resolvers directive to split module import by Lynn Yu (commit)
  • Generate exec time ASTs in rootFragment $normalization files by Tianyu Yao (commit)
  • Compiler client 3D changes to support exec time resolvers by Lynn Yu (commit)
  • Create feature flag for typename prefixing of ids by Monica Tang (commit)
  • support client 3d on concrete objects by Lynn Yu (commit)
  • Add test cases for @​defer behavior in read time resolvers by Tianyu Yao (commit)
  • Modify _readClientSideDirectiveField in RelayReader to work for exec time resolvers by Lynn Yu (commit)
  • Allow @​match on client edges by Tianyu Yao (commit)
  • Add enabledProvider argument inside @​exec_time_resolvers directive (runtime + artifacts) by Lynn Yu (commit)
  • Modify useLazyLoadClientQuery to take a flag for exec time resolvers on or off by Lynn Yu (commit)
  • amend compiler changes to handle exec_time_resolvers ONLY case differently by Lynn Yu (commit)
  • COMPILER changes add enabled argument inside @​exec_time_resolvers directive by Lynn Yu (commit)
  • Parse the @​gqlField docblock for the description and deprecated tag by Evan Yeung (commit)
  • Add logic to find property lookup resolver docblocks by Evan Yeung (commit)
  • Pipe information through compiler for simplified resolver generation for property lookup resolvers by Evan Yeung (commit)

v18.2.0: Version 18.2.0 Release Notes

Compare Source

Relay version 18.2.0 comes with several bug fixes and improvements!

New compiler capability: Relay Codemods

Codemods are tools which enable you to programmatically update your code. These are especially helpful if you want to upgrade an API across your whole codebase without needing to manually change each call site. The Relay compiler, with its understanding of your GraphQL snippets, is well positioned to help with these kinds of tasks. In Relay 18.2.0 we are introducing Relay Codemods.

We currently support two different codemods:

  • mark-dangerous-conditional-fragment-spreads marks places where @alias is required to make a fragment spread safe. This can enable you to turn on the enforce_fragment_alias_where_ambiguous feature flag. Learn more in the @alias docs.
  • remove-unnecessary-required-directives identifies places where @required is unnecessary because it's used on a non-nullable field within a fragment or query that is @throwOnFieldError, and removes the @required directive.

We are looking forward to helping Relay users with more codemods in the future!

New experimental hook for pagination with prefetching

It is often possible to speed up list pagination by pre-loading one or more pages of results ahead of what the user is currently viewing. Our previous APIs made this difficult to fetch the next page of data without also rendering it at the same time. We are currently exploring an experimental API to make it easy to manage paginated lists with prefetching.

Read more in the docs: usePrefetchableForwardPaginationFragment

Expand places where @​catch can be used

The @catch directive can now be used on fragments, queries, mutations and aliased inline fragments. This enables more flexibility in controlling how field errors are handled.

Bug fixes
  • [682ac5a]: Include Relay resolver import type when field is selected on query as well (#​4820) by Ernie Turner
  • [d6cb5a2]: Update required-on-non-null validation to also work within @​catch by Gordy French
  • [356327c]: Fix bug in Connections with errors by Evan Yeung
  • [9571d80]: Fix result type generic for Error to not double-nest by Itamar Kestenbaum
  • [af35418]: Ignore @​dangerously_unaliased_fixme when comparing structs by Jordan Eldredge
  • [f166d6b]: Fix dangling resolver artifact by Tianyu Yao
Improvements
  • [81eab03]: Remove unused fieldPath from resolver suspense objects by Jordan Eldredge
  • [d982b5b]: Add feature flag to opt in/out of including the path field in @​required reader nodes by Jordan Eldredge
  • [460508a]: Remove path from @​catch codegen by Jordan Eldredge
  • [a88c013]: Derive @​required fieldPath at runtime by Jordan Eldredge
  • [7c9aebb]: Add support for @​catch on fragments/queries/mutations and aliased inline fragments (#​4838) by Jordan Eldredge
  • [08fef89]: Cleanup resolver cache implementation only used in tests by Jordan Eldredge
  • [2c3b915]: Cleanup AVOID_CYCLES_IN_RESOLVER_NOTIFICATION by Jordan Eldredge
  • [2705e3d]: Add support for handling field errors on noncompliant lists by Ryan Holdren
  • [402aa97]: Update message in handlePotentialSnapshotErrors for payload errors by Itamar Kestenbaum
  • [8421851]: Improve error message when directive is used in wrong location by Jordan Eldredge
  • [3eb627d]: Add fieldPath to missing data field error logs (#​4835) by Jordan Eldredge
  • [bac814f]: Use prefetchable metadata in the prefetchable pagination hook by Tianyu Yao
  • [d079b29]: Allow @​required on connection fields by Jordan Eldredge
  • [733cc27]: Add schema name to project config by Monica Tang
  • [ebf028b]: Use directive location where it makes sense by Gordy French
  • [d3eb42f]: Don't require @​alias on plural fragments spread into plural selections by Jordan Eldredge
  • [e21e162]: Allow codemod to specify rollout percentage by Gordy French
  • [e4facf3]: Allow granular FeatureFlag gating of @alias enforcement by Jordan Eldredge
  • [deb7b09]: Allow users to return ID built in scalar using DataID by Jordan Eldredge
  • [3c92504]: Fix slow typegen in adslab by Tianyu Yao
  • [6e4c120]: Update error message for clarity by Jordan Eldredge
  • [5c548bd]: Allow @​dangerously_unaliased on @​inline fragments by Jordan Eldredge
  • [2cf6c7f]: Codemod command runs and collects code actions by Gordy French
  • [ad26284]: Make required-on-non-null-within-throwOnFieldError an LSP warning by Gordy French
  • [b41ae4c]: Support semantic non-nullable RelayResolverValue by Jordan Eldredge
  • [eba1d97]: Allow strong resolvers to reference opaque types by Jordan Eldredge
Documentation Improvements
  • [9401e69]: - add new client 3D page in 3D docs by Lynn Yu
  • [6a51b39]: - 3D docs starting point by Lynn Yu
  • [caa040a]: - document all top level functions in relay compiler by Lynn Yu
  • [1306086]: - document all top level structs in relay compiler by Lynn Yu
  • [86301c7]: - document all modules in relay compiler by Lynn Yu
  • [bdbe7e0]: Add rust docs for all top level enums in relay compiler by Lynn Yu
  • [5600502]: - document semantic nullability support in resolvers by Lynn Yu
  • [c3b0dd5]: Docs: Fix fragments tutorial thumbnail typo (#​4841) by Daniel Stocks
  • [5b7dc1f]: Add docs for usePrefetchableForwardPaginationFragment by Tianyu Yao
  • [5cccb7b]: - adding docs for abstract types in relay resolvers by Lynn Yu
  • [ebc4936]: Minor updates to docs on enabling relay resolvers (#​4824) by Arthur
  • [4776175]: Update docusaurus to 2.4.3 by Gordy French
  • [0b4920d]: - delete old relay doc versions older than 2 years by Lynn Yu
  • [b8967d2]: Add documentation for codemods (#​4826) by gordyf
  • [7c2b460]: Update description of dangerously_unaliased_fixme directive by Jordan Eldredge
Miscellaneous
  • [9eb9c94]: Update to latest react@​experimental (#​4847) by Lauren Tan
  • [7e258ca]: Add @​relayRequiredVariables to metadata section of generated .graphql files by Jean Zhang
  • [4360f69]: Deprecate GK relay_enable_load_query_request_deduping by Nithik Balachandran
  • [15a19e9]: Update metadata generation for Live Query in Relay compiler by Xiangxin Sun
Experimental Changes
  • [30af003]: Add a runtime feature flag for prefixing read-time resolver storageKeys by Evan Yeung
  • [195d9a2]: Fix usePrefetchablePagination bug by Tianyu Yao
  • [57756e6]: Allow reusing fetching options in usePrefetchableForwardPaginationFragment by Tianyu Yao
  • [023b875]: Support dynamic switching of read vs exec time resolvers in reader by Evan Yeung
  • [53cef9d]: Update hook to expose data in UNSTABLE_extraVariables by Lynn Yu
  • [d036d49]: Update normalization artifacts for exec time resolver strong ids by Evan Yeung
  • [9035b32]: Generate prefetchable pagination ASTs by Tianyu Yao
  • [dececd1]: Generate metadata for prefetchable pagination by Tianyu Yao
  • [4a67ddd]: Create a separate edge fragment for prefetchable pagination by Tianyu Yao

v18.1.0: Version 18.1.0 Release Notes

Compare Source

Following up from our v18.0.0 release last month, v18.1.0 provides a number of fixes and improvements, adds some new experimental APIs, and ships some long-running experimental features as stable.

Relay Resolvers are now stable

For the past several years we've been iterating on Relay Resolvers which provided a structured and typesafe way to model client state and derived data in your GraphQL graph. As of this release, Relay Resolvers are enabled by default and no-longer experimental. As part of this stabilization we shipped fixes for Relay Resolvers when used with TypeScript and fixed a few edge cases related to how errors encountered by resolvers are handled.

  • [d10786]: Update docs now that resolvers are stable by Jordan Eldredge
  • [4e5377]: Remove Relay Resolver compiler feature flag by Jordan Eldredge
  • [7b8f1f]: Remove ENABLE_RELAY_RESOLVERS runtime feature flag by Jordan Eldredge
  • [1467b6]: Stabilize LiveResolverStore as the new implementation of RelayModernStore (#​4806) by Jordan Eldredge
  • [dec5ee]: Avoid running resolver code if root fragment throws with @​required(action: THROW) (#​4799) by Jordan Eldredge
  • [478274]: Ensure we import the type of a resolver for RelayResolverValue fields by Jordan Eldredge
  • [852fbc]: Improve edge resolver error messages by Gordy French
  • [575f20]: Add satisfies type assertion for typescript (#​4797) by Drew Atkinson
  • [2314f4]: Document relay field logger (#​4809) by Jordan Eldredge
Improvements to error @​catch

We released @catch in v18.0.0 and are very excited about the capabilities it enables. Check out Itamar Kestenbaum's GraphQL conf talk about it here: Build Confidently: How @​Catch and Error Handling Pave Way in Field Nullability.

Since that release we've made a few improvements:

  • Fields within a @catch directive that are marked as @semanticNonNull in the schema now generate non-nullable TypeScript/Flow types. See semantic nullability.
  • Errors exposed to product code by @catch no-longer include the error message. This is because GraphQL error messages are generally not safe to show to users. These error messages can still be accessed by the field logger provided to your Relay Environment. In the future we plan to let users opt into allowing safe error messages through to product code.
  • [26b78d]: Take advantage of @​semanticNonNull within @​catch (#​4794) by Jordan Eldredge
  • [6a038d]: Replace actual server-side error with generic "server error" message by Itamar Kestenbaum
  • [6c8827]: Don't report missing fields within an unmatched inline fragment by Jordan Eldredge
  • [2314f4]: Document relay field logger (#​4809) by Jordan Eldredge
Compiler Error Reporting

We've improved how errors are reported by the Relay compiler to ensure we report as many errors as possible, and each error includes sufficient context.

  • [9edbb0]: Report validation errors for all segements of a proejct by Jordan Eldredge
  • [adaf8a]: Report location of operation that does not define variable by Jordan Eldredge
New "Copy Operation" VSCode command

Our VSCode extension now includes a command to quickly copy the full text of a query directly from within your editor.

Copy operation VSCode command

  • [8d2380]: Add copy operation command (#​4778) by Tobias Tengler
Experimental APIs for reading fragment data outside of React

In some cases it can be useful to read a fragment outside of a React hook. However, doing this requires handling a number of concerns.

  1. The fragment data may not yet be ready (@defer or Relay Resolver suspense).
  2. The fragment may error (@throwOnFieldError, @required(action: THROW))
  3. The fragment's data might change over time.

To enable users to read fragment data while correctly handling these cases, we've added two experimental APIs:

  • observeFragment: Read a fragment as a stream of states where each state might be loading, error, or value.
  • waitForFragmentData: Read a fragment as a promise which will resolve when data is available, or reject if an error is encountered.
  • [6f0cbe]: Upstream observeFragment and waitForFragmentData to relay-runtime by Jordan Eldredge
  • [36eecf]: Documentation for observeFragment and waitForFragmentData by Jordan Eldredge
Docs

Thanks to members of our community for submitting pull requests to improve our docs:

  • [e133fe]: Remove reference to the Google Chrome Extension Store from the installation guide for Relay Developer Tools by Jakub KopÃ…â„¢iva
  • [e41490]: Replace story.image for story.thumbnail (#​4793) by Theo Kouzelis
  • [e95a5a]: Update mutations-updates.md in Tutorials (#​4765) by Jbee
  • [0cf094]: Update error handling and semantic nullability docs to include talks and links (#​4800) by Jordan Eldredge
Improvements
  • [08c74e]: Validate semantic-non-null interface implementations by Gordy French
  • [a5b963]: Renaming missing_field log event types to missing_required_field by Itamar Kestenbaum
  • [186c91]: Call cleanup of insertion effects when hidden (#​30954) by rickhanlonii (Meta Employee)
  • [ba0b46]: Add logging for normalization by Tianyu Yao
  • [792628]: Relay: Allow omitting exists on ExternalFileSourceResult by Nico Reed
  • [f1ee92]: Check pruned fields blocklist for undefined fields by Steven Chaitoff
  • [23958c]: Make metadata_for_machine keys string constants by Steven Chaitoff
  • [8d0302]: Relay: Remove unused code from oss code by Nico Reed
  • [6d36d7]: Fix mockClientData with generateDeferredPayload = true by Fernando Gorodscy
Experimental

We are always continuing to evolve and improve Relay. These changes are part of features or implementations which are either in progress or are being experimented with internally.

  • [cb1b4d]: Add feature flag and config option to give

Configuration

📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 12af33c to e6b4d61 Compare March 24, 2021 14:52
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch 2 times, most recently from 7b9cd45 to 52a40e8 Compare April 15, 2021 19:25
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 52a40e8 to cf85666 Compare May 10, 2021 04:20
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch 2 times, most recently from 51d28d0 to b1b71cb Compare June 7, 2021 02:08
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch 2 times, most recently from d1e538b to 127823f Compare June 28, 2021 02:00
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 127823f to 2b38c16 Compare October 19, 2021 02:35
@renovate renovate bot changed the title chore(deps): update dependency relay-runtime to v11 chore(deps): update dependency relay-runtime to v12 Oct 19, 2021
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 2b38c16 to ec4a983 Compare March 7, 2022 08:54
@renovate renovate bot changed the title chore(deps): update dependency relay-runtime to v12 chore(deps): update dependency relay-runtime to v13 Mar 7, 2022
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from ec4a983 to 4800b11 Compare March 26, 2022 12:03
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 4800b11 to 73d4d33 Compare June 8, 2022 19:05
@renovate renovate bot changed the title chore(deps): update dependency relay-runtime to v13 chore(deps): update dependency relay-runtime to v14 Jun 8, 2022
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 73d4d33 to 2ab6849 Compare September 25, 2022 18:59
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 2ab6849 to de57053 Compare November 20, 2022 17:25
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from de57053 to 9f5c927 Compare March 16, 2023 08:03
@renovate renovate bot changed the title chore(deps): update dependency relay-runtime to v14 chore(deps): update dependency relay-runtime to v15 Mar 16, 2023
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 9f5c927 to 4a35611 Compare October 19, 2023 21:19
@renovate renovate bot changed the title chore(deps): update dependency relay-runtime to v15 chore(deps): update dependency relay-runtime to v16 Oct 19, 2023
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 4a35611 to 7c28968 Compare December 11, 2023 22:32
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 7c28968 to ef1d3ef Compare January 23, 2024 20:13
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from ef1d3ef to f3cc104 Compare June 15, 2024 00:32
@renovate renovate bot changed the title chore(deps): update dependency relay-runtime to v16 chore(deps): update dependency relay-runtime to v17 Jun 15, 2024
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from f3cc104 to ffd2aaf Compare September 7, 2024 04:07
@renovate renovate bot changed the title chore(deps): update dependency relay-runtime to v17 chore(deps): update dependency relay-runtime to v18 Sep 7, 2024
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from ffd2aaf to cfd9fe7 Compare October 4, 2024 21:34
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from cfd9fe7 to fdebbae Compare November 21, 2024 23:26
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from fdebbae to c1c6e93 Compare May 2, 2025 22:47
@renovate renovate bot changed the title chore(deps): update dependency relay-runtime to v18 chore(deps): update dependency relay-runtime to v19 May 2, 2025
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from c1c6e93 to ef5c22e Compare June 14, 2025 06:34
@renovate renovate bot changed the title chore(deps): update dependency relay-runtime to v19 chore(deps): update dependency relay-runtime to v20 Jun 14, 2025
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from ef5c22e to 3b2d1b2 Compare July 28, 2025 19:42
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 3b2d1b2 to 50a17cc Compare August 7, 2025 01:40
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 50a17cc to 6814dcf Compare August 19, 2025 15:10
@renovate renovate bot force-pushed the renovate/major-relay-monorepo branch from 6814dcf to 24a69fd Compare September 25, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant