OlegIlyenko / graphql-toolbox

GraphQL Toolbox - a set of GraphQL tools to help with GraphQL server and client development.

Home Page:http://toolbox.sangria-graphql.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release as (possibly multiple) npm module(s)

bali182 opened this issue · comments

To me it seems, like most of the features of toolbox are not strictly tied to scala/sbt and could be released as npm modules individually. What I'm thinking about is basically separating the js features listed on the toolbox page, and pull them in individually in this repo:

  • Enhanced GraphiQL - I think this would be the most crucial part to release separately. This contains features that most people who start using GraphQL need (regardless of the backend implementation) but most likely will never make it to the official GraphiQL repo considering the attitude there to keep the repo as small and protocol independent as possible. Separating this (probably putting it into its own repo under a more discoverable name) would probably (drastically) increase it's usage and popularity among node users, since looking at the issues in the GraphiQL repo, everybody comes up with half baked solutions to enable headers, tabs, etc. For me it was pure luck finding it on the second or third google page (searching for the mentioned features) being mentioned in one of @OlegIlyenko s twitter post, and oh boy am I happy I did find it. It would also make it much easier to expose the module on a cdn - #3 - using a prepublish hook or the likes.
  • Formatter - didn't really spend time figuring out if it's another js component doing the heavy lifting in terms of formatting, or a scala component exposed through an http endpoint. If it's the former, it would also fit nicely as a standalone npm module.
  • Proxy - honestly I have no idea what this does, since I didn't have any use for it yet. But again, if it's something that is implemented on the js side, then with a bit more explanation of the feature it could be it's separate module.

Now this doesn't mean splitting toolbox into multiple repos, if a mono-repo is preferred, lerna can help out in this field.

proxy is the most awesome among them all! :D

I finally got some time, so I extracted "enhanced graphiql" functionality in an NPM package:

https://github.com/OlegIlyenko/graphiql-workspace

I would appreciate if you can review it and check whether it's usable in other projects (I already use it in graphql-toolbox). I haven't spent too much time minimizing the deps or making the project "pretty", it's pretty bare-bones. So PRs are very welcome! ;)

Quickly browsed through the sources, looks good! I will test it this weekend. Extra thanks for publishing it to npm, I would have been happy with a gh dependency as well :)

since npm package is now released, I'll close this issue for now