We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 810549e commit c472bf4Copy full SHA for c472bf4
docs/pages/docs/basic-types.md
@@ -39,6 +39,7 @@ If you want to create a DateTime Scalar Type just type:
39
40
```python
41
import datetime
42
+from graphene.core.classtypes import Scalar
43
from graphql.core.language import ast
44
45
class DateTime(Scalar):
@@ -58,6 +59,16 @@ class DateTime(Scalar):
58
59
return datetime.datetime.strptime(value, "%Y-%m-%dT%H:%M:%S.%f")
60
```
61
62
+Unlike the other basic types, custom `Scalar` types should not be instantiated
63
+when used.
64
+
65
+```python
66
+import graphene
67
68
+class Post(graphene.ObjectType):
69
+ created = graphene.Field(DateTime)
70
+```
71
72
## Mounting in ClassTypes
73
74
This types if are mounted in a `ObjectType`, `Interface` or `Mutation`,
0 commit comments