Closed molomby closed 3 years ago
an isReadOnly
option for field is also needed.
This is possible with access control and now that the bug related to read-only fields rendering in the Admin UI has been resolved I don't think this gives us much. Sure the queries and mutation will still be created (which could still be useful internally) but on the client they will always fail.
@molomby I think we can mark this as resolved?
an
isReadOnly
option for field is also needed.
^this one is fixed, original read-only
list (not just field) may still be needed.
It looks like there hasn't been any activity here in over 6 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. :)
Leading on from thoughts in #1117.
It would be very useful (and probably not especially difficult?) to support a flag on lists that made them read-only (
isReadOnly
I guess?). When set totrue
this option would remove all mutations related to the list from the GraphQL schema as well as edit/create/delete functionality from the Admin UI. All read operations/interface would operate in the same manner.I can think of two scenarios in which this would be useful:
An example of the "view" scenario -- here we have a "high scores" list with a field that calculates each score's current ranking. This kind of operation is impractical to perform in JS, even with the planned "virtual" fields (#1117).
Lists:
Underlying view (pgSQL):
This can then be used in GraphQL queries: