Skip to content

Releases: facebook/relay

v16.2.0

23 Jan 16:49
Compare
Choose a tag to compare

Minor breaking changes

  • [4e68155d732b]: Reuse TypegenConfig for SingleProjectConfigFile (#4585) by tobias-tengler

This change is a breaking change, as the customScalars config option in the single-project config must now be specified as customScalarTypes.

Added

Bug fixes

  • [b995eec40461]: Update config.ts for typo (#4594) by Orta Therox
  • [2f9e88affdc7]: Fix goto references for TerseRelayResolver (#4587) by tobias-tengler
  • [d513e42f881e]: Suspend on active promises for client edge queries in the new hooks implementation by Andrey Lunyov
  • [eb0b7fcd991c]: Cleanup outdated records after model/output type resolvers updates by Andrey Lunyov
  • [ece1fd953b98]: Fix SDLSchema replacing logic by Deepak Singh
  • [d90dedfc577e]: Replace invariant in SuspenseResource with the warning in the case where GC is disabled by Monica Tang
  • [9f135b8f92a7]: Fix path on Windows (#4544) by martin
  • [aac57b30e812]: UseFragmentInternal should suspend if environment changes and there is a query in flight by Andrey Lunyov
  • [00aabd00be72]: Fix client->client nullable model issue for PluralConcrete object output types by Monica Tang
  • [7b3b0779b570]: Fix client->client nullable model issue for SingularConcrete object output types by Monica Tang
  • [3873809c2df8]: Handle missed updates from the low-priority state changes in the new hooks implementation by Andrey Lunyov

Improvements

  • [0037d05c61d8]: Cleanup allow(unused_imports) by Cameron Pickett
  • [ada971e33838]: Disallow some read time features in mutation responses by Jordan Eldredge
  • [a2c7ed480e2d]: Relay-compiler diagnostic errors logging improvements (#4574) by Alex Coleman
  • [1a57f0832665]: FIX(Graphql): Add support for input with default values (#4540) by eMerzh
  • [2f97f25e53a1]: Consume LiveState from relay-runtime root in typegen by Jordan Eldredge
  • [182a86647000]: Fix missing space in diagnostic location print (#4573) by Alex Coleman
  • [5a18984e4155]: Refactor model resolver codegen to re-use build_reader_relay_resolver by Monica Tang
  • [1972913c2d12]: Augment corpus digraph logic to intake a vec of TextSource by Monica Tang
  • [06cb092ae28f]: Implement compiler command to get graphql text sources and program by Monica Tang
  • [1a06f3269985]: Use Parameters and indexed access type to extract PreloadParams by Sam Zhou
  • [5cf0af11be92]: Update print_schema to support ARGUMENT_DEFINITION and INPUT_FIELD_DEFINITION directives by James Wren
  • [4c25549bcb1a]: More strict selectors equal check by Tianyu Yao

Documentation Improvements

  • [8392b68a5137]: Document directives argument for @refetchable (#4520) by Daniel Lo Nigro
  • [8ef4b47e69d0]: Document current behavior of server edges returning null by Jordan Eldredge
  • [361d0b3fae9f]: Typo fix (#4561) by Randall Bennett
  • [921f2a8715a1]: Fix(docs): normalize local data updates doc (#4564) by Guilherme

Miscellaneous

  • [4619f9706d97]: Add a json output option by Tianyu Yao
  • [49e4da17abbc]: Make compiler results seriaizable by Tianyu Yao

Experimental Changes

  • [5718ca9fd9b2]: Transform to convert fragments and linked fields on abstract types to inline fragment by Monica Tang
  • [399bf9201eba]: 6/n - Add tests for errorResponseFields by Itamar Kestenbaum
  • [27a062376ce3]: 5/n - Add erroring on seeing relayFieldErrors by Itamar Kestenbaum
  • [12d169fc9c23]: 4/n - Add logging on seeing relayFieldErrors by Itamar Kestenbaum
  • [0a9d473edeee]: 3/n - Add RelayFieldError and rename RelayFieldError to TRelayFieldError by Itamar Kestenbaum
  • [914794c4ddba]: 2/n - Rename requiredFieldLogger to relayFieldLogger by Itamar Kestenbaum
  • [af4afbdc2ab3]: 1/n - Add field errors to Snapshot by Itamar Kestenbaum
  • [08c32cfede3b]: Integration test for resolvers implementing fields for interface by Jordan Eldredge
  • [396a1dbfb8cd]: Expose live resolver modules outside of experimental-live-resolvers directory by Jordan Eldredge
  • [bac5f9c790a9]: Update for normalization node changes by Bhuwan Khattar
  • [8dd004f4711a]: Add apply_to_normalization_ast config for resolvers_schema_module by Bhuwan Khattar

Full Changelog: v16.1.0...v16.2.0

v16.1.0

11 Dec 20:21
Compare
Choose a tag to compare

Added

  • [b683e8c2c355]: Add validations for custom scalar arguments by Alex Danoff
    Enable flag enable_strict_custom_scalars to perform validations when custom scalar types are used, to check that the user doesn't try to pass literal values (strings, ints, etc) in positions where a custom scalar type is expected, as this can break type safety since Relay can't know whether those literals conform to the underlying custom type.

Bug fixes

  • [b379edf30a6e]: Handle the document type change from Query to Fragment by Andrey Lunyov
  • [5ffcdbcf0114]: Fix missing validation for global variables in client-edges (#4513) by Andrey Lunyov
  • [8e0949d6d90a]: Apply fragment renaming to resolver fields by Jordan Eldredge

Improvements

  • [dfad61878904]: Fix types in RelayMockPayloadGenerator.js by George Zahariev
  • [24ef22b4946c]: Adopt conditional type for useRefetchableFragment related functions by Sam Zhou
  • [400cfa841445]: Refactor extra typegen config fields into TypegenOptions struct by Monica Tang
  • [e694ba8792a6]: Use conditional type to power EntryPointElementConfig by Sam Zhou
  • [1cc9d937ea1a]: Refactor extra artifact project config fields into extra_artifacts_config by Monica Tang
  • [cf0fb394dbb6]: Incremental build compatible ResolversSchemaModule by Bhuwan Khattar
  • [0d429f796e69]: Implement fmt::Display for SchemaChange by Monica Tang
  • [d48a0e025385]: Fix RelayResolverModel-test by Monica Tang
  • [ab92df525948]: Use placeholder in connection warning by Jan Kassens
  • [6519571a092a]: Shallow freeze resolver value by Tianyu Yao
  • [7f54255c92ea]: Do not mutate a shallowly frozen subtree by Tianyu Yao
  • [904924c6925b]: Add validations for mutation resolvers by Alex Danoff
  • [ef84550353b6]: Handle panics in integration tests by Alex Danoff
  • [5c7555b2c00d]: Expose Sink type from relay-runtime (#4516) by jaroslav-kubicek
  • [9e0acc1d8c77]: Improve test coverage for recycleNodesInto on deeply frozen data by Tianyu Yao
  • [6b89a29678ad]: Add normalizeResponse to MultiActorEnvironmentConfig by Bhuwan Khattar
  • [61c7bffac76f]: Regression test for mutating complex resolver values by Tianyu Yao
  • [22a3c89f9518]: Import ClientRequest for client only mutations by Alex Danoff
  • [3017057e77eb]: Only freeze plain JS objects and arrays by Tianyu Yao
  • [f90edc4cb52a]: Add regression test for fragment spreads with undefined global variables as arguments by Monica Tang
  • [8011e22b6043]: Add areEqualOwners to check for structural equality of fragment owners. (#4500) by Andrey Lunyov

Documentation Improvements

  • [e854fa04acfe]: Typos (#4532) by Michael Letcher
  • [06756209a4aa]: Fix typo in website/docs/tutorial/queries-1.md (#4522) by Priyansh Agrawal
  • [59f5d604bb43]: Fix typo in Relay Mutations & updates doc by Mingshi Yang
  • [a0b50ac400b4]: Add graphql operation naming and organization docs by Aaron Lichtman
  • [19970477942d]: Add blog post explaining how Relay provides unique value in data loading by Jordan Eldredge
  • [4668757a37e9]: Add back updating-connections to current doc by Tianyu Yao

Miscellaneous

  • [2863820b5000]: Export fragment type generation for FCL setup by Monica Tang
  • [4712bcc92e85]: Replace uppercase React import with lowercase one by Sam Zhou

Experimental Changes

  • [cf30bf4a3561]: Upstream resolvers_schema_module from fb-relay-compiler by Bhuwan Khattar
  • [05689b07f341]: Js_module_import_path -> js_module_import_identifier by Bhuwan Khattar
  • [a2c57d988bc2]: Consolidate __relay_model_instance definitions by Monica Tang
  • [4f7739ac3363]: Generate_schema_resolvers -> ResolversSchemaModule by Bhuwan Khattar
  • [400090b0ad8a]: Make LiveState and suspenseSentinel top level exports of Relay by Jordan Eldredge
  • [07a90ee56ab5]: Repro tests for resolver client edges to nullable models by Monica Tang
  • [5bbdfc92cd35]: Generate rootFragment normalization ast for schema_resolvers by Bhuwan Khattar
  • [70a5ff0b15c9]: Always pass an args object to resolvers that define runtime args by Jordan Eldredge
  • [3ee60181ff50]: Inject useFragmentInternal to use in useLazyLoadQueryNode by Andrey Lunyov
  • [aa64b588fff4]: Unsubscribing from resolvers before removing the record while runing the garbage collector by Leonel Fernandez Mir
  • [44227353d574]: Validate that field arguments passed to relay resolvers are defined by Monica Tang
  • [930864a33ede]: Deprecate verbose resolver syntax with feature flag to enable by Jordan Eldredge
  • [86dc27050b26]: Add regression tests for undefined fragment arguments in relay resolvers by Monica Tang
  • [00d621701622]: Add regression tests for undefined field arguments in relay resolvers by Monica Tang
  • [41a33a19331f]: Add regression tests for both field and fragment arguments in relay resolvers by Monica Tang
  • [0c70e547f27b]: Update normalization AST generation by Gerard Moreno-Torres Bertran

v16.0.0

19 Oct 22:38
Compare
Choose a tag to compare

Breaking

  • Arguments passed to the filters keyword for the @connection directive will now throw if they are invalid instead of being a no-op. [2dd7954]

Flow-related breaking changes:

  • Explicit type annotations are no longer needed for commitMutation [603ce54] and useMutation [051e469].
  • Records can no longer be modified directly and can only be passed to utility functions such as those in RelayModernRecord.js. [21a896c]
  • Added the babel-plugin-syntax-hermes-parser plugin, which switches Babel to use hermes-parser instead of @babel/parser, and enables full syntax support for Flow. [c320a89]
  • [1d95ce2] - Make React.Element fully opaque

TypeScript-related breaking changes:

  • Empty variables will now be typed as Record<PropertyKey, never> instead of as {} to represent an object without properties. [16910c9] (#4404)
  • Nullable fields will now yield a union of the actual type, null and undefined (T | null | undefined) instead of (T | null). To keep the old type generation behavior for now, you may set the typescriptExcludeUndefinedFromNullableUnion feature flag in the relay-compiler config as follows. Note the feature flag will be removed in a future release. [cc47bc9] (#4380)
    • Update: We will leave the feature flag available indefinitely, or until we have an explicit solution to missing data. See this issue for more context.
{
  "language": "typescript",
  "typescriptExcludeUndefinedFromNullableUnion": true
}

Bug Fixes

  • [313d62d] - Don't assign to frozen objects and arrays
  • [a5e0ba3] - Fix flow errors in the reactive executor and relay runtimes
  • [17f4abf] - Make isWithinUnmatchedTypeRefinement be set on a per-fragment basis
  • [33d5475] - Fix RelayObservable ifEmpty: Cannot access 'current' before initialization
  • [4123383] - Do not freeze array buffer views
  • [a2c2b64] - Get compiler playground working again (#4336)
  • [04005db] - Replace invalid variable characters for import name (#4293)
  • [0fce632] - Fix refetching and pagination when using a custom nodeInterfaceIdField (#4053)
  • [e784ee4] - Fix version number parsing in cannotReadPropertyOfUndefined__DEPRECATED (#4314)
  • [a79038b] - Fix some grammar in validation selection conflict error messages
  • [6f30869] - Updating connection handler to be able to deal with streamed edges that are already in memory
  • [2699206] - Always use / as path separators in generated artifacts (to allow stable compilation between windows and unix-based systems)

Experimental

Relay Resolvers are an experimental feature of Relay which allows you to model derived data, and soon client state, in your Relay graph. Since our last release we’ve put considerable work into stabilizing the feature. This includes bug fixes across our compiler, type generation, runtime and LSP (editor integration). In particular, contributors have fixed a number of bugs which made it impossible to use Relay Resolvers with TypeScript.

Documentation:

  • [bd95f00] - Updates RelayResolvers docs to include terse syntax and updates to the module resolution details

Improvements:

  • [15c2715] - Fix compiler issue with stale artifacts for Resolvers in watch mode (#4415)
  • [0b2791f] - skip_redundant_nodes: do not mess with order of selections within inline fragments with client edge metadata
  • [77304c2] - Add flag and validation for strict resolver flavors
  • [3d66ad8] - Add artifact with schema resolvers
  • [998fd49] - Regression test for not detecting undefined variables on resolver fields
  • [556d696] - Fix Relay Resolver typegen for Typescript-based projects (#4274)
  • [508dca3] - Add handleMissedUpdates to subscription callback
  • [c899a68] - skip generating client edge queries for base project fragments
  • [bb50fdf] - Support Graph Mode GraphQL response data processing
  • [c93322b] - Add directives to the base project resolvers (types/fields)
  • [5d22d1c] - Show a helpful error if a resolver returns an interface with no implementors (#4428)
  • [a8dc8a9] - Retain description for terse resolvers
  • [64b707d] - Set the cache as missing state when missed updates
  • [b09fd94] - Support for suspend after initial mounting for plural fragments
  • [f4bdd5a] - Components can suspend after initial mounting
  • [900f40c] - Update operation tracker for optimistic updates
  • [b2dcbfe] - Allow @required to bubble to client edge resolvers.
  • [b23fe58] - Split out method in RelayReader responsible for propagating resolver metadata
  • [fca7a9c] - Catch errors thrown during .read()
  • [4a1d71d] - Log Required fields even if not missing data
  • [5dfb88b] - Simplify what we keep in the store for resolver errors
  • [feaba45] - Validate that resolver fields are always nullable
  • [147498f] - non-nullable __relay_model_instance
  • [6e4ff95] - Unify handling of plural/nullabile resolver field types
  • [2732238] - Reflect correct resolver type in test fixture
  • [f0e802a] - Ensure incremental builds include all @rootFragment fragments
  • [6a80a0f] - Add runtime test validating plural @live field
  • [6347254] - Fix bug where suspending @weak resolver values were getting normalized
  • [3c44796] - Enable tsx extension on relay resolvers (#4303)
  • [a02b706] - Don't wrap nullish values returned from @weak model resolvers
  • [0fe2553] - Allow legacy resolvers with @rootFragment on model types
  • [fd06faa] - Preserve correct resolver path across client edges
  • [fccb3c8] - Allow resolvers with @rootFragment on model types
  • [b4099fc] - Type bug with resolverDataInjector and resolvers that accept args
  • [5c0a740] - Fix for @required on client edges
  • [ed612b8] - Add feature flag for operation tracking that would work with lazy React notification
  • [cf1650e] - Log on LiveResolver batch start/end
  • [f7d62f4] - When adding a concrete object that implements an interface to a schema, also modify interfaces

Improvements

  • [58da806] - Allow configurable @defer/@stream names (#4467)
  • [c4618c6] - Add support for copying field errors into the store
  • [9a96c6a] - Improve error message clarity
  • [4ffd869] - Add typescriptExcludeUndefinedFromNullableUnion to SingleProjectConfigFile (#4482)
  • [51fca35] - Stabilize printing paths in fixture tests
  • [9c7b92a] - Type-safe updaters for TypeScript (#4370)
  • [0bc4142] - allow using provided variables with refetchable fragments
  • [38a08ed] - Allow printing interfaces implementing interfaces
  • [1328fc1] - Export node from assignable fragment (#4409)
  • [bacd1ae] - Allow extending interface interfaces
  • [7ba6387] - Add getFields() to RelayModernRecord
  • [a062e17] - Extend multiple schemas in parallel
  • [699b0ab] - Improve fragment and fragment spread hover
  • [091a4f0] - Allow ast_diff_in_doc drops machine readable struct
  • [99ce43f] - Inject changed schema files when loading from saved state
  • [bc40b4b] - Fix error message in UpdatableDisallowRelayResolvers error
  • [7a14de0] - Extract type for RequiredFieldLoggerEvent
  • [95c54b4] - Allow persisting to also include the query text for safe migration (#3917)
  • [de6594b] - Using opaque type trick to enforce nested relay entry point safety
  • [ce74006] - Recommend Babel extension to fix VSCode syntax highlighting (#4324)
  • [d04c7be] - MockPayloadGenerator support for @no_inline with args
  • [39ebc1c] - Avoid reusing AST nodes (#4309)
  • [35fea88] - Add parent node information when providing error about printing empty selections
  • [2108aed] - Add support for deferred fragments in MockPayloadGenerator

Documentation

Additions:

  • [356bc78] - Docs v15.0.0
  • [5df8aee] - Add blog post highlighting changes in Relay 15 (#4258)
  • [098a84e] - Add Réa to list of relay users (#4430)
  • [6e9e000] - Build Wasm compiler explorer when deploying docs website (#3928)
  • [1ef73b2] - Update mutations-updates.md (#4424)
  • [563c570] - Update connections-pagination.md (#4423)
  • [8fcf1fc] - update docs for missing field handlers (#4259)
  • [2877676] - Add doc explaining client mutation ID and actor ID

Typo fixes:

  • [610806b] - Fix typo in testing-relay-with-preloaded-queries.md (#4405)
  • [3b9f90a] - Fixed typo in refetchable-fragments.md (#4427)
  • [b998f9b] - fix(docs): remove duplicate text in MutationConfig.md (#4462)
  • [0d63f5a] - Update documentation with corrected usage of useTransistion
  • [10f00e4] - Fix typo in tutorial (#4444)
  • [555ebfd] - Fix link to an explanation of @raw_response_type usage (#4435)
  • [5450fcd] - Fix small typo in tutorial (queries-2.md) (#4398)
  • [6910c55] - Connections Doc Minor Typo Fix (#4369)
  • [34a3581] - Fixed a typo in the website tutorial (#4342)
  • [9942761] - Fix typo in load-query.md documentation (#4106)
  • [7094921] - docs: add missing comma (#4295)
  • [dc659df] - docs: Fix typo in getting-started/installation-and-setup.md (#4306)
  • [442d494] - Fix typo in jest method name (#4271)

Tutorial updates:

Other corrections:

  • [9eb2747] - fix(docs): readInlineData function (#4451)
  • [0ce764a] - Remove flow-type parameters from Relay AP...
Read more

v15.0.0

08 Mar 22:16
Compare
Choose a tag to compare

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

v14.1.0

27 Jul 17:37
Compare
Choose a tag to compare

Relay v14.1.0 adds improvements for existing relay features - primarily fixes and feature compatibility for client extensions and @inline. Thanks to our open source contributors who helped us release the Relay VSCode Extension!

Added

[cefab9e] Support for @required and client-edges
[90ccda1] Support @argumentDefinitions in @inline fragments (#3935)
[8adcfab] VS Code: Find references of the Resolver field.
[b965299] useClientQuery hook
[7d5cc34] Add support for resolvers without fragments
[8db002f] Support custom scalar arguments that are passed as literals

Fixed

[a5d67d6] Add resolvers to the dependency graph (Fix missing resolver fragments in incrmental mode and VS Code)
[57f96a1] Improve error message when you mix up @live and non-live values.
[c4dbd26] Remove .js and .ts from require / import (#4002)
[cd1e9ae] Fix MutationHandlers on field with args
[7e6dbdd] Ensure only one implemntation on interface
[055908f] VS Code: Fix comment blocks to recognize the embedded language inside of a JS file. (#4001)
[6a9b0e5] Performance optimizations in the validate_conflicting_selections
[fa5a3ba] Explicitly enumerate unsupported ReaderNode types
[9990e6f] Disallow default values on resolver fields
[d42bb7c] VSCode extension pathToRelay doesn't allow relative paths (#3969)
[a86323f] Validate conflicting selections in client fields

v14.0.0

08 Jun 15:11
Compare
Choose a tag to compare

What's Changed

Breaking Changes

  • [8bb7478] Removed compiler CLI arguments: src, schema, artifactDirectory. This simplifies the public API of the compiler. The error message should print helpful message with possible config file, that can be used instead of these CLI arguments.
  • [44d6887] Relay Compiler: Make language configuration option required. In v13, we have default language as flow (or Javascript with Flow comments) for reading and generating artifacts. Majority of the projects in OSS, however, use typescript - in order to detect which language (typescript, JS, or flow) is used in the project we will use this option.
  • [ed53bb0] New compiler validation: Disallow __typename in fragments on query.
  • [20626f2] Make __typename selections within concrete linked fields have a string literal type, instead of the type string.
  • [48ed515] Removed legacy exported type names from generated files. typegen_phase have been removed from the Relay compiler config.

Added

Fixed

  • [e8c9ffe] Relay Compiler: make LocalPersister include trailing newline (#3938)
  • [384315d] Report schema location for invalid types (#3924).
  • [141ef0f] Avoid bug where watch mode can get stuck in invalid state (#3922).
  • [c48bda9] Ignore BOM when lexing (#3908).
  • [6cff97d] declarative_connection: allow interfaces or objects.
  • [52af6a6] Don't flatten fragment spreads with differing directives
  • [5a9d42e] Fix incorrect type generation with @required on plural fragments.
  • [739009f] remove DEPRECATED_GraphQLSubscriptionConfig type.
  • [928728a] Relay Compiler: Detect cyclic @inline fragments.
  • [eb0fc26] Hooks: Fix useMutation inFlight race condition (#3841).
  • [2101a79] Relay Compiler: Sort locally persisted operations (#3835).
  • [9f0dea4] Relay Compiler: Sort unions conditionally.
  • [b04b2b7] Sort object members in type generation (conditionally) (#3808).
  • [bb7c65f] Relay Compiler: Handle spaces between graphql tag and template. literal.

Improvements/Misc

  • [9556f2f] Persist explorer state in the URL/local storage (#3930).
  • [dd48057] Performance optimizations in selection conflicts validations.
  • [bb8721f] Quote key names in complex type field argument literals.
  • [4e2030f] Add FAQ page to docs.
  • [c6ecd52] Print fragment variables.
  • [7b6e7f5] Track directives on argument definitions.

Full Changelog: v13.2.0...v14.0.0

v13.2.0

10 Mar 18:08
Compare
Choose a tag to compare

Added

  • [0c59b5a] Tear out the DELAY_CLEANUP_OF_PENDING_PRELOAD_QUERIES experiment
  • [7207485] Parse Resolver Definitions from docblocks
  • [a2285b8] Create a separate ArtifactContent variant for UpdatableQuery
  • [b211acf] Add interface that implements interface to test schema
  • [6565c7c] Document Relay Resolvers
  • [e21d89e] always enable ENABLE_QUERY_RENDERER_OFFSCREEN_SUPPORT
  • [5172d1b] Rust crate for pruning fields from type schemas
  • [fde6ec6] Start considering docblocks in LSP
  • [e97263f] Support index with suffixes when validating module names (#3805)
  • [d5fadad] Make path a non-optional field now that we've rolled out the compiler…
  • [2e5799d] Include React 18 in peerDependencies (#3829)

Fixes

  • [a8fd33d] Added tests that show nested fragment bug (1/2)
  • [a2037ae] Patch edge case: add provided variables to relevant root operations
  • [4801f2b] Use default language in CliConfig
  • [d794a41] Fix off by one error
  • [d48778c] Add test case for @ module and provided variables (1/2)
  • [8707399] Patch for SplitOperation and provided variables (2/2)

Improvements

  • [01a4499] Make readUpdatableQuery docs match copy in previous docs
  • [be382cf] docs: add graphql-ws as a websocket client (#3245)
  • [86e2580] Use $fragmentType instead of $ref in docs
  • [5c1e15b] Clarify that we are watching not waiting
  • [c978b97] Guard against invalid saved state
  • [e6fc28a] add directives support to @argumentDefinitions in graphql-ir
  • [74df20c] Update internalAct
  • [4a8ecea] Attach location information to missing field diagnostics
  • [9c9c978] Implement get_all for all IncrementalSources
  • [fa83f1e] disallow warnings/errors in QueryResource test
  • [a552532] Expose ability to extend objects after the schema has been created.
  • [bdbc736] Allow marking Relay Resolvers as deprecated
  • [bfe0e65] Use better location for invalid Relay Resolver root fragment
  • [1e923be] Move suggestion_list to schema
  • [6e8b52f] Avoid panic when a query consists of only client extension selections.
  • [453fb0b] Simplify and improve converting common::Location to lsp::Location
  • [095135f] Remove special handling for go-to-def for Resolvers
  • [dbe2c9f] Support Relay Resolvers on interfaces
  • [21a89d7] Suggest alternate type/interface if you pick one that does not exist
  • [764af24] Provide code actions to fix a typo on the interface/type of a Resolver
  • [3da1c01] Targeted error message/code action when mixing type/interface
  • [6357056] Add suggestions with code actions when you typo a fragment name
  • [ee5da1e] Add path to Resolver codegen nodes
  • [5b259b1] use scoped $FlowFixMes
  • [f01cad2] Improve hover message for Relay Resolver Fields
  • [47d9d20] Catch errors thrown by Relay Resolvers
  • [b8e78ca] update useLazyLoadQuery docs to remove type argument
  • [7fc1e54] Report syntax errors on type (without waiting on save)
  • [32d17fa] Refactor RelayModernEnvironment to access the network via public methods
  • [d743943] Avoid duplicate output in the compiler CLI
  • [92bf547] remove unnecessary getRequest calls

Misc

  • [ebf30bb] Remove dead QueryResource Suspense handling
  • [ebce9eb] Remove redundant assertions from QueryResource tests
  • [00b9012] Rename and move RelayResolverMetadataSource → DocblockSource
  • [b565fc5] Avoid unused type params
  • [2177e00] Make SourceSet and ProjectSet iterable
  • [77f4f79] Return docblock sources as part of extract
  • [035e29f] Add location to docblock AST
  • [d6ee691] Remove unused QueryResource cache APIs
  • [0308bfa] Dedupe selections in react codegen
  • [e3da29b] use disallowWarnings from test utils
  • [80e621f] Use disallowWarnings in `FragmentResource with Operation Tracker and …
  • [6ef14e5] Sub out a crate responsible for parsing docblock AST into information…
  • [559cbb7] Parse docblock to ir struct
  • [e4237b3] Derive a schema AST from Resolver IR
  • [0cfdd54] Use disallowWarnings useBlockingPaginationFragment-test.js and
  • [3738783] disallow console.error
  • [880c82c] disallow errors/warns in useLazyLoadQueryNode-test.js
  • [e8b5596] Track embedded source indexes explicitly
  • [7687c7a] Improve test output for relay-docblock
  • [72622e5] Merge SourceSet and ProjectSet
  • [ffce580] Model ProjectSet as a newtype vec
  • [ebf30bb] Remove dead QueryResource Suspense handling
  • [6f95ab7] Update transform test to use source location
  • [9cd3331] Cleanup compiler feature flag to enable parsing docblocks
  • [d0806d4] cleanup ENABLE_QUERY_RENDERER_OFFSCREEN_SUPPORT feature flag
  • [6216580] Show guide in internal docs
  • [98162d3] Add homepage banner in support of Ukraine (#3824)
  • [62f6457] cleanup usage of interface type for UploadableMap
  • [e2d53b4] cleanup usage of interface type in MutationVariables
  • [625370e] cleanup usage of interface types
  • [5a7646e] add disallowWarnings to LazyLoadEntryPointContainerDEEPRECATEDTest
  • [4f3c83c] Disallow error/warn in some tests in relay-hooks
  • [605e366] Disallow warn/error in loadQuery test
  • [36013ae] Make SourceText generic
  • [d853010] Move Span::to_range() to TextSource
  • [e75b909] Port NoFragmentCyclesRule
  • [e02717c] Add a persister for Instagram(distillery)
  • [a758c0d] remove unnecessary getFragment calls
  • [8313676] small followup cleanup for getFragment/getRequest
  • [3497ce7] Shared implementation of disallowWarnings and disallowConsoleErrors
  • [91feecf] remove rollout flag for @relay_flow_enum directive (4)

Experimental

  • [b430570] Add readUpdatableQuery_EXPERIMENTAL docs about updating linked fields
  • [874ca73] Add optional feature flag to parse docblocks
  • [d2d2d1f] React Cache: useLazyLoadQuery and useFragmentInternal implementation
  • [ca31ec1] add rollout flag for relay_flow_enum_directive to compiler (1)
  • [3070fa3] Fork RelayModernStore and add test
  • [03afd5e] Fork ResolverCache
  • [43c8e82] Sketch out External State Resolvers
  • [e8019de] Emit different types and Reader AST for Relay Resolvers with @ LiVe in…
  • [8d23f5a] Add new node type for live resolvers.
  • [af7a254] Start to adopt new Reader node type
  • [220c729] Rebrand External State Resolvers to Live Resolvers
  • [20208b1] Add rollout option for sorting typegen output
  • [c7cb886] Add a ConcreteUpdatableQuery variant to GraphQLTag
  • [2faed63] Do not generate unused ASTs, params for updatable queries

Full Changelog

v13.1.1...v13.2.0

v13.1.1

09 Feb 18:02
Compare
Choose a tag to compare

Fixed

  • [b23570e] Restore live query in non fb_only (#3790)
  • [af26269] Expose typegenPhase in the single project config file. See release v13.1.0 for more details.

Full Changelog: v13.1.0...v13.1.1

v13.1.0

08 Feb 16:53
Compare
Choose a tag to compare

Misc

  • [0ad48b3] removes old aliases in generated files by default. This can be restored temporarily with the compiler config "flowTypegen": "Compat" but projects should migrate to using the updated names (e.g. MyFragment$fragmentType instead of MyFragment$ref.

Full Changelog

v13.0.3...v13.1.0

v13.0.3

07 Feb 21:41
Compare
Choose a tag to compare

Fixes

  • [052cf72] [e2888b9] Documentation Improvements
  • [c12b08c] Try to fix validateMutation for __isX fields
  • [2ec85b8] Fix null comparison for skip_printing_nulls (#3784)
  • [5a16a25] Fix import fragment spread in @raw_response_type
  • [3e499ed] Add test to repro weird @raw_response_type behavior

Improvements

  • [6be20cb] Add a JSON file query persister strategy to relay-compiler (#3666)
  • [f30289f] Print directives on query variable definitions
  • [3c70123] Remove unnecessary null values from metadata (#3626)
  • [f8123fd] Update non-mutation documentation
  • [0b5a8b9] New file category: Ignore. To keep some files in __generated__ (or in artifactDirectory) directories
  • [e5acd86] Easy content changes to relay mutation docs

Misc

  • [d7f3efc] Bump parking-lot to version 0.12.0
  • [7a3861f] add prctl 1.0.0
  • [45126df] Remove worker_count from the OperationPersister interface
  • [da917c9] Deploy 0.171.0 to xplat
  • [6649f5f] Daily common/rust/cargo_from_buck/bin/autocargo
  • [becedd9] Intern RelativePath using intern::PathId
  • [2a06405] Fixed Repository Reference in monorepo package.json files (#3467)
  • [0007a66] Update indexmap to 1.8.0
  • [1e51356] Change ImportStatements → TopLevelStatements

Experimental

  • [a2fdae5] Stub out Docblock Parser
  • [8ece9fc] LSP: Change default response error code to avoid blocking codeactions
  • [5fd5059] LSP: Fix a on-hover message
  • [c29ee16] LSP: Reuse complete func in relay-lsp
  • [ef3efc6] LSP: Attach field type in detail field
  • [690d511] Provided Variables: Add to docusaurus
  • [9e60e09] Provided Variables: Remove duplicate definition in generated artifacts

Full Changelog: v13.0.2...v13.0.3