title: How to return customized JSON response for an error in django-graphene?
body: <p>I am learning to use <code>django-graphene</code> for graphql purpose.</p>
  
  <p>For mutation, all I know is it would return error message of its own.
  Let's say if I have a token field, and checked if token field is bad, I only know how to <code>return None</code> which would give the front end a query result of <code>null</code> instead of a customized json response for status and error </p>
  
  <p>I have these codes</p>
  
  <pre><code>class ProductType(DjangoObjectType):
      class Meta:
          model = Product
          filter_fields = {'description': ['icontains']}
          interfaces = (graphene.relay.Node,)
  
  
  class ProductInput(graphene.InputObjectType):
      token = graphene.String()
      title = graphene.String()
      barcode = graphene.String(required=True)
  
  
  class CreateProduct(graphene.Mutation):
      class Arguments:
          product_input = ProductInput()
  
      product = graphene.Field(ProductType)
  
      def mutate(self, info, product_input=None):
          if not product_input.get('token'):
              return None  # instead of return None, I would like to return error code, status with message
          product = Product.objects.create(barcode=product_input.barcode, title=product_input.title)
  
          return CreateProduct(product=product)
  
  
  class ProductMutation(graphene.ObjectType):
      create_product = CreateProduct.Field()
  </code></pre>
  
  <p>Thanks in advance</p>