Code Monkey home page Code Monkey logo

Comments (5)

joemcbride avatar joemcbride commented on July 1, 2024

No, you’re not missing anything. These authorization checks utilize the existing GraphQL validation, which runs before the query is executed. If you need to access a value that is first resolved/fetched in a field, then you will have to do that manually yourself.

from authorization.

hanlindev avatar hanlindev commented on July 1, 2024

Hi @micmartin @joemcbride, please allow me to do a shameless plugin here. Having worked with a pretty sophisticated privacy system at work, I wanted to achieve something similar using this library. But I discovered it couldn't be done so I quickly spawned my own take on GraphQL authorization - https://github.com/hanlindev/graphql-privacy .

@micmartin what you described is one of the first use cases I wanted to handle so I think my library should be able to solve your problem. However it was just created a couple of weeks ago. The implementation is a bit hacky and there can be many bugs laying around. Anyways you could still look at my code and create your own version if you desire.

from authorization.

sungam3r avatar sungam3r commented on July 1, 2024

@micmartin Is this issue still actual?

from authorization.

micmartin avatar micmartin commented on July 1, 2024

I soved that problem by doing an authorization check on the "main" entites while retrieving them. No a nice and general solution but it works for my needs.
@hanlindev sorry for not responding to your comment, must have missed the notification

from authorization.

sungam3r avatar sungam3r commented on July 1, 2024

As @joemcbride said

These authorization checks utilize the existing GraphQL validation, which runs before the query is executed. If you need to access a value that is first resolved/fetched in a field, then you will have to do that manually yourself.

Closing this issue as wontfix.

from authorization.

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.