davazp/graphql-mode

Org-mode Babel Support for graphql execution

w08r opened this issue · 3 comments

w08r commented

It would be useful to be able to use graphql mode within org files. Such that, given a source block like this:

#+BEGIN_SRC graphql :endpoint my-first-great-endpoint
mutation {
  createFoo() {}
}
#+END_SRC

I can then execute that block and produce results inline, as per other org-babel language integrations.

There are some things to think about

  • endpoint select in header arguments
  • passing grapgql variables in, also through header args maybe
w08r commented

Just looking at #38 ... I'd be happy to separate the above out into a separate lib if you think that makes more sense; but initially thought it would be a great extra for this package...

I think this makes sense for this package itself 👍 . Unlike that issue, this is not exposing functionality to arbitrary new libraries, but just extending org-mode.

Just a little comment: I know some other packages (e.g. rustic) take the approach of bringing babel support with the general language package. IMO this makes a fair bit of sense.