New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add /charts/series ext api #279
Conversation
|
series: z.array(externalQueryChartSeriesSchema).refine( | ||
series => { | ||
const groupByFields = series[0].groupBy; | ||
return series.every(s => _.isEqual(s.groupBy, groupByFields)); | ||
}, | ||
{ | ||
message: 'All series must have the same groupBy fields', | ||
}, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh this is cool
const internalSeries = series.map(s => | ||
translateExternalSeriesToInternalSeries({ | ||
type: 'time', // just to reuse the same fn | ||
...s, | ||
}), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can do this after team validation
|
||
return { | ||
type, | ||
data_source: table === 'metrics' ? 'metrics' : 'events', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to make this guy camelcase ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 yeah good point... there's a few places where I introduced the snake case. Let me do it in a follow up PR after this and the TF one is merged so I can change it everywhere at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.