diff options
Diffstat (limited to 'app/assets/javascripts/registry/settings/graphql/utils/cache_update.js')
-rw-r--r-- | app/assets/javascripts/registry/settings/graphql/utils/cache_update.js | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/app/assets/javascripts/registry/settings/graphql/utils/cache_update.js b/app/assets/javascripts/registry/settings/graphql/utils/cache_update.js deleted file mode 100644 index c4b2af13862..00000000000 --- a/app/assets/javascripts/registry/settings/graphql/utils/cache_update.js +++ /dev/null @@ -1,21 +0,0 @@ -import { produce } from 'immer'; -import expirationPolicyQuery from '../queries/get_expiration_policy.query.graphql'; - -export const updateContainerExpirationPolicy = (projectPath) => (client, { data: updatedData }) => { - const queryAndParams = { - query: expirationPolicyQuery, - variables: { projectPath }, - }; - const sourceData = client.readQuery(queryAndParams); - - const data = produce(sourceData, (draftState) => { - draftState.project.containerExpirationPolicy = { - ...updatedData.updateContainerExpirationPolicy.containerExpirationPolicy, - }; - }); - - client.writeQuery({ - ...queryAndParams, - data, - }); -}; |