Query Editor Help

Hello,

I’m trying to use the queryeditorhelp but when i follow the tutorial i have this error :

Severity	Code	Description	Project	File	Line	Suppression State
Error	TS2345	(TS) Argument of type '(props: QueryEditorHelpProps) => JSX.Element' is not assignable to parameter of type 'ComponentType<QueryEditorHelpProps<MyQuery>>'.
  Type '(props: QueryEditorHelpProps) => JSX.Element' is not assignable to type 'FunctionComponent<QueryEditorHelpProps<MyQuery>>'.
    Types of parameters 'props' and 'props' are incompatible.
      Type 'QueryEditorHelpProps<MyQuery>' is not assignable to type 'QueryEditorHelpProps<DataQuery>'.
        The types of 'datasource.components' are incompatible between these types.
          Type 'DataSourcePluginComponents<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, {}> | undefined' is not assignable to type 'DataSourcePluginComponents<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, {}> | undefined'.
            Type 'DataSourcePluginComponents<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, {}>' is not assignable to type 'DataSourcePluginComponents<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, {}>'.
              Types of property 'QueryEditor' are incompatible.
                Type 'ComponentType<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>> | undefined' is not assignable to type 'ComponentType<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>> | undefined'.
                  Type 'ComponentClass<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>, any>' is not assignable to type 'ComponentType<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>> | undefined'.
                    Type 'ComponentClass<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>, any>' is not assignable to type 'ComponentClass<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>, any>'.
                      Types of property 'propTypes' are incompatible.
                        Type 'WeakValidationMap<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>> | undefined' is not assignable to type 'WeakValidationMap<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>> | undefined'.
                          Type 'WeakValidationMap<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>>' is not assignable to type 'WeakValidationMap<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>>'.
                            Types of property 'onChange' are incompatible.
                              Type 'Validator<(value: MyQuery) => void> | undefined' is not assignable to type 'Validator<(value: DataQuery) => void> | undefined'.
                                Type 'Validator<(value: MyQuery) => void>' is not assignable to type 'Validator<(value: DataQuery) => void>'.
                                  Type '(value: MyQuery) => void' is not assignable to type '(value: DataQuery) => void'.	C:\Program Files\GrafanaLabs\grafana\data\plugins\testdb-testdb-datasource\tsconfig.json	C:\Program Files\GrafanaLabs\grafana\data\plugins\testdb-testdb-datasource\src\module.ts	11	Active

Here is my code where i get the error :
.setQueryEditorHelp(QueryEditorHelp);

Nicolas

Hello @nicolasdossantos248,

Please review the submission template and include more details:

  • What Grafana version and what operating system are you using?
  • What is your datasource?
  • What visualization panel you are using e.g. time-series, bar chart, histogram etc?
  • What are you trying to achieve?
  • How are you trying to achieve it?
  • What happened?
  • What did you expect to happen?
  • Can you copy/paste the configuration(s) that you are having problems with?
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
  • Did you follow any online instructions? If so, what is the URL?