Skip to content

Commit ac79b38

Browse files
artofhumanmvanlonden
authored andcommitted
Use field and exclude in docs instead deprecated attrs (#740)
1 parent 1b8184e commit ac79b38

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/authorization.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Let's use a simple example model.
2020
Limiting Field Access
2121
---------------------
2222

23-
To limit fields in a GraphQL query simply use the ``only_fields`` meta attribute.
23+
To limit fields in a GraphQL query simply use the ``fields`` meta attribute.
2424

2525
.. code:: python
2626
@@ -31,10 +31,10 @@ To limit fields in a GraphQL query simply use the ``only_fields`` meta attribute
3131
class PostNode(DjangoObjectType):
3232
class Meta:
3333
model = Post
34-
only_fields = ('title', 'content')
34+
fields = ('title', 'content')
3535
interfaces = (relay.Node, )
3636
37-
conversely you can use ``exclude_fields`` meta attribute.
37+
conversely you can use ``exclude`` meta attribute.
3838

3939
.. code:: python
4040
@@ -45,7 +45,7 @@ conversely you can use ``exclude_fields`` meta attribute.
4545
class PostNode(DjangoObjectType):
4646
class Meta:
4747
model = Post
48-
exclude_fields = ('published', 'owner')
48+
exclude = ('published', 'owner')
4949
interfaces = (relay.Node, )
5050
5151
Queryset Filtering On Lists
@@ -133,7 +133,7 @@ method to your ``DjangoObjectType``.
133133
class PostNode(DjangoObjectType):
134134
class Meta:
135135
model = Post
136-
only_fields = ('title', 'content')
136+
fields = ('title', 'content')
137137
interfaces = (relay.Node, )
138138
139139
@classmethod

0 commit comments

Comments
 (0)