title: How can I ignore unknown arguments passed as inputs to a mutation?
body: <p>As per the GraphQL spec <a href="https://graphql.github.io/graphql-spec/draft/#sec-Input-Objects" rel="nofollow noreferrer">https://graphql.github.io/graphql-spec/draft/#sec-Input-Objects</a></p>
  
  <blockquote>
    <p>the input object literal or unordered map must not contain any entries with names not defined by a field of this input object type, otherwise an error must be thrown.</p>
  </blockquote>
  
  <p>Let's say I have a project which has a user called buyer, the schema for which is as follows</p>
  
  <pre><code>type Buyer {
       id: ID!
       name: String!
       address: String!
       email: String!
  }
  </code></pre>
  
  <p>Now I can write a graphene schema for it</p>
  
  <pre class="lang-py prettyprint-override"><code>class BuyerType(DjangoObjectType):
      class Meta:
          model = Buyer
  </code></pre>
  
  <p>and make a mutation for this</p>
  
  <pre class="lang-py prettyprint-override"><code>class BuyerInput(graphene.InputObjectType):
      name = graphene.String(required=False, default_value='')
      address = graphene.String(required=False, default_value='')
      email = graphene.String(required=False, default_value='')
  
  
  class BuyerMutation(graphene.Mutation):
      """
      API to create applicant
      """
      class Arguments:
          buyer_data = BuyerInput(required=True)
  
  
      buyer = graphene.Field(BuyerType)
      ok = graphene.Boolean()
  
      def mutate(self, info, buyer_data=None):
             buyer = Buyer(name=buyer.name, address=buyer.address, email=buyer.email)
             buyer.save()
             return BuyerMutation(buyer=buyer, ok=True)
  </code></pre>
  
  <p>and write the resolvers functions and query and mutation class. Pretty basic stuff so far.</p>
  
  <p>And now to create a new buyer, I just call the mutation</p>
  
  <pre><code>mutation {
     createBuyer(
             name: "New Buyer"
             address: "Earth"
             email: "abc@example.com"
    ) {
        ok
    }
  }
  </code></pre>
  
  <p>But if I pass an additional field called phone</p>
  
  <pre><code>mutation {
     createBuyer(
             name: "New Buyer"
             address: "Earth"
             email: "abc@example.com"
             phone: 8541345474
    ) {
        ok
    }
  }
  </code></pre>
  
  <p>an <code>Unknown field 'phone'</code> error comes up, which is understood.</p>
  
  <p>But I want to make process for frontend devs easier. Rather than mentioning each field in the argument of mutation, they can just pass a dict which contains these three fields and also other arguments that might originate from a form submission, and then read the dict in the backend and only extract the fields that I need, much like it is done with REST APIs.</p>
  
  <p>If this is possible, then how can I implement this?</p>