Open christoph-maurer opened 1 year ago
I would put standalone example queries in the directory ./examples/queries and some kind of tutorial in the directory ./examples/tutorial. For some presentation some years ago, I created what can be thought of as a tutorial for interacting with the metabase through its GraphQL API within bash
in https://github.com/building-envelope-data/metabase/tree/develop/examples It contains GraphQL-queries, corresponding shell scripts and a script that combines them all in the correct order passing along necessary information through environment variables. It depends on the functions in https://github.com/building-envelope-data/metabase/blob/develop/examples/functions.sh being sourced into the current environment. The tutorial was for an old version of the metabase and I haven't kept it up to date --- I'm gonna repair it soon. Maybe its a good starting point for your tutorial idea. Repairing the tutorial will resolve issue https://github.com/building-envelope-data/metabase/issues/112 (at least partly).
The advantage of having shell scripts that accompany the GraphQL queries is that they can be executed in one go to check whether everything is still working. We could accompany the GraphQL queries with a markdown document (maybe README.md
in the tutorial
directory) that explains in which order and with which variables the GraphQL queries (which we may be able to include automatically from the *.graphql files) can be executed in Banana Cake Pop (that is https://www.solarbuild....com/graphql/ in the web browser).
Thank you @simon-wacker for your very interesting proposals! They sound great.
https://github.com/building-envelope-data/api/issues/311#issuecomment-1513015570 :
Thank you @simon-wacker ! Where shall we save the ExampleMutationQueryFromSW.txt? And can I use the queries with which I have created the data sets of the TestLabDB to start a tutorial.graphql there?
Relates to building-envelope-data/api#311