Skip to content

Commit

Permalink
update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhpillai committed Sep 4, 2024
1 parent 1ac7f43 commit e64b83d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions frontend/src/queries/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6826,6 +6826,9 @@
"description": "Client provided query ID. Can be used to retrieve the status or cancel the query.",
"type": "string"
},
"filters_override": {
"$ref": "#/definitions/DashboardFilter"
},
"query": {
"$ref": "#/definitions/QuerySchema",
"description": "Submit a JSON string representing a query for PostHog data analysis, for example a HogQL query.\n\nExample payload:\n\n```\n\n{\"query\": {\"kind\": \"HogQLQuery\", \"query\": \"select * from events limit 100\"}}\n\n```\n\nFor more details on HogQL queries, see the [PostHog HogQL documentation](/docs/hogql#api-access)."
Expand Down
1 change: 1 addition & 0 deletions frontend/src/queries/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ export interface QueryRequest {
* see the [PostHog HogQL documentation](/docs/hogql#api-access).
*/
query: QuerySchema
filters_override?: DashboardFilter
}

/**
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/scenes/dashboard/dashboardLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,7 @@ export const dashboardLogic = kea<dashboardLogicType>([
type: 'dashboard_load',
context: 'dashboard',
action,
status: 'success',
primary_interaction_id: dashboardQueryId,
time_to_see_data_ms: Math.floor(performance.now() - startTime),
api_response_bytes: responseBytes,
Expand Down Expand Up @@ -1170,6 +1171,7 @@ export const dashboardLogic = kea<dashboardLogicType>([
type: 'dashboard_load',
context: 'dashboard',
action,
status: 'success',
primary_interaction_id: dashboardQueryId,
api_response_bytes: totalResponseBytes,
time_to_see_data_ms: Math.floor(performance.now() - refreshStartTime),
Expand Down
2 changes: 1 addition & 1 deletion posthog/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5564,6 +5564,7 @@ class QueryRequest(BaseModel):
client_query_id: Optional[str] = Field(
default=None, description="Client provided query ID. Can be used to retrieve the status or cancel the query."
)
filters_override: Optional[DashboardFilter] = None
query: Union[
EventsNode,
ActionsNode,
Expand Down Expand Up @@ -5607,7 +5608,6 @@ class QueryRequest(BaseModel):
discriminator="kind",
)
refresh: Optional[Union[bool, str]] = None
filters_override: Optional[DashboardFilter] = None


class QuerySchemaRoot(
Expand Down

0 comments on commit e64b83d

Please sign in to comment.