title: How to resolve graphene django node field with Many-to-Many relationship
body: <p>I get "Received incompatible instance error" when i try to resolve node field with many-to-many relationship. I need help to resolve this issue. I have listed down the models, graphql types in graphene django for reference.</p>
  
  <p>Code Version that i use:<br>
  graphene django version: 2.2.0<br>
  python verions: 3.5.2<br>
  django version: (2, 0, 8, 'final', 0)  </p>
  
  <pre><code>models.py
  ---------
  class ModelA:
      name
      description
  
  Class ModelB:
      model_code
      description
      field3
      field4
      model_links = models.ManyToManyField(ModelA, through='ModelAModelB')
  
  class ModelAModelB:
      model_a = models.ForeignKey('ModelA', null=True, on_delete=models.CASCADE, db_index=False)
      model_b = models.ForeignKey('ModelB', null=True, on_delete=models.CASCADE, db_index=False)
  
      class Meta:
          #index is defined here
  
  
  Graphene Django:
  
  
  Type Definition
  ---------------
  class ModelANode(DjangoObjectType):
      class Meta:
          model = ModelA
          interfaces = (graphene.relay.Node, )
  
  class ModelBNode(DjangoObjectType):
      modellinks = graphene.Field(ModelANode)
  
      class Meta:
          model = ModelB
          interfaces = (graphene.relay.Node, )
  
      def resolve_modellinks(self, info, **args):
          #how do i resolve this field
  
          #I tried the below code
          modelB = ModelB.objects.get(id=self.id)
          modelaIDs = modelB.modelamodelb_set.select_related('model_a').values_list('model_a_id', flat=True)
          modelARecs = ModelA.objects.filter(id__in=modelaIDs)
  
          return [graphene.relay.Node.get_node_from_global_id(
                  'ModelANode', 
                  info,
                  to_global_id('ModelANode', rec.id) 
              ) for rec in modelARecs]
  
  Graphql Call:
  ------------
  allmodelBs {
      model_code
      description
      field3
      field4
      modellinks {
          id
      }
  }
  </code></pre>
  
  <p>I get the data for Model B fields but the below error is displayed for modellinks:</p>
  
  <pre><code>"errors": [
      {
          "message": "Received incompatible instance \"[None, None]\"."
      },
      {
          "message": "Received incompatible instance \"[]\"."
      }
  ]
  </code></pre>
  
  <p>I need help to resolve many-to-many relationships Node Field.</p>