mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-22 17:46:57 +03:00
remove custom Scalar usage example since it's now consistent with other
types
This commit is contained in:
parent
c472bf455e
commit
d16155ea17
|
@ -59,16 +59,6 @@ class DateTime(Scalar):
|
|||
return datetime.datetime.strptime(value, "%Y-%m-%dT%H:%M:%S.%f")
|
||||
```
|
||||
|
||||
Unlike the other basic types, custom `Scalar` types should not be instantiated
|
||||
when used.
|
||||
|
||||
```python
|
||||
import graphene
|
||||
|
||||
class Post(graphene.ObjectType):
|
||||
created = graphene.Field(DateTime)
|
||||
```
|
||||
|
||||
## Mounting in ClassTypes
|
||||
|
||||
This types if are mounted in a `ObjectType`, `Interface` or `Mutation`,
|
||||
|
|
Loading…
Reference in New Issue
Block a user