Releases: relay-tools/relay-hooks
Releases · relay-tools/relay-hooks
v3.5.2
Fixed
- #99 added relay-runtime types dependency in order to fix d.ts files
Improved
- #100 added example with react experimental nextjs-ssr example
- upgrade next to version 9.4.4
- upgrade react and react-dom to experimental
- add
reactMode
asconcurrent
on next.config.js - remove Suspense Component and use just Suspense oficial api.
- remove
ssr
param atwithData
such changes also work if you use react-relay/hooks
v3.5.1
v3.5.0
Improved
- added loadQuery
- added loadLazyQuery
- added usePreloadedQuery
- added doc usePreloadedQuery.md
- added nextjs-ssr-preload example
- added nextjs-ssr-preload suspense example
v3.4.0
v3.3.0
v3.2.0
Improved
v3.1.0
v3.0.0
Improved
- support relay-runtime v8.0.0, now required "relay-runtime": ">=8.0.0" 1cc3560
- create useLazyLoadQuery 98d0f27
- improved queryFetcher & useQueryFetcher to handle both useQuery (no suspense) and useLazyLoadQuery (with suspense) 75bccc9
- added tests from relay-experimental 5cdc866
- created nextjs example with ssr & useLazyLoadQuery
- created useRefetchable c2f671b
- added tests for useRefetchable
v2.1.0
v2.0.0
Improved
- added 154 tests of react-relay (useMutation tests are missing) #2
- verified compatibility with react-relay 7.1.0 #45
- added eslint
- added prettier
- usePagination supports react-relay v7 #44
- some fix (thanks to tests)
- refactor useOssFragment (too complex)
- removed react-relay dependency
- test with react-relay-offline
- more test useRefetch & usePagination
- test with react-relay 6.0.0
- peerDependency "relay-runtime": ">=6.0.0"
Breaking change
- useQuery:
export const NETWORK_ONLY = 'network-only';
export const STORE_THEN_NETWORK = 'store-and-network';
export const STORE_OR_NETWORK = 'store-or-network';
export const STORE_ONLY = 'store-only';
export type FetchPolicy = 'store-only' | 'store-or-network' | 'store-and-network' | 'network-only';
export type QueryOptions = {
fetchPolicy?: FetchPolicy;
networkCacheConfig?: CacheConfig;
};
useQuery: <TOperationType extends OperationType>(
gqlQuery: GraphQLTaggedNode,
variables: TOperationType['variables'],
options: QueryOptions,
) => RenderProps<TOperationType>
example:
const {props, error, retry, cached} = useQuery(
QueryApp,
{userId},
{
fetchPolicy: 'store-and-network',
},
);