has anyone used GraphQL with a Ruby backend? how was the experience?
I've just started experimenting using this gem: http://graphql-ruby.org
@judofyr yeah, I'm in the process of converting all of our REST api to GraphQL
I love the flexibility and simplicity it is giving on the front-end. There are a bunch of things we had to figure out on the back-end (e.g. we dynamically generate the API from our models, we have rate limiting and concurrency limiting using redis, we integrated it with our permissions system, etc.)
@judofyr we're using graphql-ruby on our backend, and while I quite like my experience so far, getting started has often been confusing. The library recently transitioned to a class-based API instead of a DSL, but much of the documentation is in an in-between state. It's quite easy to build a confusing mess, but as with all things ruby---that's probably our own fault ;). Once you get the hang of things, it's quite nice. There are definitely tradeoffs with GraphQL, but I do think it's worthwhile.
@adamnbowen @judofyr also went through this. Stick to the official guides (http://graphql-ruby.org/guides) and you can double-check the YARDocs (https://www.rubydoc.info/gems/graphql).
@adamnbowen @judofyr of course you can migrate a graphql schema from the 0.7 syntax to the 0.8 class-based syntax piece meal, one type at a time. So maybe there's an argument for building a prototype in the 0.7 DSL, get it working, then port that to the 0.8 class syntax.
@postmodern @judofyr yeah, we’ve at least got a migration plan in place at the moment: we’re converting classes when we need to modify for a feature anyhow and I’m liking the direction it’s going. I’ll be more comfortable with the whole structure once we’re entirely on the class api—it definitely feels like a return to where I’m comfortable in Ruby.
@postmodern @judofyr the root query is the only thing that doesn’t easily convert, as far as I can tell. Once we’re done with piecemeal changes, it’ll still require a whopper of a pull request to switch.
@judofyr yes! It’s a bit strange to deal with typing in ruby. If you use rails it’s also kind of an odd endpoint. But pretty easy to get going actually!