diff --git a/client/coral-framework/graphql/fragments.js b/client/coral-framework/graphql/fragments.js index a99dc0ee2..8b4c19e6f 100644 --- a/client/coral-framework/graphql/fragments.js +++ b/client/coral-framework/graphql/fragments.js @@ -18,6 +18,7 @@ export default { 'StopIgnoringUserResponse', 'UpdateSettingsResponse', 'UpdateAssetSettingsResponse', + 'UpdateAssetStatusResponse', ) }; diff --git a/client/coral-framework/graphql/mutations.js b/client/coral-framework/graphql/mutations.js index 1c43f4707..21bfd1825 100644 --- a/client/coral-framework/graphql/mutations.js +++ b/client/coral-framework/graphql/mutations.js @@ -382,3 +382,22 @@ export const withUpdateAssetSettings = withMutation( }); }}), }); + +export const withUpdateAssetStatus = withMutation( + gql` + mutation UpdateAssetStatus($id: ID!, $input: AssetStatusInput!) { + updateAssetStatus(id: $id, input: $input) { + ...UpdateAssetStatusResponse + } + } + `, { + props: ({mutate}) => ({ + updateAssetStatus: (id, input) => { + return mutate({ + variables: { + id, + input, + }, + }); + }}), + });