Relay Hooks Versions Save

Use Relay as React hooks

v5.0.0

2 years ago

Improved

  • Added ESM supports
  • Added unpkg

Improved (not in official relay)

v4.1.1

3 years ago

Fixed

v4.1.0

3 years ago

Improved

Fixed

v3.7.1

3 years ago

Fixed

v4.0.0

3 years ago

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

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

3 years ago

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

3 years ago

Fixed

  • Fix loadQuery/loadLazyQuery next function issue #115

Improved

  • Better compatibility with react-relay-offline
    • improved typing in order to extend RelayEnvironment
    • export internalLoadQuery and added parameter to extend the function that executes the query

v3.6.0

3 years ago

Improved

  • adds the new option fetchObserver in useQuery and useLazyLoadQuery 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 and umd bundle generation.

Fixed

  • exporting loadQuery & mutation types

v3.5.2

3 years ago

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 as concurrent on next.config.js
    • remove Suspense Component and use just Suspense oficial api.
    • remove ssr param at withData

such changes also work if you use react-relay/hooks

v3.5.1

3 years ago

Fixed

  • #93 fix connection config typing
  • #92 fix loadMore & refetchConnection arguments typing