From a849e692208284654e2b852fcc8b955f545f0173 Mon Sep 17 00:00:00 2001 From: Robbie Coomber Date: Fri, 1 Sep 2023 14:53:12 +0100 Subject: [PATCH] More disabling of new hogql query --- frontend/src/queries/query.ts | 13 ++++++------- posthog/api/query.py | 2 +- posthog/{nodes => models/event}/events_query.py | 0 3 files changed, 7 insertions(+), 8 deletions(-) rename posthog/{nodes => models/event}/events_query.py (100%) diff --git a/frontend/src/queries/query.ts b/frontend/src/queries/query.ts index 67481074616b58..9b48bdff01af38 100644 --- a/frontend/src/queries/query.ts +++ b/frontend/src/queries/query.ts @@ -1,16 +1,15 @@ import posthog from 'posthog-js' import { DataNode, HogQLQueryResponse, PersonsNode } from './schema' import { - isInsightQueryNode, + isDataTableNode, isEventsQuery, + isHogQLQuery, + isInsightQueryNode, + isInsightVizNode, isPersonsNode, - isTimeToSeeDataSessionsQuery, isTimeToSeeDataQuery, - isDataTableNode, isTimeToSeeDataSessionsNode, - isHogQLQuery, - isInsightVizNode, - isLifecycleQuery, + isTimeToSeeDataSessionsQuery, } from './utils' import api, { ApiMethodOptions } from 'lib/api' import { getCurrentTeamId } from 'lib/utils/logics' @@ -108,7 +107,7 @@ export async function query( try { if (isPersonsNode(queryNode)) { response = await api.get(getPersonsEndpoint(queryNode), methodOptions) - } else if (isInsightQueryNode(queryNode) && !isLifecycleQuery(queryNode)) { + } else if (isInsightQueryNode(queryNode)) { const filters = queryNodeToFilter(queryNode) const params = { ...filters, diff --git a/posthog/api/query.py b/posthog/api/query.py index ce2ed279b86803..1678612512344b 100644 --- a/posthog/api/query.py +++ b/posthog/api/query.py @@ -5,7 +5,7 @@ from django.http import HttpResponse, JsonResponse from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import OpenApiParameter -from posthog.nodes.events_query import run_events_query +from posthog.models.event.events_query import run_events_query from pydantic import BaseModel from rest_framework import viewsets from rest_framework.decorators import action diff --git a/posthog/nodes/events_query.py b/posthog/models/event/events_query.py similarity index 100% rename from posthog/nodes/events_query.py rename to posthog/models/event/events_query.py