You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When multiple queries are used in a panel, and yield data series with the same name, Grafana normally takes care of this by appending "1", "2", "3", etc to the names. However, this does not appear to work correctly for data from the GraphQL data source. I've described the situation, and how to reproduce it, in this comment on a related (but now closed) Grafana issue: grafana/grafana#31104 (comment).
From what I can tell, this is due to the fact that config.displayName is set here: https://github.com/fifemon/graphql-datasource/blob/master/src/DataSource.ts#L207, while Grafana does not expect it to be set by the datasource. Other datasources do not appear to do things this way, so I suspect the implementation in the GraphQL datasource is somehow non-standard.
The text was updated successfully, but these errors were encountered:
FWIW, this PR has some more details on what Grafana expects to receive - looks like there were some changes around v7.2: grafana/grafana#27186. In this context, config.displayNameFromDS may be the correct way to pass the label.
Hm...unfortunately field.config.displayNameFromDS still appears to lead to the same issue. (tried it in this fork branch https://github.com/ammpio/graphql-datasource/tree/ammp_v1.3.0a). I guess it would be good get some input on best practices from the Grafana devs. My best guess is still field.name
When multiple queries are used in a panel, and yield data series with the same name, Grafana normally takes care of this by appending "1", "2", "3", etc to the names. However, this does not appear to work correctly for data from the GraphQL data source. I've described the situation, and how to reproduce it, in this comment on a related (but now closed) Grafana issue: grafana/grafana#31104 (comment).
From what I can tell, this is due to the fact that
config.displayName
is set here: https://github.com/fifemon/graphql-datasource/blob/master/src/DataSource.ts#L207, while Grafana does not expect it to be set by the datasource. Other datasources do not appear to do things this way, so I suspect the implementation in the GraphQL datasource is somehow non-standard.The text was updated successfully, but these errors were encountered: