added fetch policy

This commit is contained in:
chris-cosentino
2020-12-09 16:26:35 -05:00
parent 8f2a33b625
commit 6dd251dd94

View File

@@ -143,6 +143,7 @@ const AccessPointDetails = ({ locations }) => {
variables: { variables: {
id, id,
}, },
fetchPolicy: 'network-only',
}); });
const { data: dataFirmware, error: errorFirmware, loading: loadingFirmware } = useQuery( const { data: dataFirmware, error: errorFirmware, loading: loadingFirmware } = useQuery(
@@ -245,11 +246,6 @@ const AccessPointDetails = ({ locations }) => {
const handleDeleteEquipment = () => { const handleDeleteEquipment = () => {
deleteEquipment({ deleteEquipment({
variables: { id }, variables: { id },
update: cache => {
Object.keys(cache.data.data).forEach(
key => key.match(`Equipment:${id}`) && cache.data.delete(key)
);
},
}) })
.then(() => { .then(() => {
history.push('/network/access-points'); history.push('/network/access-points');