From 5598dddb46e35cfb3168d2a70bd89e2d0fb4fce5 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Sat, 14 Sep 2019 14:48:44 -0400 Subject: [PATCH] Bring the `ChildDataProps` and `ChildMutateProps` types back (#3495) These were accidentally removed during the 3.0 refactor. Fixes #3421 --- Changelog.md | 2 ++ packages/all/src/index.ts | 2 ++ packages/hoc/src/types.ts | 12 ++++++++++++ 3 files changed, 16 insertions(+) diff --git a/Changelog.md b/Changelog.md index 0e654dc2e9..0413d44237 100644 --- a/Changelog.md +++ b/Changelog.md @@ -17,6 +17,8 @@ - A fix has been applied to prevent an unchanging `loading` state when an error occurs after a refetch, that is the same as the previous error.
[@jet2jet](https://github.com/jet2jet) in [#3477](https://github.com/apollographql/react-apollo/pull/3477) +- Add back in the removed `ChildDataProps` and `ChildMutateProps` types.
+ [@hwillson](https://github.com/hwillson) in [#3495](https://github.com/apollographql/react-apollo/pull/3495) ## 3.1.0 (2019-09-06) diff --git a/packages/all/src/index.ts b/packages/all/src/index.ts index 45573bcb3b..67751ff6ca 100644 --- a/packages/all/src/index.ts +++ b/packages/all/src/index.ts @@ -48,6 +48,8 @@ export { DataProps, MutateProps, ChildProps, + ChildDataProps, + ChildMutateProps, OptionProps, OperationOption, WithApolloClient diff --git a/packages/hoc/src/types.ts b/packages/hoc/src/types.ts index 01ead7ddc3..14373fe6b2 100644 --- a/packages/hoc/src/types.ts +++ b/packages/hoc/src/types.ts @@ -63,6 +63,18 @@ export type ChildProps< Partial> & Partial>; +export type ChildDataProps< + TProps = {}, + TData = {}, + TGraphQLVariables = OperationVariables +> = TProps & DataProps; + +export type ChildMutateProps< + TProps = {}, + TData = {}, + TGraphQLVariables = OperationVariables +> = TProps & MutateProps; + export interface OptionProps< TProps = any, TData = any,