Project

General

Profile

Actions

Bug #32177

closed

Result key for saved object should not be camel case

Added by Ondřej Pražák over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Steps to reproduce:
1) Have a mutation with a result field that has underscore in a field name

module Mutations
  module MyModel
    class Create < CreateMutation 
      # description, graphql_name, resource_class, argument methods omited
      # make sure result field has more than 1 word, reproducible with :my_model, not reproducible with :mymodel
      field :my_model, Types::MyModel, 'The newly created MyModel', null: true
    end
  end
end

2) Execute mutation, query for the new record attributes in response

mutation MyModel($name: String!) {
  myModel(input: {name: $name}) {
    myModel {
      name
    }
    errors {
      path
      message
    }
  }
}

3) Response will show null even though the record was created

{
  "data": {
    "createMyModel": {
      "myModel": null
      "errors": []
    }
  }
}
Actions #1

Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8410 added
Actions #2

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases 2.5.0 added
Actions #3

Updated by Tomer Brisker over 3 years ago

  • Category set to API
  • Fixed in Releases deleted (2.5.0)
Actions #4

Updated by Ondřej Pražák over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Tomer Brisker over 3 years ago

  • Fixed in Releases 2.5.0 added
Actions

Also available in: Atom PDF