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

(SDL / Execution) Handle "input" type for mutation #127

Closed
tsunammis opened this issue Feb 26, 2019 · 0 comments
Closed

(SDL / Execution) Handle "input" type for mutation #127

tsunammis opened this issue Feb 26, 2019 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@tsunammis
Copy link
Contributor

tsunammis commented Feb 26, 2019

Hello,

As specified in the specification, we have to use the type input type for complex inputs in mutation, instead of using the regular Object type which can contain interface, union or arguments.

What we should do

input RecipeInput {
  id: Int
  name: String
  cookingTime: Int
}

type Mutation {
  updateRecipe(input: RecipeInput): Recipe
}

instead of

type RecipeInput {
  id: Int
  name: String
  cookingTime: Int
}

type Mutation {
  updateRecipe(input: RecipeInput): Recipe
}

Request sample

mutation {
  updateRecipe(input: {
        id: 1, 
        name: "The best Tartiflette by Eric Guelpa", 
        cookingTime: 12
  }) {
    id
    name
    cookingTime
  }
}
  • Tartiflette version: 0.4.0
  • Python version: 3.7.1
  • Executed in docker: No
  • Is a regression from a previous versions? No
@abusi abusi self-assigned this Feb 27, 2019
@abusi abusi added the bug Something isn't working label Feb 27, 2019
@abusi abusi added this to the road-to-v1 milestone Feb 27, 2019
@abusi abusi closed this as completed in #135 Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants