@@ -20,7 +20,7 @@ Let's use a simple example model.
20
20
Limiting Field Access
21
21
---------------------
22
22
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.
24
24
25
25
.. code :: python
26
26
@@ -31,10 +31,10 @@ To limit fields in a GraphQL query simply use the ``only_fields`` meta attribute
31
31
class PostNode (DjangoObjectType ):
32
32
class Meta :
33
33
model = Post
34
- only_fields = (' title' , ' content' )
34
+ fields = (' title' , ' content' )
35
35
interfaces = (relay.Node, )
36
36
37
- conversely you can use ``exclude_fields `` meta attribute.
37
+ conversely you can use ``exclude `` meta attribute.
38
38
39
39
.. code :: python
40
40
@@ -45,7 +45,7 @@ conversely you can use ``exclude_fields`` meta attribute.
45
45
class PostNode (DjangoObjectType ):
46
46
class Meta :
47
47
model = Post
48
- exclude_fields = (' published' , ' owner' )
48
+ exclude = (' published' , ' owner' )
49
49
interfaces = (relay.Node, )
50
50
51
51
Queryset Filtering On Lists
@@ -133,7 +133,7 @@ method to your ``DjangoObjectType``.
133
133
class PostNode (DjangoObjectType ):
134
134
class Meta :
135
135
model = Post
136
- only_fields = (' title' , ' content' )
136
+ fields = (' title' , ' content' )
137
137
interfaces = (relay.Node, )
138
138
139
139
@ classmethod
0 commit comments