Skip to content

Default GraphQL mutations on Versioned object write to Live stage with no clear way to change that #403

@blueo

Description

@blueo

If I set up a scaffolded mutation on a versioned object (on a 'default' schema) such as:

SilverStripe\CMS\Model\SiteTree:
  fields: '*'
  operations: '*'

which gives me an updateSiteTree mutation. This mutation will write directly to the Live stage and there doesn't appear to be any option to write to Draft.

an example mutation would be:

mutation update($input: UpdateSiteTreeInput!) {
  updateSiteTree(input:$input) {
    id,
    title
  }
}
{
  "input":
  {"id":1, "title": "test update 2" }
}

I couldn't quite tell if this was intentional and extra config was required or if it was a bug? I assume writing to draft is supported in mutations.

tested on v5.0.0-beta2 but I believe it happens on v4 too

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions