Merge pull request #109 from BossGrand/master

Added documentations for limiting field access using exclude_fields...
This commit is contained in:
Syrus Akbary 2017-02-11 16:14:34 -08:00 committed by GitHub
commit f3d9cbcd14

View File

@ -34,6 +34,20 @@ This is easy, simply use the ``only_fields`` meta attribute.
only_fields = ('title', 'content')
interfaces = (relay.Node, )
conversely you can use ``exclude_fields`` meta atrribute.
.. code:: python
from graphene import relay
from graphene_django.types import DjangoObjectType
from .models import Post
class PostNode(DjangoObjectType):
class Meta:
model = Post
exclude_fields = ('published', 'owner')
interfaces = (relay.Node, )
Queryset Filtering On Lists
---------------------------