Skip to content

Commit cad4b0c

Browse files
committed
Update docs to include __all__ option
1 parent 7476576 commit cad4b0c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/queries.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ Show **only** these fields on the model:
6363
model = Question
6464
fields = ('id', 'question_text')
6565
66+
You can also set the ``fields`` attribute to the special value ``'__all__'`` to indicate that all fields in the model should be used.
67+
68+
For example:
69+
70+
.. code:: python
71+
72+
class QuestionType(DjangoObjectType):
73+
class Meta:
74+
model = Question
75+
fields = '__all__'
76+
6677
6778
``exclude``
6879
~~~~~~~~~~~

0 commit comments

Comments
 (0)