Facebook's Relay for React v20 released

14 hours ago 1

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)
  • 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)
Read Entire Article