GraphQL-Ruby Newsletter logo

GraphQL-Ruby Newsletter

Subscribe
Archives
November 28, 2021

GraphQL-Ruby 1.13.0 Update

Hey everyone,

I recently released GraphQL-Ruby 1.13.0, so I thought I'd share a little update. Here are the biggest changes in this release:
  • null: true (for fields) and required: true (for arguments) are now the default behavior. GraphQL-Ruby includes a couple of RuboCop rules (GraphQL/DefaultNullTrue and GraphQL/DefaultRequiredTrue) to find and remove redundant configurations.
  • use GraphQL::Dataloader now accepts nonblocking: true, which tells Dataloader to use Ruby 3.0's Fiber.scheduler to execute fields and fetch data. This supports parallel I/O during GraphQL execution. (Bring your own Fiber scheduler implementation!)
  • GraphQL-Ruby now supports multiple definitions for types, fields, and arguments, and can switch between them at runtime.
  • Interface types may implement other interfaces. (This was added to the GraphQL specification a while ago... now it's in GraphQL-Ruby at last 😅.)
  • Lots and lots of other fixes -- I closed over 75 PRs in the last two months! You can find all the other features and bug fixes in the CHANGELOG.
Also, a few updates in other projects:

The JavaScript library, graphql-ruby-client, now supports Apollo Codegen JSON output and @client fields when syncing operations to the Operation Store. See all the other fixes and improvements in its CHANGELOG.

In GraphQL-Pro:
  • The OperationStore got big performance updates, better supporting large schemas and large projects
  • @defer has been upgraded to work with fragments. (Relay.js seems to support this, although it's hardly present in the documentation.)
  • Lots of improvements to the stable connections for ActiveRecord to handle more SQL and ActiveRecord options.
  • Many other fixes improvements, details in the CHANGELOG.
Also, I released a new library, GraphQL-Enterprise, which includes a few features:
  • A couple of GraphQL-oriented rate limiters for your API
  • A server-side cache for GraphQL results. It's backed by Redis uses Rails-style key-based cache expiration but supports TTLs, too.
  • A changeset-based versioning system for releasing breaking changes to your API without disrupting existing clients
Finally ... heads up! I'm hoping that 1.13 is the last release in the 1.x series. I'm planning to remove lots of deprecated behavior in GraphQL-Ruby 2.0 (you can take a look in the planning issue). If you run into any trouble upgrading, please open an issue on GitHub so we can sort it out!

Best,

Robert
Don't miss what's next. Subscribe to GraphQL-Ruby Newsletter:
Docs GitHub
This email brought to you by Buttondown, the easiest way to start and grow your newsletter.