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

Add UpdateComponent mutation to allow components to be modified #162

Conversation

create-issue-branch[bot]
Copy link
Contributor

@create-issue-branch create-issue-branch bot commented Mar 10, 2023

Example:

mutation {
  updateComponent(input: {
    id: "Z2lkOi8vYXBwL0NvbXBvbmVudC81MTcyZjk2NC1mNjVlLTRkZDgtOGY1ZC1lODdjZTZlMzU2MzA"
    name: "mainB",
    extension: "py",
    content: "",
    default: false,
  }) {
          component {
            id
          }
      }
}

closes #150

@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-api-p-issues-150-ignp2d March 10, 2023 16:30 Inactive
@raspberrypiherokubot raspberrypiherokubot temporarily deployed to editor-api-p-issues-150-cd8iit March 10, 2023 17:09 Inactive
@chrisruk chrisruk force-pushed the issues/150-Add_UpdateComponent_mutation_to_allow_components_to_be_modified branch from 923e0de to 1c55aad Compare March 13, 2023 11:47
Copy link
Contributor

@patch0 patch0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UpdateComponent mutation should be able to change more than just the name so I think there are a few changes here 👍

app/graphql/types/update_component_input_type.rb Outdated Show resolved Hide resolved
app/graphql/mutations/update_component.rb Outdated Show resolved Hide resolved
app/graphql/types/update_component_input_type.rb Outdated Show resolved Hide resolved
spec/graphql/mutations/update_component_mutation_spec.rb Outdated Show resolved Hide resolved
spec/graphql/mutations/update_component_mutation_spec.rb Outdated Show resolved Hide resolved
@chrisruk chrisruk force-pushed the issues/150-Add_UpdateComponent_mutation_to_allow_components_to_be_modified branch from bfee4f5 to 12c68bc Compare March 14, 2023 11:52
@chrisruk chrisruk marked this pull request as ready for review March 14, 2023 11:54
Copy link
Contributor

@patch0 patch0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to make ID as a required field

app/graphql/types/update_component_input_type.rb Outdated Show resolved Hide resolved
@patch0 patch0 enabled auto-merge (squash) March 22, 2023 10:17
@patch0 patch0 merged commit 61e9146 into main Mar 22, 2023
@patch0 patch0 deleted the issues/150-Add_UpdateComponent_mutation_to_allow_components_to_be_modified branch March 22, 2023 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add UpdateComponent mutation to allow components to be modified
3 participants