Giter Site home page Giter Site logo

Permission Queries about prisma1 HOT 5 CLOSED

schickling avatar schickling commented on May 1, 2024 12
Permission Queries

from prisma1.

Comments (5)

mypark avatar mypark commented on May 1, 2024 5

I'm assuming that this is the "related user" permissions noted in docs earlier. If so, +1 from me as a high priority feature.

Crucial for security and authorization since you don't want users editing or deleting other people's objects.

from prisma1.

skylinezum avatar skylinezum commented on May 1, 2024 1

I have a suggestion for adding a $now dateTime variable to the custom permission query. For my use case and I'm sure others who have subscription based billing, we update a billingDate when a payment is received like through a stripe webhook. I could then use billingDate_gte: $now to limit mutations or query to accounts that haven't paid in time. This would also be useful in invitations to allow a timeout permission. Currently I have a cron like job that cleans up expired permissions, but they could be late.

A separate general question regarding predefined queries such as custom permissions, would it be a good idea to allow arithmetic operations directly in the filter value such as count: $someNumber + 1. This is more theoretical but in the case of the billingDate if i wanted a grace period I could do billingDate_gte: $now + 3 day. I'm sure it would open up a lot of permission ideas for limiting read counts or write counts.

Keep up the good work :)

from prisma1.

marktani avatar marktani commented on May 1, 2024 1

This proposal looks relevant: graphql/graphql-spec#271 🙂

from prisma1.

sorenbs avatar sorenbs commented on May 1, 2024

This feature is now available for people in our Beta program. If you want to try this out before the official release, please get in touch :-)

from prisma1.

marktani avatar marktani commented on May 1, 2024

Permission queries have now been released to production. 🎉 Thanks everyone for testing this feature in the beta program!

from prisma1.

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.