Skip to content

Commit

Permalink
Compatability with flushless schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlino committed Sep 15, 2020
1 parent 991997c commit e6fe184
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 73 deletions.
75 changes: 2 additions & 73 deletions _config/graphql_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,76 +7,5 @@ Only:
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
src:
versionedSrc: 'silverstripe/versioned: _graphql'
47 changes: 47 additions & 0 deletions _graphql/enums.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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
27 changes: 27 additions & 0 deletions _graphql/types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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

0 comments on commit e6fe184

Please sign in to comment.