def _property_descriptor_to_graphql_type(property_obj):
    """Return the best GraphQL type representation for an OrientDB property descriptor."""
    property_type = property_obj.type_id
    scalar_types = {
        PROPERTY_TYPE_BOOLEAN_ID: GraphQLBoolean,
        PROPERTY_TYPE_DATE_ID: GraphQLDate,
        PROPERTY_TYPE_DATETIME_ID: GraphQLDateTime,
        PROPERTY_TYPE_DECIMAL_ID: GraphQLDecimal,
        PROPERTY_TYPE_DOUBLE_ID: GraphQLFloat,
        PROPERTY_TYPE_FLOAT_ID: GraphQLFloat,
        PROPERTY_TYPE_INTEGER_ID: GraphQLInt,
        PROPERTY_TYPE_STRING_ID: GraphQLString,
    }

    result = scalar_types.get(property_type, None)
    if result:
        return result

    mapping_types = {
        PROPERTY_TYPE_EMBEDDED_SET_ID: GraphQLList,
        PROPERTY_TYPE_EMBEDDED_LIST_ID: GraphQLList,
    }
    wrapping_type = mapping_types.get(property_type, None)
    if wrapping_type:
        linked_property_obj = property_obj.qualifier
        # There are properties that are embedded collections of non-primitive types,
        # for example, ProxyEventSet.scalar_parameters.
        # The GraphQL compiler does not currently support these.
        if linked_property_obj in scalar_types:
            return wrapping_type(scalar_types[linked_property_obj])

    # We weren't able to represent this property in GraphQL, so we'll hide it instead.
    return None
Return the best GraphQL type representation for an OrientDB property descriptor.