graphene-django - How to filter?
<p>I use graphen-django for build a GraphQL API.
I have succesfully create this API, but I can't pass a argument for filter my response.</p>

<p>This is my <strong>models.py</strong>:</p>

<pre><code>from django.db import models

class Application(models.Model):
    name = models.CharField("nom", unique=True, max_length=255)
    sonarQube_URL = models.CharField("Url SonarQube", max_length=255, blank=True, null=True)

    def __unicode__(self):
    return self.name
</code></pre>

<p>This is my <strong>schema.py</strong>:
    import graphene
    from graphene_django import DjangoObjectType
    from models import Application</p>

<pre><code>class Applications(DjangoObjectType):
    class Meta:
        model = Application

class Query(graphene.ObjectType):
    applications = graphene.List(Applications)

    @graphene.resolve_only_args
    def resolve_applications(self):
        return Application.objects.all()


schema = graphene.Schema(query=Query)
</code></pre>

<p>My <strong>urls.py</strong>:</p>

<pre><code>urlpatterns = [
    url(r'^', include(router.urls)),
    url(r'^admin/', admin.site.urls),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^api-token-auth/', authviews.obtain_auth_token),
    url(r'^graphql', GraphQLView.as_view(graphiql=True)),
]
</code></pre>

<p>As you can see, I also have a REST API.</p>

<p>My <strong>settings.py</strong> contains this:</p>

<pre><code>GRAPHENE = {
    'SCHEMA': 'tibco.schema.schema'
}
</code></pre>

<p>I follow this: <a href="https://github.com/graphql-python/graphene-django" rel="noreferrer">https://github.com/graphql-python/graphene-django</a></p>

<p>When I send this resquest: </p>

<pre><code>{
  applications {
    name
  }
}
</code></pre>

<p>I've got this response:</p>

<pre><code>{
  "data": {
    "applications": [
      {
        "name": "foo"
      },
      {
        "name": "bar"
      }
    ]
   }
}
</code></pre>

<p>So, it's works!</p>

<p>But when I try to pass an argument like this:</p>

<pre><code>{
  applications(name: "foo") {
    name
    id
  }
}
</code></pre>

<p>I have this response:</p>

<pre><code>{
  "errors": [
   {
      "message": "Unknown argument \"name\" on field \"applications\" of type \"Query\".",
      "locations": [
        {
          "column": 16,
          "line": 2
        }
      ]
    }
  ]
}
</code></pre>

<p>What i have missed? Or maybe I do something wrong?</p>