Skip to content

chore(deps): update all devdependencies (major) #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 7, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@types/node (source) 18.19.54 -> 22.15.3 age adoption passing confidence
@types/react (source) 18.3.10 -> 19.1.2 age adoption passing confidence
@types/react-dom (source) 18.3.0 -> 19.1.3 age adoption passing confidence
@types/react-relay (source) 16.0.6 -> 18.2.0 age adoption passing confidence
@types/relay-runtime (source) 17.0.4 -> 18.2.5 age adoption passing confidence
babel-plugin-relay (source) 17.0.0 -> 19.0.0 age adoption passing confidence
concurrently 8.2.2 -> 9.1.2 age adoption passing confidence
graphql-ws (source) 5.16.0 -> 6.0.4 age adoption passing confidence
jsdom 25.0.1 -> 26.1.0 age adoption passing confidence
react (source) 18.3.1 -> 19.1.0 age adoption passing confidence
react-relay (source) 17.0.0 -> 19.0.0 age adoption passing confidence
relay-compiler (source) 17.0.0 -> 19.0.0 age adoption passing confidence
relay-runtime (source) 17.0.0 -> 19.0.0 age adoption passing confidence
tailwindcss (source) 3.4.13 -> 4.1.5 age adoption passing confidence

Release Notes

facebook/relay (babel-plugin-relay)

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 custom path for artifacts by Monica Tang
  • [4acf3f]: Make usePaginationFragment compatible with by Joe Savona
  • [f9365f]: Attempt to avoid cycled when expanding updated ids to include impacted resolvers (#​4792) by Jordan Eldredge
  • [59b2a6]: UseQueryLoader() (and refetch()) compatibility with by Joe Savona
  • [2f997b]: Update generated data driven dependency metadata for client 3D by Lynn Yu
  • [790d46]: Update Relay API for disk caching by Evan Yeung
  • [bb30bb]: Add feature flag for reader AST module imports by Evan Yeung
  • [f0761b]: Add a priority flag to task scheduler for store network updates by Tianyu Yao
  • [6f8f79]: Move corpus creation of program into helper function by Gordy French

v18.0.0: Version 18.0.0 Release Notes

Compare Source

With version 18, the Relay team at Meta and our community of contributors have made several significant improvements to Relay:

  • Improved validation of argument types
  • @alias released as stable
  • @catch to detect and granularly handle field errors
  • @throwOnFieldError and @semanticNonNull to avoid having to handle the nullability of fields which are only null in the case of error.
  • Intellisense for your Relay config file
  • Rename refactoring tools and inlay hints for fragment arguments

Read all about them in more detail below:

Breaking Changes
Improved validation of field and fragment arguments

Previously we were not correctly type-checking arguments passed to client-defined fields, such as Relay Resolvers and Client Schema Extensions. This new release adds that validation. If you need to opt out of this validation for any reason, you can enable the disable_full_argument_type_validation compiler feature flag.

{
    // ... rest of config
    "featureFlags": {
        "disable_full_argument_type_validation": {
          "kind": "enabled"
        }
     }
}
Major features
@​alias fragment aliases released as stable

Aliased fragments are a Relay feature that lets you access fragments spreads and inline fragments as named properties. This can be especially helpful for fragments which might be conditionally fetched due to @skip/@include or type conditions which might not match. With @alias these fragments get typed as nullable properties allowing you to check at runtime if they've matched or not before trying to use the data.

Read more about @​alias

@​catch

@catch, enabled by default will let you check at runtime if a field errored. This can allow you to disambiguate between true nulls returned by your server, and fields which are null due to field level errors.

Read more about @​catch

@​throwOnFieldError

@throwOnFieldError can be added to fragments and queries and will cause any field errors within that fragment/query to throw when read. This ensures that all null values you encounter are true nulls as returned by your field resolvers on the server, and not field level errors that have been coerced to null.

Read more about @​throwOnFieldError

Semantic Nullability

@throwOnFieldError unlocks a powerful new feature when combined with a schema that has fields annotated with @semanticNonNull. @semanticNonNull can be added to fields which have been made nullable in the schema only to enable more robust error handling, but are not expected to return null expect in the case of errors.

Within fragments or queries annotated with @throwOnFieldError, fields annotated with @semanticNonNull will be typed as non-nullable. This has the potential to dramatically reduce the number of null checks you need to perform inside your product code, while also making your product code more "correct" by treating all field errors as explicit errors.

Read more about Semantic Nullability

Relay Resolvers can now have access to context

Thanks for Mark Polak and Drew Atkinson from Microsoft, Relay Resolvers can now be configured to accept a shared context object, similar to standard GraphQL resolvers.

Pull Request

Read more about Resolver context

Ability to opt out of Relay Compiler source control integration

Thanks also to for Mark Polak from Microsoft, the Relay compiler config now supports the option "noSourceControl": true which will ask the Relay compiler to not automatically try to add/remove files from Git or Mercurial.

Pull Request

Editor Integration Improvements

Thanks to Tobias Tengler, Relay's editor support now includes:

  • Intellisense (autocomplete, hover tooltips, diagnostics) for the Relay config file. This fills a critical gap since the Relay config is quite under-documented. (#​4724) by tobias-tengler
    • Editor integration (#​4724) by tobias-tengler
    • Generate JSON schema for compiler config (#​4723) by Jordan Eldredge
  • Rename refactoring tools (#​4581) by tobias-tengler
  • Add Inlay Hints for Fragment arguments (#​4740) by tobias-tengler
  • Improved documentation links in errors and hover tooltips (#​4741) by tobias-tengler
Additional runtime logging integrations
  • [9b24ad]: Log notify stats by Tianyu Yao
  • [ed8a7f]: Add logging for DataChecker by Tianyu Yao
  • [462b01]: Add logging for store l

Configuration

📅 Schedule: Branch creation - "every weekend" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

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

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


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

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

Copy link

changeset-bot bot commented Sep 7, 2024

⚠️ No Changeset found

Latest commit: a498b80

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Sep 7, 2024

Deploy Preview for graphql-testing-library canceled.

Name Link
🔨 Latest commit a498b80
🔍 Latest deploy log https://app.netlify.com/sites/graphql-testing-library/deploys/6815f1bef6e7510008974568
@renovate renovate bot force-pushed the renovate/major-all-dev branch 6 times, most recently from c9b2331 to 5ab9974 Compare September 14, 2024 13:32
@renovate renovate bot force-pushed the renovate/major-all-dev branch 3 times, most recently from d4571bb to b4223df Compare September 28, 2024 09:21
@renovate renovate bot force-pushed the renovate/major-all-dev branch 3 times, most recently from 12f4155 to 4faca3f Compare October 5, 2024 07:46
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 286a038 to b5173c8 Compare October 19, 2024 08:02
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 5cd0fe0 to a8aba6c Compare November 2, 2024 07:44
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from fe6a8fd to 02e2711 Compare November 9, 2024 10:50
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from bf17074 to 797eb12 Compare November 30, 2024 09:28
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 673cb60 to bcca2eb Compare December 7, 2024 08:18
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 5cb0257 to 26c5e27 Compare December 21, 2024 09:22
@renovate renovate bot force-pushed the renovate/major-all-dev branch from 26c5e27 to bf4632c Compare December 28, 2024 10:50
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from b0b990a to 065b744 Compare January 11, 2025 09:37
@renovate renovate bot force-pushed the renovate/major-all-dev branch 3 times, most recently from 8d26192 to 8dd9679 Compare January 18, 2025 08:21
@renovate renovate bot force-pushed the renovate/major-all-dev branch from 8dd9679 to 98e086d Compare January 25, 2025 08:31
@renovate renovate bot force-pushed the renovate/major-all-dev branch from 98e086d to 2da9419 Compare February 1, 2025 20:54
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 3dcdc09 to c536e4c Compare February 15, 2025 09:43
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 223574d to 2cfec29 Compare February 22, 2025 09:25
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 5b0d1f1 to f5dd857 Compare March 8, 2025 10:02
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from f9a9f28 to c6444cf Compare March 22, 2025 10:30
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 356684c to 2626414 Compare April 5, 2025 09:33
@renovate renovate bot force-pushed the renovate/major-all-dev branch 3 times, most recently from 6fe6083 to 0350528 Compare April 19, 2025 09:51
@renovate renovate bot force-pushed the renovate/major-all-dev branch from 0350528 to a3c1bab Compare April 26, 2025 11:33
@renovate renovate bot force-pushed the renovate/major-all-dev branch from a3c1bab to a498b80 Compare May 3, 2025 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
0 participants