- Relay 16.2.0, see:
- Relay 15.0.0, see: https://github.com/facebook/relay/releases/tag/v15.0.0
- The deprecated
QueryRendererhas been removed. You should use appropriate Relay hooks alternatives. - Dependency on
@adeira/fetchhas been removed which means:- errors
FetchResponseErrorandFetchTimeoutErrorare no longer being exported from the package - function
createNetworkFetcherno longer acceptsfetchTimeoutandretryDelaysconfig options
- errors
- Relay 14.1.0, see: https://github.com/facebook/relay/releases/tag/v14.1.0
- The network layer now takes
QueryResponseCacheinto account. - Add experimental
RelayRehydratePreloadedQueriesquery to allow usage ofusePreloadedQueryin Next.js applications.
- Use Relay 14.0.0, see: https://github.com/facebook/relay/releases/tag/v14.0.0
- Removed old
LocalQueryRenderer,createLocalEnvironmentandgetDataFromRequest
- Use Relay 13.1.0, see: https://github.com/facebook/relay/releases/tag/v13.1.0
- Use Relay 13.1.1, see: https://github.com/facebook/relay/releases/tag/v13.1.1
- Use Relay 13.2.0, see: https://github.com/facebook/relay/releases/tag/v13.2.0
- Added support for
@live_querydirective.
- Use Relay 13.0.2, see: https://github.com/facebook/relay/releases/tag/v13.0.2
- Relay 13, see: https://github.com/facebook/relay/releases/tag/v13.0.0
- The old Relay Compiler wrapper has been replaced with the new Rust Compiler. This is the only compiler available in Relay 13+ and you can read more about this change here: https://relay.dev/blog/2021/12/08/introducing-the-new-relay-compiler/
- Binary
adeira-fetch-schemahas been removed. Fetching of the GraphQL schema is not responsibility of this package anymore. - Added logging of required fields (
@required(action:LOG)directive).
-
Breaking: Relay version upgraded to 12.0.0, for more information please visit: https://github.com/facebook/relay/releases/tag/v12.0.0
-
Breaking: All previous loggers (
RelayEagerLogger,RelayLazyLoggerandRelayDebugLogger) were replaced with one simpleRelayLogger. This allows us to focus better on one solution that is more friendly with the new Relay Hooks development workflow. -
Breaking: function
commitMutationAsynchas been removed. You can still use legacycommitMutationor preferablyuseMutationhook which is much better replacement for these functions. -
Breaking: types
PaginationRelayPropandRefetchRelayPropwere renamed toRelayPaginationPropandRelayRefetchProprespectively. Additionally, they now expect component instead of props type in the generic type (that applies toRelayProptype as well). Migration example:- }): FragmentContainerType<Props>); + }): RelayFragmentContainer<typeof DefaultComponent>); - ): PaginationContainerType<Props>); + ): RelayPaginationContainer<typeof DefaultComponent>); - ): RefetchContainerType<Props>); + ): RelayRefetchContainer<typeof DefaultComponent>);
-
Breaking: new version of
fetchQueryfrom Relay 11 (returns observable instead of promise). For more information please visit: https://github.com/facebook/relay/releases/tag/v11.0.0. Easiest migration path (BUT be aware of the limitations):- await fetchQuery(environment, query, variables); + await fetchQuery(environment, query, variables).toPromise();
- Added support for GraphQL errors with
CRICITALseverity: you can mark any error to be critical by adding this value toerrors[*].extensions.severity. Such errors will be propagated to any availableErrorBoundarywhen usinguseLazyLoadQueryor toonErrorcallback when calling a mutation. - Removed forgotten dependency
relay-compiler-experimental(followup after 3.2.4) - Bump commander from from 7.2.0 to 8.0.0
- Export type
PreloadedQuerythat is handy when usingusePreloadedQueryhook for example.
- Removed experimental bin
adeira-relay-compiler-experimentalbecause it was causing issues when installing@adeira/relayvia NPM (see adeira/universe#2328). If you want to use the new Relay Rust Compiler please install it directly viarelay-compiler-experimental(https://www.npmjs.com/package/relay-compiler-experimental).
Note for all Flow users: all projects in adeira/universe now use implicit exact Flow types ({} for strict objects and { ... } for open objects, syntax {||} is deprecated). We do not expect any issues as long as you are using exact_by_default=true Flow option.
- Relay dependencies upgraded to version 11.0.2, see: https://github.com/facebook/relay/releases/tag/v11.0.2
- experimental Relay Rust compiler upgraded to the latest
masterversion
- Added experimental bin
adeira-relay-compiler-experimentalwhich directly calls officialrelay-compiler-experimentalbin. This new Relay compiler written in Rust is unstable (as the name suggests) but eventually will be the default. For now, you can start experimenting with it and report any issues tofacebook/relayrepo.
- Relay dependencies upgraded to version 11.0.1, see: https://github.com/facebook/relay/releases/tag/v11.0.1
This minor release is focused on cleaning old internal code and removing some legacy parts of the library. The goal is to have a clean and stable version before eventually removing the container API (and keeping only hooks API). But don't worry yet - we follow upcoming Relay releases.
- removed required
X-ClientHTTP header fromcreateNetworkFetcher(you can still use it but it's no longer mandatory) - relax signature verification when using
adeira-relay-compiler- it no longer requires the signature but still verifies it if it exists - script
adeira-fetch-schemanow reads schema path fromrelay.config.jsfile (it still supports--filenamefor backward compatibility but that will be eventually removed) - removed dependency on
@adeira/logger
- fixes a Flow issue when using
@refetchable(useRefetchableFragmenthook), see: adeira/universe#1975
This release introduces Relay Hooks in a backward compatible fashion. Next major version of @adeira/relay will focus on phasing out legacy parts of Relay Modern (containers API), so it's highly encouraged to upgrade as soon as possible, see: facebook/relay#3371
- Relay dependencies upgraded to version
11.0.0, see: https://github.com/facebook/relay/releases/tag/v11.0.0 - Additional Relay hooks were exposed:
useEntryPointLoader,useFragment,useLazyLoadQuery,usePaginationFragment,usePreloadedQuery,useQueryLoader,useRefetchableFragment,useSubscribeToInvalidationStateanduseSubscription(+ some other hooks specific functions) - Packages
@adeira/relay-runtimeand@adeira/relay-utilsmerged to this package. Everything should work without any extra changes (except for updating the exports). Please, let us know in case we missed something.
For more information about Relay Hooks evolution please visit the following links:
- https://github.com/facebook/relay/releases/tag/v11.0.0
- https://relay.dev/blog/2021/03/09/introducing-relay-hooks/
- https://relay.dev/docs/ (new)
- facebook/relay#3371
adeira-fetch-schemascript fixed
- Support for Node.js 12 has been removed. This package might continue working on older Node.js versions, however, it's highly recommended upgrading to Node.js version 14 or newer. For more details, see: https://nodejs.org/en/about/releases/, or discuss here: adeira/universe#1588
- Use
RelayLazyLoggerinstead ofRelayEagerLoggerby default.
- Upgraded Relay to version 10.1.0, see: https://github.com/facebook/relay/releases/tag/v10.1.0
- Change to use the new JSX transforms
-
Added new Flow utils
FragmentContainerType,RefetchContainerTypeandPaginationContainerTypewhich will help you to migrate to the newtypes-firstFlow architecture (https://medium.com/flow-type/types-first-a-scalable-new-architecture-for-flow-3d8c7ba1d4eb). Example:import { createFragmentContainer, graphql, type FragmentContainerType } from '@adeira/relay'; // ... export default (createFragmentContainer(Location, { location: graphql` fragment Location_location on Location { name country } `, }): FragmentContainerType<Props>);
- Upgrade relay to 10.0.1
- Remove
handlerProviderfromcreateEnvironment, leaving the default fromreact-relayto be used if the consumer doesn't add one.
- Upgrade relay to 10.0.0
QueryRenderertypes defined as generic
- Replace
readInlinefunction withreact-relayimplementation.
- Upgrade relay packages to 9.1.0
- Remove record proxy type
- Import record proxy type from
@adeira/relay-runtime
- Upgrade
babel-plugin-relaydependency
- Export
useMutationfrom index.js
- Relay upgraded to the latest version 7.0.0 (see: https://github.com/facebook/relay/releases/tag/v7.0.0)
- Old Relay logger has been replaced with new event-based logger.
- Removed all custom Relay Compiler validations.
- Improve
RefetchOptionstype
- Improved flow type coverage of Relay store.
- Compiler: added
includeandexcludearg options.
- Fixed Flow types for
createFragmentContainer,createPaginationContainerandcreateRefetchContainer. This may yield many new errors especially if you didn't type your React components correctly. But don't worry, the upgrade can be very simple and automated - contact us directly. :) - Compiler: added support for experimental FS persist mode (see Relay Example project).
- Function
commitMutationis now defined with generic Flow type. You can now use types generated by Relay compiler:commitMutation<NamedMutation>(...). - New experimental function
commitMutationAsyncadded - this function is the same likecommitMutationexcept it returns Promise.
- Burst cache timeout changed to 2 seconds.
- Added invariant check for correct container factories usages.
- Added support for
readInlineData(should be combined with@inline, see: https://relay.dev/docs/en/graphql-in-relay.html#inline). - Export
DeclarativeMutationConfigFlow type.
- Expose new experimental
RelayEnvironmentProvidercomponent anduseRelayEnvironmenthook.
- Added typed
fetchQueryto the public interface (see: https://relay.dev/docs/en/fetch-query)
- Breaking: Relay upgraded to the latest version 6.0.0 (see: https://github.com/facebook/relay/releases/tag/v6.0.0). We also added Flow interface for the new
LocalQueryRenderer(with newcreateLocalEnvironment) but please remember that this interface is currently experimental and doesn't have the same capabilities like ourQueryRenderer. The interface is not finished yet and it may change in the future. - Breaking: Direct usage of
relay-compileris no longer officially supported. Usekiwicom-relay-compilerinstead.
- Enable
--watchmode in our experimental Relay compiler. - Enable
--validatemode in our experimental Relay compiler. This mode returns code101in case of outdated generated files. - Relay compiler now outputs ES6 modules.
- Added support for official Relay package
relay-configwhich allows you to centralize Relay configuration in files likerelay.config.js. Example:
module.exports = {
// ...
// Configuration options accepted by the `relay-compiler` command-line tool and `babel-plugin-relay`.
src: './src',
schema: './data/schema.graphql',
exclude: ['**/node_modules/**', '**/__mocks__/**', '**/__generated__/**'],
};- Experimental Relay compiler now shows warnings when you access deprecated field in your application code.
- Script
kiwicom-fetch-schemanow signs the generated files and sorts fields lexicographically. - Experimental Relay compiler now verifies the signature generated by
kiwicom-fetch-schema.
- This version contains upgraded dependencies and more accurate Flow types.
- New QueryRenderer property
dataFromwith valuesSTORE_THEN_NETWORKandNETWORK_ONLY(more info here: https://relay.dev/docs/en/next/query-renderer#props). - Many internal updates mostly targeting OSS development experience.
- New bin script
kiwicom-fetch-schemaavailable. This little script helps you with the download of your remote schema. Please, read README file to see how to use it.
- Flow types of some object types are now more accurate
- Reverted breaking change enforcing correct Environment usage from version 3.0.0
- (reverted in 0.3.1.0) Breaking: functions
commitMutation,requestSubscriptionandcommitLocalUpdatenow require correct usage of Relay environment which is being passed down from props. Example of how to properly use mutations:
import {
type RelayProp, // or `PaginationRelayProp` or `RefetchRelayProp` types
} from '@adeira/relay';
type Props = {| +relay: RelayProp |};
function Component(props: Props) {
useEffect(() => {
commitMutation(
props.relay.environment, // <<< this Environment is not being imported but rather reused from `props.relay`
{ mutation: graphql` ... ` },
);
});
}- Relay updated to version 5.0, see: https://github.com/facebook/relay/releases/tag/v5.0.0
- This release also contains new experimental Relay Compiler with support for persistent queries. This is currently undocumented feature and you should not use it. Expect breaking changes without any announcements.
- You can now pass custom GraphiQL Printer into Relay environment factory. There is a default printer enabled for https://graphql.kiwi.com/ - you can just click on the GraphiQL link in your dev console and it will open current query with variables so you can debug it easily.
- Experimental Flow support for operation loader (needed for
@matchand@module).
- Babel Relay preset is now part of this package. Removed from
@adeira/babel-preset-adeirain version 3.0.0. Please, edit your Babel configuration files (example for Next.js applications):
module.exports = {
presets: ['@adeira/babel-preset-adeira', 'next/babel'],
plugins: ['relay'],
};- Upgraded to Relay version 4.0.0 (see: https://github.com/facebook/relay/releases/tag/v4.0.0). Our previous versions 1.x disallowed some deprecated usages of Relay so this upgrade should be relatively straightforward. Check new testing tools in this release - especially
MockPayloadGeneratorandRelayMockEnvironment. There is also an improved support for@match/@moduledirectives (available from@adeira/relayversion 1.0) which works well with@adeira/babel-preset-adeirafrom version 3.0. Please give it a try and give us your feedback.
- Network fetcher now accepts optional
refetchConfigto be able to adjustfetchTimeoutandretryDelays(see for more details: https://github.com/kiwicom/fetch)
DisposableFlow type exposed publiclyEnvironment(incomplete) Flow type exposed publicly