diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-04-06 09:55:40 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-04-06 09:55:40 -0400 |
| commit | a24eb1cfbd3c294bea39bca53125883c270ca91f (patch) | |
| tree | 4d35ee785a1c1bec9e084668999316a88b863a17 /frontend/components/CreateItem.js | |
| parent | 41a86494f3caea96dd4ed32733310783e47b429d (diff) | |
revert back to @connection
Diffstat (limited to 'frontend/components/CreateItem.js')
| -rw-r--r-- | frontend/components/CreateItem.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/frontend/components/CreateItem.js b/frontend/components/CreateItem.js index 49f2f8f..8072905 100644 --- a/frontend/components/CreateItem.js +++ b/frontend/components/CreateItem.js @@ -42,21 +42,13 @@ class CreateItem extends Component { }); }; - // TODO: Problem here - if I refetch page 1, page 2 to infinity are still out of date. I need to refetch all the pages somehow? without @connection + // TODO: Problem here - if I refetch page 1, page 2 to infinity are still out of date. I need to refetch all the pages somehow? Or use @connection render() { return ( <Mutation mutation={CREATE_ITEM_MUTATION} variables={this.state} - refetchQueries={[ - { - query: ALL_ITEMS_QUERY, - variables: { - skip: 0, - first: 2, - }, - }, - ]} + refetchQueries={[{ query: ALL_ITEMS_QUERY }]} > {(createItem, { loading, error }) => ( <Form |
