UNPKG

5.52 kBMarkdownView Raw
1# Unreleased
2
3# 4.5.0
4
5- Function `commitMutation` is now defined with generic Flow type. You can now use types generated by Relay compiler: `commitMutation<NamedMutation>(...)`.
6- New experimental function `commitMutationAsync` added - this function is the same like `commitMutation` except it returns Promise.
7
8# 4.4.0
9
10- Burst cache timeout changed to 2 seconds.
11
12# 4.3.0
13
14- Added invariant check for correct container factories usages.
15- Added support for `readInlineData` (should be combined with `@inline`, see: https://relay.dev/docs/en/graphql-in-relay.html#inline).
16- Export `DeclarativeMutationConfig` Flow type.
17
18# 4.2.0
19
20- Expose new experimental `RelayEnvironmentProvider` component and `useRelayEnvironment` hook.
21
22# 4.1.0
23
24- Added typed `fetchQuery` to the public interface (see: https://relay.dev/docs/en/fetch-query)
25
26# 4.0.0
27
28- **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 new `createLocalEnvironment`) but please remember that this interface is currently experimental and doesn't have the same capabilities like our `QueryRenderer`. The interface is not finished yet and it may change in the future.
29- **Breaking**: Direct usage of `relay-compiler` is no longer officially supported. Use `kiwicom-relay-compiler` instead.
30
31# 3.6.0
32
33- Enable `--watch` mode in our experimental Relay compiler.
34- Enable `--validate` mode in our experimental Relay compiler. This mode returns code `101` in case of outdated generated files.
35- Relay compiler now outputs ES6 modules.
36- Added support for official Relay package `relay-config` which allows you to centralize Relay configuration in files like `relay.config.js`. Example:
37
38```js
39module.exports = {
40 // ...
41 // Configuration options accepted by the `relay-compiler` command-line tool and `babel-plugin-relay`.
42 src: './src',
43 schema: './data/schema.graphql',
44 exclude: ['**/node_modules/**', '**/__mocks__/**', '**/__generated__/**'],
45};
46```
47
48# 3.5.0
49
50- Experimental Relay compiler now shows warnings when you access deprecated field in your application code.
51- Script `kiwicom-fetch-schema` now signs the generated files and sorts fields lexicographically.
52- Experimental Relay compiler now verifies the signature generated by `kiwicom-fetch-schema`.
53
54# 3.4.0
55
56- This version contains upgraded dependencies and more accurate Flow types.
57
58# 3.3.0
59
60- New QueryRenderer property `dataFrom` with values `STORE_THEN_NETWORK` and `NETWORK_ONLY` (more info here: https://relay.dev/docs/en/next/query-renderer#props).
61- Many internal updates mostly targeting OSS development experience.
62
63# 3.2.0
64
65- New bin script `kiwicom-fetch-schema` available. This little script helps you with the download of your remote schema. Please, read README file to see how to use it.
66
67# 3.1.0
68
69- Flow types of some object types are now more accurate
70- Reverted breaking change enforcing correct Environment usage from version 3.0.0
71
72# 3.0.0
73
74- _(reverted in 3.1.0)_ Breaking: functions `commitMutation`, `requestSubscription` and `commitLocalUpdate` now require correct usage of Relay environment which is being passed down from props. Example of how to properly use mutations:
75
76```js
77import {
78 type RelayProp, // or `PaginationRelayProp` or `RefetchRelayProp` types
79} from '@kiwicom/relay';
80
81type Props = {| +relay: RelayProp |};
82
83function Component(props: Props) {
84 useEffect(() => {
85 commitMutation(
86 props.relay.environment, // <<< this Environment is not being imported but rather reused from `props.relay`
87 { mutation: graphql` ... ` },
88 );
89 });
90}
91```
92
93- Relay updated to version 5.0, see: https://github.com/facebook/relay/releases/tag/v5.0.0
94- 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.
95
96# 2.3.0
97
98- 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.
99
100# 2.2.0
101
102- Experimental Flow support for operation loader (needed for `@match` and `@module`).
103
104# 2.1.0
105
106- Babel Relay preset is now part of this package. Removed from `@kiwicom/babel-preset-kiwicom` in version 3.0.0. Please, edit your Babel configuration files (example for Next.js applications):
107
108```js
109module.exports = {
110 presets: ['@kiwicom/babel-preset-kiwicom', 'next/babel'],
111 plugins: ['relay'],
112};
113```
114
115# 2.0.0
116
117- 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 `MockPayloadGenerator` and `RelayMockEnvironment`. There is also an improved support for `@match`/`@module` directives (available from `@kiwicom/relay` version 1.0) which works well with `@kiwicom/babel-preset-kiwicom` from version 3.0. Please give it a try and give us your feedback.
118
119# 1.2.0
120
121- Network fetcher now accepts optional `refetchConfig` to be able to adjust `fetchTimeout` and `retryDelays` (see for more details: https://github.com/kiwicom/fetch)
122
123# 1.1.0
124
125- `Disposable` Flow type exposed publicly
126- `Environment` (incomplete) Flow type exposed publicly