I’ve just opensourced a crazy experiment of mine to make plain ruby objects queryable. It mixes some ideas of GraphQL together with some crazy ideas from .NET (LinQ and IQueryable<T>) and thus this thing spawned from the depths of my crazy brain.

Just wrap your object in a Queryable.

You can then query like this:

queryable = Queryable.new(User.new)
queryable.query {
  name
  email
  peeps {
    name
  }
  posts(limit: 10) {
    name
  }
}

Like what you see? Check it out here

Hey you 👋 Want FREE resources to become the best developer and get a competitive edge? Subscribe!

Would you like to stay up to date on ? Subscribe here! I'll only use your email to keep u up to date on new technology and software development tips. It wont be shared. Feel free to unsubscribe anytime!