Python graphene.Float() Examples
The following are 14
code examples of graphene.Float().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
graphene
, or try the search function
.
Example #1
Source File: converter.py From graphene-gae with BSD 3-Clause "New" or "Revised" License | 5 votes |
def convert_ndb_float_property(ndb_prop, registry=None): return convert_ndb_scalar_property(Float, ndb_prop)
Example #2
Source File: test_converter.py From graphene-gae with BSD 3-Clause "New" or "Revised" License | 5 votes |
def testFloatProperty_shouldConvertToString(self): self.__assert_conversion(ndb.FloatProperty, graphene.Float)
Example #3
Source File: converter.py From graphql-pynamodb with MIT License | 5 votes |
def convert_column_to_float_or_id(type, attribute, registry=None): if attribute.is_hash_key: return ID(description=attribute.attr_name, required=not attribute.null) return Float(description=attribute.attr_name, required=not attribute.null)
Example #4
Source File: test_converter.py From graphql-pynamodb with MIT License | 5 votes |
def test_should_number_convert_float(): assert_attribute_conversion(NumberAttribute(), graphene.Float)
Example #5
Source File: test_converter.py From graphene-sqlalchemy with MIT License | 5 votes |
def test_should_float_convert_float(): assert get_field(types.Float()).type == graphene.Float
Example #6
Source File: converter.py From graphene-mongo with MIT License | 5 votes |
def convert_field_to_float(field, registry=None): return graphene.Float( description=get_field_description(field, registry), required=field.required )
Example #7
Source File: test_converter.py From graphene-mongo with MIT License | 5 votes |
def test_should_decimal_convert_float(): assert_conversion(mongoengine.DecimalField, graphene.Float)
Example #8
Source File: test_converter.py From graphene-mongo with MIT License | 5 votes |
def test_should_float_convert_float(): assert_conversion(mongoengine.FloatField, graphene.Float)
Example #9
Source File: converter.py From graphene-django with MIT License | 5 votes |
def convert_form_field_to_float(field): return Float(description=field.help_text, required=field.required)
Example #10
Source File: test_field_converter.py From graphene-django with MIT License | 5 votes |
def test_should_float_convert_float(): assert_conversion(serializers.FloatField, graphene.Float)
Example #11
Source File: test_field_converter.py From graphene-django with MIT License | 5 votes |
def test_should_decimal_convert_float(): assert_conversion( serializers.DecimalField, graphene.Float, max_digits=4, decimal_places=2 )
Example #12
Source File: test_converter.py From graphene-django with MIT License | 5 votes |
def test_should_auto_convert_duration(): assert_conversion(models.DurationField, graphene.Float)
Example #13
Source File: test_converter.py From graphene-django with MIT License | 5 votes |
def test_should_float_convert_float(): assert_conversion(models.FloatField, graphene.Float)
Example #14
Source File: dauphin_registry.py From dagster with Apache License 2.0 | 4 votes |
def __init__(self): self._typeMap = {} self.Field = create_registry_field(self) self.Argument = create_registry_argument(self) self.List = create_registry_list(self) self.NonNull = create_registry_nonnull(self) registering_metaclass = create_registering_metaclass(self) self.Union = create_union(registering_metaclass, self) self.Enum = create_enum(registering_metaclass) self.Mutation = graphene.Mutation # Not looping over GRAPHENE_TYPES in order to not fool lint self.ObjectType = create_registering_class(graphene.ObjectType, registering_metaclass) self.InputObjectType = create_registering_class( graphene.InputObjectType, registering_metaclass ) self.Interface = create_registering_class(graphene.Interface, registering_metaclass) self.Scalar = create_registering_class(graphene.Scalar, registering_metaclass) # Not looping over GRAPHENE_BUILTINS in order to not fool lint self.String = graphene.String self.addType(graphene.String) self.Int = graphene.Int self.addType(graphene.Int) self.Float = graphene.Float self.addType(graphene.Float) self.Boolean = graphene.Boolean self.addType(graphene.Boolean) self.ID = graphene.ID self.addType(graphene.ID) self.GenericScalar = GenericScalar self.addType(GenericScalar)