Python graphene.DateTime() Examples

The following are 8 code examples of graphene.DateTime(). 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-mongo with MIT License 5 votes vote down vote up
def convert_field_to_datetime(field, registry=None):
    return graphene.DateTime(
        description=get_field_description(field, registry), required=field.required
    ) 
Example #2
Source File: test_converter.py    From graphene-mongo with MIT License 5 votes vote down vote up
def test_should_datetime_convert_datetime():
    assert_conversion(mongoengine.DateTimeField, graphene.DateTime) 
Example #3
Source File: converter.py    From graphene-django with MIT License 5 votes vote down vote up
def convert_form_field_to_datetime(field):
    return DateTime(description=field.help_text, required=field.required) 
Example #4
Source File: type.py    From lutece-backend with GNU General Public License v3.0 5 votes vote down vote up
def resolve_create_time(self, info: ResolveInfo) -> graphene.DateTime():
        return self.create_time 
Example #5
Source File: type.py    From lutece-backend with GNU General Public License v3.0 5 votes vote down vote up
def resolve_last_update_time(self, info: ResolveInfo) -> graphene.DateTime():
        return self.last_update_time 
Example #6
Source File: type.py    From lutece-backend with GNU General Public License v3.0 5 votes vote down vote up
def resolve_start_time(self, info: ResolveInfo) -> graphene.DateTime():
        return self.start_time 
Example #7
Source File: type.py    From lutece-backend with GNU General Public License v3.0 5 votes vote down vote up
def resolve_end_time(self, info: ResolveInfo) -> graphene.DateTime():
        return self.end_time 
Example #8
Source File: type.py    From lutece-backend with GNU General Public License v3.0 5 votes vote down vote up
def resolve_create_time(self, info: ResolveInfo) -> graphene.DateTime():
        return self.create_time