title: mutation error, Unknown argument \"barcode\" on field \"createProduct\" of type \"Mutation\" - django
body: <p>I am doing tutorials online and trying to make <code>mutation</code> works on <code>graphql</code> but I kept on getting errors which I have no idea what where the real error comes from and how to start debugging where I have done wrong.</p>
  
  <p>looking at this youtube for mutation
  <a href="https://www.youtube.com/watch?v=aB6c7UUMrPo&amp;t=1962s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=aB6c7UUMrPo&amp;t=1962s</a>
  and the graphene documentation <a href="http://docs.graphene-python.org/en/latest/types/mutations/" rel="nofollow noreferrer">http://docs.graphene-python.org/en/latest/types/mutations/</a></p>
  
  <p>I noticed that because of different graphene version, that is why I have reading the documentation instead of following exactly as the <code>youtube</code></p>
  
  <p>I got things setup but then couldn't get it to work, when I execute the mutation query I get error.</p>
  
  <p>I have a model like this.</p>
  
  <pre><code>class Product(models.Model):
      sku = models.CharField(max_length=13, help_text="Enter Product Stock Keeping Unit", null=True, blank=True)
      barcode = models.CharField(max_length=13, help_text="Enter Product Barcode (ISBN, UPC ...)", null=True, blank=True)
  
      title = models.CharField(max_length=200, help_text="Enter Product Title", null=True, blank=True)
      description = models.TextField(help_text="Enter Product Description", null=True, blank=True)
  
      unitCost = models.FloatField(help_text="Enter Product Unit Cost", null=True, blank=True)
      unit = models.CharField(max_length=10, help_text="Enter Product Unit ", null=True, blank=True)
  
      quantity = models.FloatField(help_text="Enter Product Quantity", null=True, blank=True)
      minQuantity = models.FloatField(help_text="Enter Product Min Quantity", null=True, blank=True)
  
      family = models.ForeignKey('Family', null=True, blank=True)
      location = models.ForeignKey('Location', null=True, blank=True)
  
      def __str__(self):
          return self.title
  </code></pre>
  
  <p>I have this for my Product <code>schema</code></p>
  
  <pre><code>class ProductType(DjangoObjectType):
      class Meta:
          model = Product
          filter_fields = {'description': ['icontains']}
          interfaces = (graphene.relay.Node,)
  
  
  class CreateProduct(graphene.Mutation):
      class Argument:
          barcode = graphene.String()
  
      # form_errors = graphene.String()
      product = graphene.Field(lambda: ProductType)
  
      def mutate(self, info, barcode):
          product = Product(barcode=barcode)
          return CreateProduct(product=product)
  
  
  class ProductMutation(graphene.AbstractType):
      create_product = CreateProduct.Field()
  
  class ProductQuery(object):
      product = relay.Node.Field(ProductType)
      all_products = DjangoFilterConnectionField(ProductType)
  
      def resolve_all_products(self, info, **kwargs):
          return Product.objects.all()
  </code></pre>
  
  <p>global schema looks like this</p>
  
  <pre><code>class Mutation(ProductMutation,
                 graphene.ObjectType):
      pass
  
  
  class Query(FamilyQuery,
              LocationQuery,
              ProductQuery,
              TransactionQuery,
  
              graphene.ObjectType):
      # This class extends all abstract apps level Queries and graphene.ObjectType
      pass
  
  
  allGraphQLSchema = graphene.Schema(query=Query, mutation=Mutation)
  </code></pre>
  
  <p>as for trying out the querying...this is my query</p>
  
  <pre><code>mutation ProductMutation {
    createProduct(barcode:"abc"){
      product {
        id, unit, description
      }
    }
  }
  </code></pre>
  
  <p>error returned</p>
  
  <pre><code>{
    "errors": [
      {
        "message": "Unknown argument \"barcode\" on field \"createProduct\" of type \"Mutation\".",
        "locations": [
          {
            "column": 17,
            "line": 2
          }
        ]
      }
    ]
  }
  </code></pre>
  
  <p>Can someone please give me a hand on what I should try and do?</p>
  
  <p>Thanks in advance for any help</p>