graphql-datasource icon indicating copy to clipboard operation
graphql-datasource copied to clipboard

Nested value does not work properly

Open trungkien210493 opened this issue 4 years ago • 2 comments

Describe the bug Based on the behavior of grafana, the datasource seems to use the first row to define the table structure (if the first row is not null, it can display properly). Then, when the first row with the nested value is null, the table will display only the name of nested value, not flatten this value.

Expected behavior The datasource should able to find the table structure from from the query or the all elements of result.

Screenshots image image

trungkien210493 avatar Feb 23 '21 09:02 trungkien210493

Thanks for reporting this issue. It's definitely a bit tricky, and for sure the "right" thing to do is use the query/schema to determine the data frame structure (see also #13).

retzkek avatar Mar 04 '21 17:03 retzkek

@retzkek Thank you for your response. In my opinion, it is easier if you use a loop in the result from query to find the table structure because the result is in "json" format, there are a lot of library to parse it. The query parser is not easy to code and generate the table structure from the parser (I'm a Python Developer and I also tried to parse the Graphql query with the "graphql" Python library and it is very hard )

trungkien210493 avatar Mar 05 '21 02:03 trungkien210493