Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document exemplary mutation queries #43

Open
Tracked by #312
christoph-maurer opened this issue Apr 19, 2023 · 3 comments
Open
Tracked by #312

Document exemplary mutation queries #43

christoph-maurer opened this issue Apr 19, 2023 · 3 comments
Assignees
Labels
ISE Fraunhofer Institute for Solar Energy Systems ISE

Comments

@christoph-maurer
Copy link
Member

building-envelope-data/api#311 (comment) :

The mutations you linked above currently work for the primitive reference implementation and this is where those sample mutations belong.

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

@github-project-automation github-project-automation bot moved this to 🆕 New in EQWIN-P Apr 19, 2023
@github-actions github-actions bot added the triage Review issue to make sure it is relevant, actionable, and has all the necessary information label Apr 19, 2023
@simon-wacker
Copy link
Contributor

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 building-envelope-data/metabase#112 (at least partly).

@simon-wacker simon-wacker removed the triage Review issue to make sure it is relevant, actionable, and has all the necessary information label Apr 19, 2023
@simon-wacker
Copy link
Contributor

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).

@christoph-maurer christoph-maurer added the ISE Fraunhofer Institute for Solar Energy Systems ISE label Apr 19, 2023
@christoph-maurer
Copy link
Member Author

Thank you @simon-wacker for your very interesting proposals! They sound great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISE Fraunhofer Institute for Solar Energy Systems ISE
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants