react-apollo-hooks
react-apollo-hooks copied to clipboard
Use Apollo Client as React hooks
I created this small example to show my issue: https://codesandbox.io/s/ovw0m6yl4z Basically, every time I re-render the component and `useQuery` fetches new data, the `data` object is set to `{}` while...
types defined in https://github.com/trojanowski/react-apollo-hooks/blob/master/src/useQuery.ts#L30 describe query response field `data` as ```ts data?: TData ``` while it actually should look something like ```ts data?: Partial ``` because `data` can be `{}`...
Heyo, I've created a CodeSandbox to showcase this: [](https://codesandbox.io/s/kx9r0plym7?fontsize=14) In this example, if you click on "both", put something in the form and submit it, the list updates instantly....
Hey Daniel, how are you? Firstly, thank you for an epic library and releasing us from the shackles of the `Query` components! Secondly, i'm having a bit of a drama...
Right now errors are returned as a part of the `useQuery` result. Maybe a better idea would be to throw them and recommend to use [Error Boundaries](https://reactjs.org/docs/error-boundaries.html#introducing-error-boundaries) instead (at least...
This makes destructuring the data prop very hard. ``` const { data: { todos }, // because data prop doesn't fallback to an empty object this destructuring fails loading, error,...
Hi, I am struggling with this since a 2 days. I am having a simple mutation that changes some data. Based on that change, I want to update other Query...
say I have a query that eager loads its nested relation ``` entity { id nestedEntity { id } } ``` when receiving response from server, the payload may look...
Using a simple example like the one described here (https://www.leighhalliday.com/react-hooks-with-apollo-graphql): ```js import { useQuery } from "react-apollo-hooks"; default function StarredRepos() { const { data, loading } = useQuery(STARRED_REPOS_QUERY, { variables:...
@trojanowski I've already done it in my fork. Would you be if I do it here as well? Or are you waiting for official React 16.9? I would say it...