Grapher v1.5 released!

Despite some rumors to the contrary, Grapher is alive and I occasionally get around to releasing new versions, like today with the release of v1.5 with the following changes:

  • Minimum Meteor version bumped to 2.3
  • Update dependencies
  • Allow unblocking recursive publications @Floriferous
  • Reverse link nested objects failure @bhunjadi PR
  • reywood:publish-composite updated to v1.8.8
  • Added test for Meteor 2.12 and 2.14
  • Added support for nested links in nested objects and arrays @bhunjadi PR

Support my FOSS work via GitHub Sponsors!

8 Likes

This is the first time I’ve seen this package, and I loved it! It’s really cool to have a GQL-like API without doing the whole GQL setup, it does sound like a package that makes you really productive.

Why have people not used it more? Do we have open-source demos/apps using it?

3 Likes

It has been around almost the same time as redis-oplog. I haven’t been using it myself (as I’m trying to stick close to the core API), but it very well regarded. Some nice demos would be great.

2 Likes

We use Grapher a lot, it’s very useful and efficient when you have a real life app to build with lots of relations between tables and want to setup efficient data fetching. I’m confident we use only a small part of its capabilities though (only server side queries, links and reducers).

I only have one public project to showcase using it but it’s in french and the source is not (yet) publicly available, so there is not much interest in sharing it :slight_smile: (zfe.green if you want to have a look)

Thank you for the update to v1.5 !

4 Likes

I also used it intensively in a couple of projects and recently while learning Mongoose I realized that everything can be done with Aggregations and preferred to focus on learning Aggregations.

The things I can do with MongoDB Aggregate and the support in MongoDB Compass for simulations cannot be beaten by any other API.

While Grapher takes you to some places within the Meteor env, Mongoose takes you everywhere on NodeJS and Aggregations knowledge is not platform dependent and once learned you can become a BI Ninja.

To write something like people I know with kids at football clubs, give me their trainers' wives shoe size if they work in tech in Grapher … might take a day … or 2 until you correctly define all links, reverse links whether they are 1 to many, many to 1 or many to many etc. Grapher has a data viewer without which I don’t think you can actually write any query. I couldn’t.

With Aggregations you get results at every step/stage of the query and Compass has a natural language helper to assists with building complex aggregations.

Screenshot 2024-03-12 at 11.27.18 PM

4 Likes

@storyteller there was a change in the Aggregate API. It has been discussed in the past, I have it updated in my local grapher package but I am not sure how the “official” package works without that update.

This is the line in discussion: https://github.com/cult-of-coders/grapher/blob/899fc4e4c3ac2c1219bf71810ff839e66fd4842d/lib/aggregate.js#L12 and it requires a toArray() at the end.

Also discussed here: Fix meteor 2.0+ mongo queries by erixtekila · Pull Request #458 · cult-of-coders/grapher · GitHub
Anyway, I only used it with Methods and maybe the present syntax is required for reactive cursors (idk).

2 Likes

We also use Grapher a lot at Orderlion for most of our most important queries!

But we are now transitioning to the successor @bluelibs/nova.
It was actually quite easy to refactor our queries from Grapher to nova and we have the great benefit then we can now use the same queries in our non-meteor plain nodejs worker env, because nova is just a npm package instead of a meteor package. So great stuff! :v:

2 Likes