theom
10/24/2018, 12:31 PMYou must wrap the query string in a "gql" tag.
error when calling refreshQueries. What am I overlooking here?
pagination.js
const PAGINATION_QUERY = gql`
query PAGINATION_QUERY {
itemsConnection {
aggregate {
count
}
}
}
`;
export { PAGINATION_QUERY };
createItem.js
import deleteItemsFromCache from '../utils/deleteItemsFromCache';
import PAGINATION_QUERY from './Pagination';
update = (cache, payload) => {
deleteItemsFromCache
};
<Mutation
mutation={CREATE_ITEM_MUTATION}
variables={this.state}
update={this.update}
refetchQueries={[{ query: PAGINATION_QUERY }]}
>
Asjas
10/24/2018, 12:40 PMexport { PAGINATION_QUERY };
import { PAGINATION_QUERY } from './Pagination';
theom
10/24/2018, 12:53 PM