Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Bring the ChildDataProps and ChildMutateProps types back #3495

Merged
merged 1 commit into from Sep 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changelog.md
Expand Up @@ -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. <br/>
[@jet2jet](https://github.com/jet2jet) in [#3477](https://github.com/apollographql/react-apollo/pull/3477)
- Add back in the removed `ChildDataProps` and `ChildMutateProps` types. <br/>
[@hwillson](https://github.com/hwillson) in [#3495](https://github.com/apollographql/react-apollo/pull/3495)

## 3.1.0 (2019-09-06)

Expand Down
2 changes: 2 additions & 0 deletions packages/all/src/index.ts
Expand Up @@ -48,6 +48,8 @@ export {
DataProps,
MutateProps,
ChildProps,
ChildDataProps,
ChildMutateProps,
OptionProps,
OperationOption,
WithApolloClient
Expand Down
12 changes: 12 additions & 0 deletions packages/hoc/src/types.ts
Expand Up @@ -63,6 +63,18 @@ export type ChildProps<
Partial<DataProps<TData, TGraphQLVariables>> &
Partial<MutateProps<TData, TGraphQLVariables>>;

export type ChildDataProps<
TProps = {},
TData = {},
TGraphQLVariables = OperationVariables
> = TProps & DataProps<TData, TGraphQLVariables>;

export type ChildMutateProps<
TProps = {},
TData = {},
TGraphQLVariables = OperationVariables
> = TProps & MutateProps<TData, TGraphQLVariables>;

export interface OptionProps<
TProps = any,
TData = any,
Expand Down