Open chrisdlangton opened 4 years ago
Thanks for the detailed report. It seems to be an issue with a release build. Try using this dev build instead: https://github.com/fifemon/graphql-datasource/archive/v1.1.0-dev.zip I've reached out to Grafana devs for help. I have the dev build marked as the current release, and deleted the tag for the release build.
ok took a closer look, following instructions with https://grafana.com/tutorials/build-a-data-source-plugin/#3 - I was able to build a plugin that was able to run minified, so I am not sure if there is a config problem with this, or a bug in something doing the minified version ... doesn't look like anything obvious that I tried ...
(I tried changing the dependencies to match, removing the runtime dependency and other things, to no avail).
hey @retzkek yeah had a few goes, and couldn't not see anything in the config that would cause this. Am I right in assuming that you used https://grafana.com/tutorials/build-a-data-source-plugin/ to create the plugin scaffolding?
A simple plugin worked with build, but not the graphql one. Based on past experience, there are certain things that can trip up minification for the build dist, however in this case that seems to be done by "build": "grafana-toolkit plugin:build"
in the script section, so I can't see anything else that would do it. So I think asking grafana devs for tips may help... (otherwise moving things bit by bit in a new plugin until it breaks... but not sure if that will work... will see).
I also saw this: https://grafana.com/docs/grafana/latest/developers/plugins/backend/ I wonder if they will steer data source plugin in that direction?
Thanks, so it's not just me :)
Am I right in assuming that you used https://grafana.com/tutorials/build-a-data-source-plugin/ to create the plugin scaffolding?
No, I started this before that tutorial existed. I actually started from https://github.com/grafana/simple-datasource, which was also in progress when I started. So yeah maybe starting a "new" plugin is the way to go.
I also saw this: https://grafana.com/docs/grafana/latest/developers/plugins/backend/ I wonder if they will steer data source plugin in that direction?
That's a good point, especially to be able to support alerting...
in any case, for now this works as it is.. but worthwhile revisiting at some point.
@retzkek just curious whether you got any feedback from the Grafana dev team on what might be causing this?
Given that yarn dev
works just fine, and the rest should mostly just be minification, naively it would seem like there should be a fairly simple explanation (famous last words...)
No, I never got an answer, but I also never really got anyone to take a deep look. I've basically given up on this issue, and am just starting from scratch with a newly-generated backend plugin for v2.0.
Trying Github.com API https://developer.github.com/v4/guides/forming-calls/#authenticating-with-graphql
On Grafana v6.7.3 (a04ef6cefc)
Getting
No idea what any of that means.
It occurs int he GUI when i chose your GraphQL Data Source, toggle Basic Auth, add the token and bearer in the Basic Auth Details, click Save & Test.
To replicate you can do exactly what i did with a fresh install like this;
docker-compose.yaml
The
.env
like thisMakefile if you need it, closes some gaps..
Any help would be appreciated, happy to work on a fix myself and PR if i can get some guidance.
EDIT: same error with your API https://bahnql.herokuapp.com/graphql