-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Aaron Carlino
committed
Aug 5, 2020
1 parent
5aabb33
commit e0cb01b
Showing
31 changed files
with
886 additions
and
1,014 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
Name: versioned-graphql-dataobject | ||
--- | ||
SilverStripe\GraphQL\Schema\DataObject\DataObjectModel: | ||
operations: | ||
copyToStage: 'SilverStripe\Versioned\GraphQL\Operations\CopyToStageCreator' | ||
publish: 'SilverStripe\Versioned\GraphQL\Operations\PublishCreator' | ||
unpublish: 'SilverStripe\Versioned\GraphQL\Operations\UnpublishCreator' | ||
rollback: 'SilverStripe\Versioned\GraphQL\Operations\RollbackCreator' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
Name: versioned-graphql-plugins | ||
Only: | ||
moduleexists: 'silverstripe/graphql' | ||
--- | ||
SilverStripe\Core\Injector\Injector: | ||
SilverStripe\GraphQL\Schema\Registry\PluginRegistry: | ||
constructor: | ||
versionedDataobject: '%$SilverStripe\Versioned\GraphQL\Plugins\VersionedDataObject' | ||
unpublishOnDelete: '%$SilverStripe\Versioned\GraphQL\Plugins\UnpublishOnDelete' | ||
readVersionedDataObject: '%$SilverStripe\Versioned\GraphQL\Plugins\VersionedRead' | ||
|
||
# Ensure all dataobject types get the versioned plugin | ||
SilverStripe\GraphQL\Schema\DataObject\DataObjectModel: | ||
default_plugins: | ||
versionedDataObject: true | ||
|
||
SilverStripe\GraphQL\Schema\DataObject\ReadCreator: | ||
default_plugins: | ||
readVersionedDataObject: true | ||
|
||
SilverStripe\GraphQL\Schema\DataObject\DeleteCreator: | ||
default_plugins: | ||
unpublishOnDelete: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
Name: versioned-graphql-schema | ||
Only: | ||
moduleexists: 'silverstripe/graphql' | ||
--- | ||
SilverStripe\GraphQL\Schema\Schema: | ||
schemas: | ||
'*': | ||
enums: | ||
VersionedStage: | ||
description: The stage to read from or write to | ||
values: | ||
DRAFT: | ||
value: Stage | ||
description: The draft stage | ||
LIVE: | ||
value: Live | ||
description: The live stage | ||
VersionedQueryMode: | ||
description: The versioned mode to use | ||
values: | ||
ARCHIVE: | ||
value: archive | ||
description: Read from a specific date of the archive | ||
LATEST: | ||
value: latest_versions | ||
description: Read the latest version | ||
DRAFT: | ||
value: Stage | ||
description: Read from the draft stage | ||
LIVE: | ||
value: Live | ||
description: Read from the live stage | ||
STATUS: | ||
value: status | ||
description: Read only records with a specific status | ||
VERSION: | ||
value: version | ||
description: Read a specific version | ||
VersionedStatus: | ||
description: The stage to read from or write to | ||
values: | ||
PUBLISHED: | ||
value: published | ||
description: Only published records | ||
DRAFT: | ||
value: draft | ||
description: Only draft records | ||
ARCHIVED: | ||
value: archived | ||
description: Only records that have been archived | ||
MODIFIED: | ||
value: modified | ||
description: Only records that have unpublished changes | ||
types: | ||
CopyToStageInputType: | ||
input: true | ||
fields: | ||
id: | ||
type: ID! | ||
description: The ID of the record to copy | ||
fromVersion: | ||
type: Int | ||
description: The source version number to copy | ||
fromStage: | ||
type: VersionedStage | ||
description: The source stage to copy | ||
toStage: | ||
type: VersionedStage | ||
description: The destination state to copy to | ||
VersionedInputType: | ||
input: true | ||
fields: | ||
mode: VersionedQueryMode = Stage | ||
archiveDate: | ||
type: String | ||
description: The date to use for archive | ||
status: | ||
type: '[VersionedStatus]' | ||
description: If mode is STATUS, specify which versioned statuses | ||
version: Int |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.