mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-24 15:47:23 +03:00
Override instance get_type on scalar instantiation for backwards-compativbility
This commit is contained in:
parent
d3305f6056
commit
014769294b
|
@ -37,10 +37,16 @@ class Scalar(six.with_metaclass(ScalarTypeMeta, UnmountedType)):
|
|||
used to parse input from ast or variables and to ensure validity.
|
||||
'''
|
||||
|
||||
def __init__(self):
|
||||
def get_type(self):
|
||||
return self
|
||||
self.get_type = types.MethodType(get_type, self)
|
||||
|
||||
serialize = None
|
||||
parse_value = None
|
||||
parse_literal = None
|
||||
|
||||
@classmethod
|
||||
def get_type(self):
|
||||
return self
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user