Added docs

This commit is contained in:
Eran Kampf 2017-10-30 13:03:01 -07:00
parent f79eb57c06
commit 7f59a8fa7e

View File

@ -54,6 +54,13 @@ the ``Enum.from_enum`` function.
graphene.Enum.from_enum(AlreadyExistingPyEnum)
``Enum.from_enum`` supports a ``description`` and ``deprecation_reason`` lambdas as input so
you can add description etc. to your enum without changing the original:
.. code:: python
graphene.Enum.from_enum(AlreadyExistingPyEnum, description=lambda value: return 'foo' if value == AlreadyExistingPyEnum.Foo else 'bar')
Notes
-----