INNER CODE UNIT · Python

parse_literal

eamigo86/graphene-django-extras · graphene_django_extras/base_types.py:152

    def parse_literal(cls, node):
        """Parse literal node from GraphQL AST."""
        if isinstance(node, ast.StringValue):
            return cls.binary_to_string(node.value)


class CustomDateFormat(object):
    """Custom date format wrapper."""

    def __init__(self, date):
        """Initialize custom date format."""
        self.date_str = date


class CustomTime(Time):
    """Custom time scalar type with support for custom date formats."""

    @staticmethod

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…