Releases: relay-tools/relay-hooks
Releases · relay-tools/relay-hooks
v6.0.0
v5.0.1
v5.0.0
Improved
- Added ESM supports
- Added unpkg
Improved (not in official relay)
- useFragmentSubscription
- useRefetchableSubscription
- usePaginationSubscription
v4.1.1
v4.1.0
v3.7.1
v4.0.0
Breaking Change
- removed support to Mutation HOC
- useRefetch no longer exists
- remove fetchObserver in useQuery in favor of onComplete property
- changed the return type:
useQuery
->const { data, isLoading, error, retry} = useQuery(query, variables);
(removed cached and added isLoading)useRefetchable
->const { data, refetch, isLoading, error } = useRefetchable(node, ref);
(before [data, refetch])usePagination
->const { data, hasNext, isLoadingNext, hasPrevious, isLoadingPrevious, isLoading, refetch, loadNext, loadPrevious, errorNext, errorPrevious, error } = usePagination(node, ref);
(before [ data, { isLoading, hasMore, loadMore } ])
- usePagination now uses the @refetchable directive
Fixed
- typesafe onMutation promise #132
Improved
- added useRefetchableFragment hook with suspense
- added usePaginationFragment hook with suspense
- useSuspenseFragment hook with suspense like useFragment in relay-experimental
- update dependency fbjs
- support relay-runtime v10.x.x
- added more tests
- Added babel dev-expression in order to reduce bundle size
- Removed warning in StrictMode
- added example with pagination
- documentation, useRefetchable, usePagination
- useMutation typing
v4.0.0-rc.3
Breaking Change
- removed support to Mutation HOC
- useRefetch no longer exists
- remove fetchObserver in useQuery in favor of onComplete property
- changed the return type:
useQuery
->const { data, isLoading, error, retry} = useQuery(query, variables);
(removed cached and added isLoading)useRefetchable
->const { data, refetch, isLoading, error } = useRefetchable(node, ref);
(before [data, refetch])usePagination
->const { data, hasNext, isLoadingNext, hasPrevious, isLoadingPrevious, isLoading, refetch, loadNext, loadPrevious, errorNext, errorPrevious, error } = usePagination(node, ref);
(before [ data, { isLoading, hasMore, loadMore } ])
- usePagination now use of the @refetchable directive
Improved
- added useRefetchableFragment hook with suspense
- added usePaginationFragment hook with suspense
- useSuspenseFragment hook with suspense like useFragment in relay-experimental
- update dependency fbjs
- support relay-runtime v10.x.x
- added more tests
- Added babel dev-expression in order to reduce bundle size
- Removed warning in StrictMode
- improved example with pagination
v3.7.0
v3.6.0
Improved
- adds the new option
fetchObserver
inuseQuery
anduseLazyLoadQuery
in order to observe the execution of the query in the network. It also adds a new parameter to the retry function to observe its execution. - added rollup for
cjs
,es
andumd
bundle generation.
Fixed
- exporting loadQuery & mutation types