Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to set site-specific enabled state via GraphQL mutation #9771

Closed
weotch opened this issue Aug 29, 2021 · 1 comment
Closed

Not possible to set site-specific enabled state via GraphQL mutation #9771

weotch opened this issue Aug 29, 2021 · 1 comment
Assignees
Labels
bug graphql ⚙️ features related to the GraphQL API

Comments

@weotch
Copy link
Contributor

weotch commented Aug 29, 2021

Description

It doesn't appear possible to set a site-specific enabled state withGraphQL mutations.

Steps to reproduce

From the GraphQL explorer, first run something like this to create an entry:

mutation {
  save_products_flavors_Entry(
    title: "Example"
    enabled: false
  ) { id }
}

Then, run a follow up migration to enable the entry in one of the sites:

mutation {
  save_products_flavors_Entry(
    id: 123
    siteId: 2
    enabled: true
  ) { id }
}

Since the second, updating query includes a siteId, my expectation was that the change to the enabled state would only apply to the one site. Instead, the enabled state changes for all sites.\

Additional info

  • Craft version: Craft Pro 3.7.10
  • PHP version: 7.4.22
  • Database driver & version: MySQL 8.0.26
  • Plugins & versions:

image

@weotch weotch added the bug label Aug 29, 2021
@andris-sevcenko andris-sevcenko self-assigned this Aug 30, 2021
andris-sevcenko pushed a commit that referenced this issue Aug 30, 2021
…fected on a per-site basis when specifying both the `enabled` and `siteId` parameters.

Resolve #9771
@andris-sevcenko andris-sevcenko added the graphql ⚙️ features related to the GraphQL API label Aug 30, 2021
@andris-sevcenko andris-sevcenko added this to the 4.0 milestone Aug 30, 2021
@andris-sevcenko
Copy link
Contributor

Just fixed this for Craft 4.0. Unfortunately, I can't push the fix for 3.7, as this is a change in behavior that some people might be unintentionally relying on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug graphql ⚙️ features related to the GraphQL API
Projects
None yet
Development

No branches or pull requests

2 participants