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

update type definition of withApollo #3538

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
return type of children of Query component should be React.ReactNode
Li Weinan committed Sep 27, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 9931c268d35d0e2abf5e366540596d6018054bff
4 changes: 2 additions & 2 deletions packages/components/src/types.ts
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ export interface QueryComponentOptions<
TData = any,
TVariables = OperationVariables
> extends QueryFunctionOptions<TData, TVariables> {
children: (result: QueryResult<TData, TVariables>) => JSX.Element | null;
children: (result: QueryResult<TData, TVariables>) => React.ReactNode
query: DocumentNode;
}

@@ -32,7 +32,7 @@ export interface MutationComponentOptions<
export interface SubscriptionComponentOptions<
TData = any,
TVariables = OperationVariables
> extends BaseSubscriptionOptions<TData, TVariables> {
> extends BaseSubscriptionOptions<TData, TVariables> {
subscription: DocumentNode;
children?: null | ((result: SubscriptionResult<TData>) => JSX.Element | null);
}