Hi!
GraphQL 1.9 is ready for take-off! I've been working on these features since last summer and I'm excited to release them. Here's some of what you'll find
in the gem:
- Class-based subscription fields with GraphQL::Schema::Subscription, supporting a much richer subscription flow. There are some crucial features here, like conditional updates and server-side unsubscribes.
- GraphQL::Execution::Lookahead for making your field resolvers context-aware. This is a reliable, simple way to tweak database access based on downstream selections.
- A new runtime for executing queries which reduces time and memory by half. It works with class-based GraphQL only, but in my experience, it's been worth the effort to migrate. You can read more about the rationale and work on my blog.
- AST changes: parsed GraphQL queries are now frozen, and the gem includes an API for building modified documents. If you work on client tooling, this guarantees that valid queries stay valid 😂. To modify a parsed AST, use a visitor.
- Validation errors now include `"extensions" : { ... }` which provide some context about the error.
- Custom directives, allowing you to further customize the new runtime.
- Lots more improvements and bug fixes, which you find in the CHANGELOG.
So, please give these new features a try, and if you run into any trouble, don't hesitate to
open an issue! For my part, I'll continue to improve these new features and start thinking about
improvements for 1.10.0 😎.
GraphQL-Pro (now 1.10.x) has also seen a lot of improvement in the last few months:
Finally, I thought I'd share a few
other projects that were on my radar recently:
- envek/graphql-anycable: GraphQL subscriptions for AnyCable, which is a fast, low-overhead reimplementation of the ActionCable protocol. Seems like a promising option for large-scale, self-hosted subscriptions.
- yuki24/artemis: A GraphQL client for Ruby & Rails with productive conventions and testing support.
- How To GraphQL: The Ruby component of this tutorial just got a big update. Thanks @rstankov for maintaining this!
I think that's all for today, have fun with the new goodies in v1.9+!
Robert