graphql-auth-directives | Add authorization to your GraphQL API using schema | GraphQL library
kandi X-RAY | graphql-auth-directives Summary
kandi X-RAY | graphql-auth-directives Summary
Add authorization to your GraphQL API using schema directives.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of graphql-auth-directives
graphql-auth-directives Key Features
graphql-auth-directives Examples and Code Snippets
Community Discussions
Trending Discussions on graphql-auth-directives
QUESTION
I created a question-answer platform (similar to stackoverflow) based on the GRANDstack using authorization using the repo graphql-auth-directives. This allows us to check on authentication, authorization on role level or scope level.
In this platform a user can answer a question and might save the answer as draft. As long as the answer is not posted it should be seen by the user itself but by no one else. Other users however should see all the other finalised answers.
How can I create this type of user level authorization? It should result provide the following:
Suppose a question Q with id someid
. Which currently has finalised answers A1 and A2. If some random user U1 performs the query:
ANSWER
Answered 2020-Dec-21 at 17:55In order to tackle the above issue I have adapted the graphql-auth-directives
package and created my own, see here. This allows you to create such 'conditional permissions' as I have called them. To get a better understanding of the implementation I'd suggest you to look at the Medium article I wrote about it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install graphql-auth-directives
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page