Making plain ruby objects queryable with ruby-queryable
I recently open-sourced an experimental project of mine called ruby-queryable. This project allows for plain Ruby objects to become queryable, incorporating ideas from both GraphQL and .NET’s LinQ and IQueryable
All you have to do is wrap your object in a Queryable
and you can begin querying it like this:
queryable = Queryable.new(User.new)
queryable.query {
name
email
peeps {
name
}
posts(limit: 10) {
name
}
}
Interested in trying it out? Feel free to check out the code here.