-
Notifications
You must be signed in to change notification settings - Fork 42
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
chore(epic-idpe-17711): use SQL HTTP API to get field list #6790
chore(epic-idpe-17711): use SQL HTTP API to get field list #6790
Conversation
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.
Looks good. One minor non-blocking comment re: one type cast.
bucket, | ||
} as QueryOptions) | ||
const values = (resp.parsed.table?.columns?.column_name?.data ?? | ||
[]) as string[] |
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.
Is the reason we don't get strong typing here (and have to type cast using as
) that we can't predict the type of resp.parsed.table.columns.column_name.data
?
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.
@wdoconnell We actually can predict the type of resp.parsed.table.columns.column_name.data
which is string[] | number[] | boolean[]
. Since field keys are strings, so we cast the data to string[]
specifically
Wait for #6783 to merge
Part of https://github.com/influxdata/idpe/issues/17981
This PR uses the SQL HTTP API to query fields
The change is behind the feature flag
v2privateQueryUI
and it is set to false by defaultTo test locally
/api/v2private/query
in DevTool Network tabBefore and After
Screen.Recording.2023-08-22.at.4.16.40.PM.mov
Checklist
Authors and Reviewer(s), please verify the following: