Git Product home page Git Product logo

graphql-rails-resolver's People

Contributors

coleturner avatar jschwertfeger avatar vfonic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

graphql-rails-resolver's Issues

`where` parameter is not being used

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

Update to use graphql-ruby resolvers

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:

  1. It looks like the gem hasn't been updated since 2017. Is it still active, or should I avoid using it?
  2. I'm not sure if graphql-ruby resolvers got added after this gem or what, but it feels like this gem should be updated to use resolvers, since using resolve seems to be discouraged at this point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.