7

I'm trying to update my mutation with variables and receive such error:

Duplicate type definition found for name 'SignInInput' at 'Input field SignInInput.signInInput'

My mutation code:

module Mutations
  class SignIn < BaseMutation
    description 'User sign in'

    argument :signInInput, Inputs::SignInInput, as: :sign_in_input, required: true

    field :token, String, null: false

    def resolve(sign_in_input:)
      ...
    end
  end
end

My custom input code:

module Inputs
  class SignInInput < Types::BaseInputObject
    description "Attributes for user sign in"

    argument :email, String, "User email", required: true
    argument :password, String, "User password", required: true
  end
end

My query:

enter image description here

What can be the reason of this weird error? I have only once defined such class.

Nadiya
  • 1,421
  • 4
  • 19
  • 34
  • 1
    Why is the argument capitalized? Can you just keep the argument as follows: argument :sign_in_input, Inputs::SignInInput, required: true – Abhay Nikam Mar 25 '19 at 06:59

0 Answers0