insights: graphql API has too much complexity between chart types and series types
Created by: coury-clark
In our GraphQL API we have mutations such as the following createLineChartSearchInsight
that couple a visualization type (line chart) to a series type (search). This has a number of problems:
- We have to support a combination of mutations for many visualization and series tuples
- Evolving visualization options for chart or series is tedious and error prone
- Introducing new chart types is very time consuming, even though the underlying data to render is already available
We should consider alternative approaches that will reduce this complexity. Some ideal outcomes may be:
- We can freely evolve presentation settings without interacting with many different mutations. In other words, updating a line chart with a new setting should only require modifying one input object that relates to line charts.
- We can more freely express charts that are composed of multiple series types. For example, a line chart might be composed of a search series and a (future) compute series.
- We can support changing chart types on an insight (for example, line -> pie)