react-apollo-hooks icon indicating copy to clipboard operation
react-apollo-hooks copied to clipboard

query response "data" field can be an empty object, but this is not described in the typings

Open helios1138 opened this issue 5 years ago • 0 comments

types defined in https://github.com/trojanowski/react-apollo-hooks/blob/master/src/useQuery.ts#L30 describe query response field data as

data?: TData

while it actually should look something like

data?: Partial<TData>

because data can be {} in the case of a cache miss

helios1138 avatar May 30 '19 12:05 helios1138