mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8616 from creative-commoners/pulls/4.3/rolling-out-rollback-docs
DOCS Updating HistoryViewer documentation to specify the rollback mutation instead of copyToStage
This commit is contained in:
commit
6d6ce61b8f
@ -1013,7 +1013,6 @@ SilverStripe\GraphQL\Manager:
|
|||||||
MyVersionedObject:
|
MyVersionedObject:
|
||||||
fields: [ID, LastEdited]
|
fields: [ID, LastEdited]
|
||||||
operations:
|
operations:
|
||||||
copyToStage: true
|
|
||||||
readOne: true
|
readOne: true
|
||||||
SilverStripe\Security\Member:
|
SilverStripe\Security\Member:
|
||||||
fields: [ID, FirstName, Surname]
|
fields: [ID, FirstName, Surname]
|
||||||
@ -1147,13 +1146,11 @@ import { graphql } from 'react-apollo';
|
|||||||
import gql from 'graphql-tag';
|
import gql from 'graphql-tag';
|
||||||
|
|
||||||
const mutation = gql`
|
const mutation = gql`
|
||||||
mutation revertMyVersionedObjectToVersion($id:ID!, $fromStage:VersionedStage!, $toStage:VersionedStage!, $fromVersion:Int!) {
|
mutation revertMyVersionedObjectToVersion($id:ID!, $toVersion:Int!) {
|
||||||
copyMyVersionedObjectToStage(Input: {
|
rollbackMyVersionedObject(
|
||||||
ID: $id
|
ID: $id
|
||||||
FromVersion: $fromVersion
|
ToVersion: $toVersion
|
||||||
FromStage: $fromStage
|
) {
|
||||||
ToStage: $toStage
|
|
||||||
}) {
|
|
||||||
ID
|
ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1161,12 +1158,10 @@ mutation revertMyVersionedObjectToVersion($id:ID!, $fromStage:VersionedStage!, $
|
|||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
props: ({ mutate, ownProps: { actions } }) => {
|
props: ({ mutate, ownProps: { actions } }) => {
|
||||||
const revertToVersion = (id, fromVersion, fromStage, toStage) => mutate({
|
const revertToVersion = (id, toVersion) => mutate({
|
||||||
variables: {
|
variables: {
|
||||||
id,
|
id,
|
||||||
fromVersion,
|
toVersion,
|
||||||
fromStage,
|
|
||||||
toStage,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user