Enhancement of documentation for use of privacy callback #1059
Replies: 6 comments
-
Thanks for the info! I'd say PRs are welcome (I think we've tests for this…) |
Beta Was this translation helpful? Give feedback.
-
Sry, for asking again. Last year i already opened an issue of how to use the privacy field, but to me it seems like i found a bug here. I know that privacy does only work with SelectFields, but it does not seem to work with nested Types and arrays. Could you take a look at my example repository? I tried to place some comments in the code. Please checkout the app/Graphql/TestQuery.php |
Beta Was this translation helpful? Give feedback.
-
I could be wrong, but I think the issue is that in This any further processing of In the end, |
Beta Was this translation helpful? Give feedback.
-
Is there any reason why the privacy field should only work when the according field is a database field? |
Beta Was this translation helpful? Give feedback.
-
I guess the simplest answer is: "because reasons" as it was only implemented in I guess I see your argument, that it could be part of the "generic" code unrelated to |
Beta Was this translation helpful? Give feedback.
-
I need to implement privacy on arrays that are not columns in a database. Is there any way to do this? |
Beta Was this translation helpful? Give feedback.
-
Could you please add some more information about how to use the 'privacy' callback on GraphQL Types?
It seems that e.g. calling the getSelectFields() Method is required for the privacy configuration in a GraphQL Type to take effect.
This isn't mentioned in the appropriate section of the documentation and currently i even notice that this does not even work when i call the getSelectFields() method in my query. This can lead to dangerous data leaks and should be well documented.
Thanks in advance!
Greets,
Jules
Beta Was this translation helpful? Give feedback.
All reactions