title: "Field 'posts' is missing required arguments: id",
body: <p>I am trying to play around with rails hooked up to graphql and I have the following error trying to display a series of posts by a user</p>
  
  <blockquote>
    <p>"Field 'posts' is missing required arguments: id"</p>
  </blockquote>
  
  <p>Here is my query:</p>
  
  <pre><code>query {
   posts(user_id: 10, type: "Video") {
      title
      file
    }
  }
  </code></pre>
  
  <p>And in my query_type.rb file I have the following defined:</p>
  
  <pre><code>    field :posts, [Types::PostType], null: false do
        argument :id, ID, required: true, as: :user_id
        argument :type, String, required: true
      end
  
      def posts(user_id:, type:)
        posts = Post.where("user_id = ? AND type = ?", user_id, type)
      end
  </code></pre>
  
  <p>It is a simple query. I'm new to this technology (GraphQL) and I don't see what the problem is. Can someone pinpoint what is wrong? Thank you.</p>