Giter Club home page Giter Club logo

Comments (5)

kurtome avatar kurtome commented on September 26, 2024 1

That's what I was assuming, really good to know about RawValue in case I want to use it for other kinds of caching within GraphQL. I'm going to remove Pundit since it adds more complexity than is worth it.

Thanks for the help!

from graphql-ruby-fragment_cache.

DmitryTsepelev avatar DmitryTsepelev commented on September 26, 2024

Hi @kurtome, what version of graphql-ruby you have in your app? Is there a chance that you override a context method somewhere?

from graphql-ruby-fragment_cache.

kurtome avatar kurtome commented on September 26, 2024

@DmitryTsepelev It turns out my Pundit integration with GraphQL was misconfigured (some how the Field class for pundit was included on my base object). So that fixed the initial problem. Then I ran into #47.

And now, I'm running into a new error with Pundit:

No policy found for:\n\n- Type: Post\n- Runtime value: #<GraphQL::Execution::Interpreter::RawValue:0x00007f9390c66670 @object=[{...},{...}...] ... >`\

I'm considering removing Pundit completely at this point to get around this :)

from graphql-ruby-fragment_cache.

DmitryTsepelev avatar DmitryTsepelev commented on September 26, 2024

RawValue is way to tell interpreter that we have a value that is already resolved, so no further processing is required. Sounds like you cache a data that depends on the user and his permissions; in this case I'd rather not cache user–dependent data or patch Pundit somehow to let it know how to work with raw values (it holds the same data as a usual resolved object)

from graphql-ruby-fragment_cache.

DmitryTsepelev avatar DmitryTsepelev commented on September 26, 2024

Check out https://github.com/palkan/action_policy-graphql, it might be a better fit 😉

from graphql-ruby-fragment_cache.

Related Issues (20)

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.