coleturner / graphql-rails-resolver Goto Github PK
View Code? Open in Web Editor NEWA utility to ease graphql-ruby integration into a Rails project.
Home Page: https://rubygems.org/gems/graphql-rails-resolver
License: MIT License
A utility to ease graphql-ruby integration into a Rails project.
Home Page: https://rubygems.org/gems/graphql-rails-resolver
License: MIT License
Hi there,
Great little gem, thanks for this!
I think the where
param is broken in the current implementation. In the docs the example
resolve :createdAt, :where => :created_at
should result in the GraphQL argument createdAt
being mapped to the model's created_at
field. However, the particular line of code that would do this (https://github.com/colepatrickturner/graphql-rails-resolver/blob/master/lib/graphql/rails/resolver.rb#L89) is never reached because of the params.size < 1
check a bit further up (https://github.com/colepatrickturner/graphql-rails-resolver/blob/master/lib/graphql/rails/resolver.rb#L77). Probably just a glitch due to some refactoring.
I didn't create a pull request though because I am not sure how that params size check was originally intended.
Cheers,
-Jonas
This is an awesome looking gem, and I think it solves one of my main issues with how graphql-ruby works. Namely, the QueryType gets very big very fast, and a lot of the logic is really just wrappers around built-in rails logic.
Two questions:
resolve
seems to be discouraged at this point.I have been struggling to get this to work in my current app. I have no Idea how to reference the resolver-class. This plugin needs a getting-started doc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.