mirror of
https://github.com/wassname/talk.git
synced 2026-08-09 12:30:42 +08:00
Add mutation to framework
This commit is contained in:
@@ -17,6 +17,7 @@ export default {
|
||||
'IgnoreUserResponse',
|
||||
'StopIgnoringUserResponse',
|
||||
'UpdateSettingsResponse',
|
||||
'UpdateAssetSettingsResponse',
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ export const withRemoveTag = withMutation(
|
||||
asset_id: assetId,
|
||||
item_type: itemType,
|
||||
},
|
||||
optimisticResponse: {
|
||||
o3timisticResponse: {
|
||||
removeTag: {
|
||||
__typename: 'ModifyTagResponse',
|
||||
errors: null,
|
||||
@@ -358,3 +358,22 @@ export const withUpdateSettings = withMutation(
|
||||
});
|
||||
}}),
|
||||
});
|
||||
|
||||
export const withUpdateAssetSettings = withMutation(
|
||||
gql`
|
||||
mutation UpdateAssetSettings(id: ID!, $input: AssetSettingsInput!) {
|
||||
updateAssetSettings(id: $id, input: $input) {
|
||||
...UpdateAssetSettingsResponse
|
||||
}
|
||||
}
|
||||
`, {
|
||||
props: ({mutate}) => ({
|
||||
updateAssetSettings: (id, input) => {
|
||||
return mutate({
|
||||
variables: {
|
||||
id,
|
||||
input,
|
||||
},
|
||||
});
|
||||
}}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user