All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and adheres to Semantic Versioning.
- Fixed babel helpers file being generated with incorrect filename in esm build. [#2082]
- No updates. Transitive dependency bump.
- Use the named import of ApolloClient [#2052]
- Migrate from
sewing-kit-next
toloom
for building - package build output remains identical. [#2039]
- No updates. Transitive dependency bump.
- Enable type checking in tests and fix type errors. [#2034]
- Fixed an issue with the SSR link when an error is thrown. [#2036]
- No updates. Transitive dependency bump.
- No updates. Transitive dependency bump.
- Added file exclusion for tests to package.json. [#2005]
- Updated build tooling, types are now compiled with TypeScript 4.3. [#1997]
- Ensure
tsconfig.tsbuildinfo
file is not uploaded to the npm registry. [#1982]
- Update to latest sewing-kit-next for build. Update
types
/typesVersions
fields to point directly into the build folder [#1980]
- Officially supports React
17.x
1969
- Changes to tests for React-17 compatibility in dev. #1957
- No updates. Transitive dependency bump.
- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. #1906
- Removed dependency on tslib, as we no-longer compile with
tsc
. #1829
- Updated multi-build outputs to include mandatory extensions to fix "Module not found" issues reported by ESM supported bundlers #1759
- Add new build outputs (CommonJS, ESM, esnext, Node) for greater tree-shakability #1698
- Added
tslib@^1.14.1
in the list of dependencies. #1657
- Replace Apollo declarative Query component with
useQuery
hook (#1519)
- Improve typings for
usePrefetch
to accept afetchPolicy
inoptions
(#1437)
- Update dependencies from
react-apollo
to@apollo/react-common
,@apollo/react-components
, and@apollo/react-hooks
(#1321)
- Improve typings for
useBackgroundQuery
by allowing thefetchPolicy
option. (#1293).
- Fixed when using
no-cache
fetch policy and data is undefined (#1244).
- Added a
createAsyncQuery
function that can create queries that are only loaded when executed (#1153).
- Improved typings to avoid cases where TypeScript allowed variables to be omitted incorrectly. These typings now require
react-apollo@3.x
(#1153).
- Changed some type imports to fix type errors when using
react-apollo@3.x
. Projects that use 2.x may have some typing issues as changes were made toreact-apollo
that make it impossible to support the types for both versions. (#1087)
- Adds support for
ssr=false
inuseQuery
(951)
- Fix SSR when using
cache-and-network
fetch policy withuseQuery
(#928)
- Removed the
createGraphQLClient
/ApolloClient
exports, and instead export the tools to build an operation-tracking link (createSsrExtractableLink
/SsrExtractableLink
). Projects using thecreateGraphQLClient
utility to create a client with aresolve
method can instead use the link andSsrExtractableLink#resolveAll()
directly. (#878)
- Add missing dependencies (832)
- Adds SSR extractable link to support GraphQL Self-serialization (810)
- Using
useQuery
withfetchPolicy
set tono-cache
no longer runs during server renders (previously, using such a query would causeextract
to loop indefinitely) (#770)
- Fixed an issue where
useBackgroundQuery
would not unsubscribe when options change
- Updated to depend on the 3.x version of
@shopify/react-async
(#762)
useQuery
now returnsundefined
instead of an empty object{}
when there's no data (#751)- Fix re-wrapping query result under
current
key when usingno-cache
fetch policy (as a result of leaking implementation details, exposingref
object intead of what it is representing)
fetchPolicy
is now compatible withapollo-client@2.6.0
'sWatchQueryFetchPolicy
options (#729)
- Queries are no longer waited on during server render when
skip
istrue
(#726) - The result of calling
useQuery
is now referentially stable when variables stay deep-equal between calls (previously, using a different object with the same values would change the result) (#726).
- Fixed an issue where
useQuery
was watching a query even whenskip
was true (#721)
- Fixed an issue where
useQuery
with an async query component would not cause the query’s bundle to be included in the initial HTML.
- Components created with
createAsyncQueryComponent
now call theirchildren
prop with a loading state while the query is still being fetched (#707)
- Fixed an issue where
useQuery
would not be performed during server renders (#702)
- Added
useQuery
anduseApolloClient
hooks (#663)
- Added
useMutation
hook (#653)
This library now requires React 16.8 because of changes to @shopify/react-effect
.
- You can now import
GraphQLData
andGraphQLVariables
to extract the data or variable types from the component returned bycreateAsyncQueryComponent
(#529)
AsyncQueryComponentType
now conforms tographql-typed
’sGraphQLOperation
interface (#529)
createAsyncQueryComponent
now accepts adefer
property that dictates whether that component should wait until mount or idle to start loading the query (#517)- The component returned from
createAsyncQueryComponent
and its staticPreload
,Prefetch
, andKeepFresh
components all accept anasync
prop that is an object with an optionaldefer
property, which controls the way loading is done for just that element (#517)
- Added some additional generic types for extracting default from queries.
- Fixed some broken API choices
- Initial release