graphql-react
Advanced tools
Changelog
11.2.0
cacheKeyCreator
option to the GraphQL
instance method operate
and the useGraphQL
React hook.hashObject
function is now publicly exported.notEqual
assertions with notStrictEqual
in tests.TypeError
class instead of Error
for relevant errors.Changelog
11.1.0
displayName
and propTypes
to be removed in production builds, fixing #51.useGraphQL
React hook to do less work for following renders if the operation
and fetchOptionsOverride
options are defined outside the component or memoized using the React.useMemo
hook.useGraphQL
React hook returns for more efficient hook composition.loadedCacheValue
property to the GraphQL operation status object returned by the useGraphQL
React hook. This allows cache for an earlier operation to be rendered while loading changes to the query, variables, or fetch
options.coverage-node
to enforce 100% code coverage for tests.useGraphQL
React hook examples to use the GitHub GraphQL API.useGraphQL
React hook tests.Changelog
11.0.4
import
and require
the package exports.Changelog
11.0.3
extract-files
dependency to v9.0.0, and used its new deep require
path.@babel/plugin-proposal-class-properties
dev dependency and config, as @babel/preset-env
has handed this via it’s shippedProposals
options since v7.10.0..js
file extensions from require
paths.revertable-globals
to define globals per-test.node-fetch
v3 instead of cross-fetch
.formdata-node
workaround in graphqlFetchOptions
tests.npm-debug.log
from the .gitignore
file as npm v4.2.0+ doesn’t create it in the current working directory.Changelog
11.0.2
npm install-test
command.overrides
to ensure .js
files are parsed as scripts, eliminating Babel interopRequireDefault
helpers from transpilation output.Changelog
11.0.1
^10.17.0 || ^12.0.0 || >= 13.7.0
. This is only a correction; the dependency updates with breaking changes happened in previous versions.reportCacheErrors
JSDoc parameter type.Changelog
11.0.0
exports
field to support native ESM in Node.js..js
(CJS) instead of .mjs
(ESM), so undocumented deep imports may no longer work. This approach avoids the dual package hazard.10 - 12 || >= 13.7
to reflect the package exports
related breaking changes.babel-plugin-transform-runtime-file-extensions
dev dependency to simplify Babel config.prepare:prettier
and test:prettier
scripts.test:eslint
script args for consistency with test:prettier
.semi
to the default, true
.size-limit
:
Changelog
10.0.0
tap
dev dependency with test-director
and hard-rejection
, and refactored tests accordingly. This improves the dev experience and reduced the dev install size by ~75.5 MB.ReactDOM.unstable_batchedUpdates
in the useGraphQL
React hook to reduce the number of renders when loading completes, fixing #38 via #42. Although react-dom
was already a peer dependency, this is the first time it's being used in the client API; potentially a breaking change for atypical projects.object-assign
dependency and several Babel dev dependencies after simplifying the Babel config.babel-plugin-transform-require-extensions
dev dependency and ensured ESM import specifiers in both source and published .mjs
files contain file names with extensions, which are mandatory in the final Node.js ESM implementation. Published CJS .js
files now also have file extensions in require
paths.husky
and lint-staged
.prettier
v2.Changelog
9.1.0
.github/funding.yml
to display a sponsor button in GitHub.package.json
funding
field to enable npm CLI funding features.Changelog
9.0.0
eslint
dev dependency now supports. This is unlikely to be a breaking change for the published package.useGraphQL
React hook loadOnMount
, loadOnReload
, and loadOnReset
options now default to false
instead of true
. The loading related options are now all opt-in, which is easier to remember and simpler to configure for situations that previously required manual reversal of certain option defaults. It's also safer when working with mutations you don't want to accidentally load.size-limit
dev dependency with @size-limit/preset-small-lib
.useGraphQL
enabled option loadOnReload
causing a load when the global GraphQL
cache is reloaded even if there was no previously cached data to reload.useGraphQL
option loadOnReset
documentation.package-lock.json
from .gitignore
and .prettierignore
as it’s disabled in .npmrc
anyway.useGraphQL
tests.jsdoc-md
v3.1.0.