react-apollo-form
react-apollo-form copied to clipboard
fix(deps): update apollo graphql packages
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| apollo-cache-inmemory | 1.2.2 -> 1.6.6 |
||||
| apollo-client | 2.3.1 -> 2.6.10 |
||||
| apollo-codegen | ^0.19.1 -> ^0.20.0 |
||||
| graphql-tag | 2.9.2 -> 2.12.6 |
||||
| react-apollo | 2.1.4 -> 2.5.8 |
Release Notes
apollographql/apollo-client (apollo-cache-inmemory)
v1.6.6
v1.6.5
v1.6.3
v1.6.2
v1.6.1
v1.6.0
-
Support
new InMemoryCache({ freezeResults: true })to help enforce immutability.
@benjamn in #4514 -
Allow
IntrospectionFragmentMatcherto match fragments against the rootQuery, asHeuristicFragmentMatcherdoes.
@rynobax in #4620 -
Rerential identity (
===) of arrays in cache results will now be preserved for unchanged data.
@benjamn in commit f3091d6a -
Avoid adding
__typenamefield to@clientselection sets that have been@exported as input variables.
@benjamn in #4784
v1.5.1
v1.5.0
v1.4.3
v1.4.2
v1.4.1
-
The
optimismnpm package has been updated to a version (0.6.9) that provides its own TypeScript declarations, which should fix problems like Issue #4327.
PR #4331 -
Error messages involving GraphQL queries now print the queries using
JSON.stringifyinstead of theprintfunction exported by thegraphqlpackage, to avoid pulling unnecessary printing logic into your JavaScript bundle.
PR #4234 -
The
QueryKeyMakerabstraction has been removed, meaning that cache results for non-identical queries (or sub-queries) with equivalent structure will no longer be cached together. This feature was a nice optimization in certain specific use cases, but it was not worth the additional complexity or bundle size.
PR #4245
v1.4.0
-
The speed and memory usage of optimistic reads and writes has been improved dramatically using a new layering technique that does not require copying the non-optimistic contents of the cache.
PR #4319 -
The
RecordingCacheabstraction has been removed, and thus is no longer exported fromapollo-cache-inmemory.
PR #4319 -
Export the optimism
wrapfunction using ES2015 export syntax, instead of CommonJS.
@ardatan in #4158
v1.3.12
-
Avoid using
DepTrackingCachefor optimistic reads. PR #4521 -
When creating an
InMemoryCacheobject, it's now possible to disable the result caching behavior introduced in #3394, either for diagnostic purposes or because the benefit of caching repeated reads is not worth the extra memory usage in your application:new InMemoryCache({ resultCaching: false, });Part of PR #4521.
v1.3.11
- No changes.
v1.3.10
-
Added some
returns to prevent errors withnoImplicitReturnsTypeScript rule. PR #4137 -
Exclude the
src/directory when publishingapollo-cache-inmemory. Issue #4083
v1.3.9
- Avoid modifying source objects when merging cache results. Issue #4081 PR #4089
v1.3.8
v1.3.7
-
Throw when querying non-scalar objects without a selection set. Issue #4025 PR #4038
-
Work around spec non-compliance of
Map#setandSet#addin IE11. Issue #4024 PR #4012
v1.3.6
-
Optimize repeated
apollo-cache-inmemoryreads by caching partial query results, for substantial performance improvements. As a consequence, watched queries will not be rebroadcast unless the data have changed. PR #3394 -
Include root ID and fragment matcher function in cache keys computed by
StoreReader#executeStoreQueryandexecuteSelectionSet, and work around bugs in the React NativeMapandSetpolyfills. PR #3964 React Native PR #21492 (pending) -
The
apollo-cache-inmemorypackage now allowsgraphql@^14.0.0as a peer dependency. Issue #3978 -
The
apollo-cache-inmemorypackage now correctly broadcasts changes even when the new data is===to the old data, since the contents of the data object may have changed. Issue #3992 PR #4032
v1.3.5
v1.3.4
v1.3.3
v1.3.2
v1.3.1
- The
isEqualfunction has been reimplemented using thelodash.isequalnpm package, to better support circular references. Since thelodash.isequalpackage is already used byreact-apollo, this change is likely to decrease total bundle size.
@capaj in #4915
v1.3.0
v1.2.10
- No changes.
v1.2.9
- Various internal infrastructure changes related to building, bundling, testing, etc. @hwillson in #3817
v1.2.8
v1.2.7
- No changes.
v1.2.6
- Add
__typenameandidproperties todataIdFromObjectparameter (typescript)
@jfurler in #3641 - Fixed an issue caused by
dataIdFromObjectconsidering returned 0 values to be falsy, instead of being a valid ID, which lead to the store not being updated properly in some cases.
@hwillson in #3711
v1.2.5
- No changes.
v1.2.4
- No changes
v1.2.3
apollographql/apollo-codegen (apollo-codegen)
v0.20.2
- The TypeScript and Flow targets now use block comments to better handle multiline comments in schemas
- Fix crash when running on a version of Node that already supports Array.flatMap
v0.20.1
- Fix issue with
flow-legacytarget being unusable
v0.20.0
- BREAKING: The
typescriptandflowtargets now refer to the modern implementations. The deprecated legacy targets are available undertypescript-legacyandflow-legacy. - BREAKING: The
--outputparameter to the CLI is now required for all targets. - The TypeScript and Flow targets now support outputting types to either a single file or a directory, where types for each query will be separated
apollographql/graphql-tag (graphql-tag)
v2.12.6
- Update peer dependencies to allow
graphql^16.0.0.
@brainkim in #530
v2.12.5
- Also publish
src/directory to npm, enabling source maps.
@maclockard in #403
v2.12.4
v2.12.3
v2.12.2
v2.12.1
- To accommodate older versions of TypeScript, usage of the
import type ...syntax (introduced by #325) has been removed, fixing issue #345.
@benjamn in #352
v2.12.0
- The
graphql-tagrepository has been converted to TypeScript, adding type safety and enabling both ECMAScript and CommonJS module exports. While these changes are intended to be as backwards-compatible as possible, we decided to bump the minor version to reflect the significant refactoring.
@PowerKiKi and @benjamn in #325
v2.11.0
package.jsonsideEffectschanges to clearly identify thatgraphql-tagdoesn't have side effects.
@hwillson in #313
v2.10.4
- Bump dev/peer deps to accommodate
graphql15.
@adriencohen in #299
v2.10.3
- Further adjustments to the TS
index.d.tsdeclaration file.
@Guillaumez in #289
v2.10.2
- Update/fix the existing TS
index.d.tsdeclaration file.
@hwillson in #285
v2.10.1
- Fix failures in IE11 by avoiding unsupported (by IE11) constructor arguments to
Setby rocwang in #190
v2.10.0
- Add support for
graphql@14by timsuchanek in #210, #211
apollographql/react-apollo (react-apollo)
v2.5.8
2.5.8 (2019-06-21)
Bug Fixes
- Makes the use of
apollo-client2.6.3'sObservableQuery.resetQueryStoreErrorsmethod optional, for people who can't update toreact-apollo's newapollo-clientpeer dep of 2.6.3. @hwillson in #3151
v2.5.7
Improvements
- Make sure
MockedProvideris using the proper CJS/ESM bundle, when referencingApolloProvider.
@jure in #3029. - Adjust the
ApolloContextdefinition to play a bit more nicely withReact.createContexttypes.
@JoviDeCroock in #3018 - The result of a mutation is now made available to the wrapped component,
when using the
graphqlHOC.
@andycarrell in #3008 - Check equality of stringified variables in the
MockLinkto improve debugging experience used byMockedProvider.
@evans in #3078
Bug Fixes
- Removed leftover
apollo-client@betapeer dep.
@brentertz in #3064 - Stop setting optional input to
null, when using thegraphqlHOC.
@ZhengYuTay in #3056 - Fix typescript error caused by
querybeing mandatory in thefetchMoresignature.
@HsuTing in #3065 - Fixes an issue that caused the
Querycomponent to get stuck in an always loading state, caused by receiving an error (meaning subsequent valid responses couldn't be handled). TheQuerycomponent can now handle an error in a response, then continue to handle a valid response afterwards.
@hwillson in #3107 - Reorder
Subscriptioncomponent code to avoid setting state on unmounted component.
@jasonpaulos in #3139 - Fix component stuck in
loadingstate fornetwork-onlyfetch policy.
@jasonpaulos in #3126
v2.5.6
Improvements
-
Both the
Querycomponent andgraphqlHOC now accept areturnPartialDataprop. This is an important new feature, that should help address a lot of open Apollo Client / React Apollo issues, so we'll explain it here with an example. Before this release, if you run a query that looks like:const GET_MEMBER = gql` query GetMember($id: ID!) { member(id: $id) { id name } } `;in one component, the results are cached, then you run a superset query like the following in another component:
const GET_MEMBER_WITH_PLANS = gql` query GetMemberWithPlans($id: ID!) { member(id: $id) { id name plans { id title duration } } } `;Apollo Client will not re-use the partial data that was cached from the first query, when it preps and displays the second component. It can't find a cache hit for the full second query, so it fires the full query over the network.
With this release, if you set a
returnPartialDataprop totrueon the second component, thedataavailable to that component will be automatically pre-loaded with the parts of the query that can be found in the cache, before the full query is fired over the network. This means you can do things like showing partial data in your components, while the rest of the data is being loaded over the network.
v2.5.5
Improvements
v2.5.4
Bug Fixes
- Fixes
Could not find "client" in the context of ApolloConsumererrors when usingMockedProvider.
@hwillson in #2907 - Ensure
Querycomponents using afetchPolicyofno-cachehave their data preserved when the components tree is re-rendered.
@hwillson in #2914
Improvements
- Documentation updates.
@afenton90 in #2932
v2.5.3
Bug Fixes
- Fixed an infinite loop caused by using
setStatein theonError/onCompletedcallbacks of theQuerycomponent.
@chenesan in #2751 - Fixed an issue that prevented good results from showing up in a
Querycomponent, after an error was received, variables were adjusted, and then the good data was fetched.
@MerzDaniel in #2718 - Fixed an issue that prevented
Querycomponent updates from firing (under certain circumstances) due to the internallastResultvalue (that's used to help prevent unnecessary re-renders) not being updated.
@Glennrs in #2840
Improvements
-
MockedProvidernow accepts achildPropsprop that can be used to pass props down to a child component.
@miachenmtl in #2482 -
onCompletedcallbacks now use a destructuring-friendly type definition.
@jozanza in #2496 -
@connectiondirectives are now properly stripped fromMockedResponse's, when usingMockedProvider.
@ajmath in #2523 -
MockedProviderhas been updated to stop setting a defaultresolversvalue of{}, which means by default Apollo Client 2.5 local resolver functionality is not enabled when mocking withMockedProvider. This allows@clientfields to be passed through the mocked link chain, like people were used to before AC 2.5. When using this default mode you will see a dev only warning message about this like:Found @client directives in query but no client resolvers were specified. You can now pass apollo-link-state resolvers to the ApolloClient constructor.
This message can be safely ignored. If you want to use
MockedProviderwith AC 2.5's new local resolver functionality, you can pass your local resolver map into theMockedProviderresolversprop.
@ajmath in #2524 -
Improvements to the
graphqlHOC generics forfetchMoreandrefetch.
@EricMcRay in #2525 -
The
ApolloProvider/ApolloConsumerimplementations have been refactored to use React 16.3's new context API.
@wzrdzl in #2540 -
All
dependenciesanddevDependencieshave been updated to their latest versions, and related Typescript changes have been applied.
@hwillson in #2873
v2.5.2
Bug Fixes
- Export
Contexttype fromtypes.tsinstead ofwalkTree.ts, to reenableimport { Context } from 'react-apollo'(which has been broken since 2.4.0).
@benjamn in #2825
Improvements
-
Add
examples/rollupto enable application-level bundle measurement and demonstrate Rollup configuration best practices.
@benjamn in #2839 -
Bundle size reductions inspired by
examples/rollupapp.
@benjamn in #2842
v2.5.1
Bug Fixes
- Make sure
MockedProviderenables Apollo Client 2.5's local state handling, and allow custom / mocked resolvers to be passed in as props, and used with the created testApolloClientinstance.
@hwillson in #2825
v2.5.0
Improvements
- Ready to be used with Apollo Client 2.5 and its new local state management
features, as well as many overall code improvements to help reduce the React
Apollo bundle size.
#2758 - A function can now be set as a
MockedResponseresultwhen usingMockedProvider, such that every time the mocked result is returned, the function is run to calculate the result. This opens up new testing possibilities, like being able to verify if a mocked result was actually requested and received by a test.
@hwillson in #2788
v2.4.1
Improvements
-
Adds a
onSubscriptionCompleteprop to theSubscriptioncomponent, that can be passed a callback to be called when the subscription observable is completed.
@sujeetsr in #2716 -
During server-side rendering,
ObservableQueryobjects created in previous rendering passes will now be preserved in later passes (within the samegetDataFromTreeorgetMarkupFromTreecall), so that errors can be handled properly when using theerrorPolicy: "all"option.
PR #2753
v2.4.0
Bug Fixes
- Invoke
onCompleted/onErroreven ifMutationunmounts.
PR #2710
Improvements
- The
walkTreefunction has been deprecated, since there's no way to make its behavior consistent with the latest versions of React. To save bundle size,walkTreeis no longer exported fromreact-apollo, though you can still access it as follows:import { walkTree } from 'react-apollo/walkTree';
v2.3.3
Bug Fixes
- Add
react-domas a peer dependency (since it's used bygetDataFromTreeandrenderToStringWithData).
@hwillson in #2660
Improvements
- Drop
react14.x support, since the 14.x release line is 2 years old now, andreact-apollois no longer tested against it.
@hwillson in #2660
v2.3.2
Improvements
Bug Fixes
- This package no longer imports
react-dom/serverunconditionally at the top level, makingreact-apollosafer to use in environments like React Native that are neither browser-like nor Node-like, and thus struggle to importreact-dom/serverand its dependencies. Additionally, the React Native bundler has been instructed to ignore allreact-dom/serverdependencies withinreact-apollo, soreact-domwill not be bundled in React Native apps simply because they importreact-apollo. PR #2627
v2.3.1
Improvements
-
Restore original
getDataFromTree(tree, context)API, and introduce a new alternative calledgetMarkupFromTreeto enable custom rendering functions:export default function getDataFromTree( tree: React.ReactNode, context: { [key: string]: any } = {}, ) { return getMarkupFromTree({ tree, context, renderFunction: renderToStaticMarkup, }); } export type GetMarkupFromTreeOptions = { tree: React.ReactNode; context?: { [key: string]: any }; renderFunction?: typeof renderToStaticMarkup; }; export function getMarkupFromTree({ tree, context = {}, renderFunction = renderToStaticMarkup, }: GetMarkupFromTreeOptions): Promise<string> {...}
Bug Fixes
- Version 2.3.0 was published incorrectly, breaking nested
react-apollo/...imports. This problem was fixed in version 2.3.1 by runningnpm publishfrom thelib/directory, as intended. Issue #2591
v2.3.0
Bug Fixes
- Fix
networkStatusto reflect the loading state correctly for partial refetching.
@steelbrain in #2493
Improvements
- Reimplement
getDataFromTreeusingReactDOM.renderToStaticMarkupto make asynchronous server-side rendering compatible with React hooks. Although the rendering function used bygetDataFromTreedefaults torenderToStaticMarkup, any suitable rendering function can be passed as the optional second argument togetDataFromTree, which now returns aPromise<string>that resolves to The HTML rendered in the final pass, which means callingrenderToStringaftergetDataFromTreemay not be necessary anymore. PR #2533
v2.2.4
Bug Fixes
lodash.isequalwas improperly set as a dev dependency forMockLink/MockedProvider. It is now a dependency.
@danilobuerger in #2449
Improvements
- The
Subscriptioncomponent now accepts afetchPolicyprop.
@MatthieuLemoine in #2298
Typescript
- Make sure the
TVariablesgeneric is passed toObservableQuery.
@tgriesser in #2311
v2.2.3
Bug Fixes
- Mutation errors are now properly returned as a render prop, when using
a default
errorPolicyofall.
@amacleay in #2374 <Mutation />refetchQueriestriggered by name (string) will now use the correct variables.
@fracmal in #2422
Improvements
- Replace the
lodashdependency withlodash.flowright(since that's the only non-devlodashfunction we're dependent on). Devlodashdependencies have also been updated to use their individual module equivalent.
@hwillson in #2435 - Removed
rollup-plugin-babel-minifyas it's no longer being used.
@hwillson in #2436 - Small
getDataFromTree.tslogic adjustment to avoid unnecessary calls when a falsyelementis encountered.
@HOUCe in #2429 graphql14 updates.
@hwillson in #2437- All example apps (included in the repo) have been updated to work with the
latest version of React Apollo.
@hwillson in #2439
Typescript
- Fix
lodashtypings.
@williamboman in #2430 - Typings: added
contexttoMutationOptions.
@danilobuerger in #2354 - Typings: more
MutationOptionschanges/fixes.
@danilobuerger in #2340 - Remove
allowSyntheticDefaultImportsuse. Typescript'sallowSyntheticDefaultImportscompiler option is something we'd like to start using, but we jumped the gun a bit by introducing it in https://github.com/apollographql/react-apollo/commit/9a96519d390783dfd9a431dc2dbaa476a24f7b80. Including it means that anyone who wants to use Typescript with React Apollo would have to also include it in their own localtsconfig.json, to be able to handle default imports properly. This is because we're also using Typescript'ses2015moduleoption, which meansallowSyntheticDefaultImportshas to be enabled explicitly. We've switched back to using a combination ofimport * as Xandrequiresyntax, to work with default imports. We'll re-introduceallowSyntheticDefaultImportsuse in React Apollo 3.
@hwillson in #2438
v2.2.2
- When using
React.createContextand SSR, we now make sure the context provider value is reset to the previous value it had after its children are walked.
@mitchellhamilton in #2304 - Revert:
When a query failed on the first result, the query resultdatawas being returned asundefined. This behavior has been changed so thatdatais returned as an empty object. This makes checking for data (e.g. instead ofdata && data.useryou can just checkdata.user) and destructring (e.g.{ data: { user } }) easier. Note: this could potentially hurt applications that are relying on a falsey check ofdatato see if any query errors have occurred. A better (and supported) way to check for errors is to use the resulterrorsproperty.
#1983
v2.2.1
- Revert: "Typescript: use
Partial<TData>instead ofTData | {}, for theQueryResultdataproperty."
v2.2.0
- Improved TypeScript Typings:
Deprecated
MutationFuncin favor ofMutationFn. Added missingonCompletedandonErrorcallbacks toMutationOpts.
@danilobuerger in #2322 - Added an example app that shows how to test mutations.
@excitement-engineer in #1998 - The
<Subscription />component now allows the registration of a callback function, that will be triggered each time the component receives data. The callbackoptionsobject param consists of the current Apollo Client instance inclient, and the received subscription data insubscriptionData.
@jedwards1211 in #1966 - The
graphqloptionsobject is no longer mutated, when calculating variables from props. This now prevents an issue where components created withgraphqlwere not having their query variables updated properly, when props changed.
@ksmth in #1968 - When a query failed on the first result, the query result
datawas being returned asundefined. This behavior has been changed so thatdatais returned as an empty object. This makes checking for data (e.g. instead ofdata && data.useryou can just checkdata.user) and destructring (e.g.{ data: { user } }) easier. Note: this could potentially hurt applications that are relying on a falsey check ofdatato see if any query errors have occurred. A better (and supported) way to check for errors is to use the resulterrorsproperty.
@TLadd in #1983 - Allow a custom
cacheobject to be passed into the test-utilsMockedProvider.
@palmfjord in #2254 - Make the
MockedProvidermocksprop read only.
@amacleay in #2284 - Remove duplicate
FetchMoreOptionsandFetchMoreQueryOptionstypes, and instead import them from Apollo Client.
@skovy in #2281 - Type changes for the
graphqlHOCoptions.skipproperty.
@jameslaneconkling in #2208 - Avoid importing
lodashdirectly.
@shahyar in #2045 - When the
Queryskipprop is set totrue, make sure the render proploadingparam is set tofalse, since we're not actually loading anything.
@edorivai in #1916 - No longer building against Node 9
@hwillson in #2404 - Make sure
<Subscription />,<Query />&<Mutation />all support using an Apollo Client instance configured in thecontextor via props.
@quentin- in #1956 - Typescript: use
Partial<TData>instead ofTData | {}, for theQueryResultdataproperty.
@tgriesser in #2313 - Adjust
<Query />onCompletedandonErrorcallbacks to be triggered via thecomponentDidUpdatelifecycle method. This ensures these callbacks can be used when data is fetched over the network, and when data is fetched from the local store
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
:warning: Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
:recycle: Renovate will retry this branch, including artifacts, only when one of the following happens:
- any of the package files in this branch needs updating, or
- the branch becomes conflicted, or
- you check the rebase/retry checkbox if found above, or
- you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: package-lock.json
npm ERR! Cannot read property 'match' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/renovate-cache/others/npm/_logs/2020-08-24T16_01_19_049Z-debug.log
⚠ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
- any of the package files in this branch needs updating, or
- the branch becomes conflicted, or
- you click the rebase/retry checkbox if found above, or
- you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: package-lock.json
npm ERR! Cannot read properties of undefined (reading 'match')
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/renovate/cache/others/npm/_logs/2024-04-26T23_36_02_645Z-debug.log