What is a good pattern for implementing access control in a GraphQL server?

后端 未结 2 1552
清歌不尽
清歌不尽 2021-02-08 17:51

Background:

I have a set of models, including a User and various other models, some of which contain references to a User. I am exposing these models f

2条回答
  •  南旧
    南旧 (楼主)
    2021-02-08 18:15

    I create a rule base access control to be used with GraphQL.

    https://github.com/joonhocho/graphql-rule

    It is simple and unopionated that it can be used with or without GraphQL.

    You can use it with a plain javascript objects.

    Hope it helps GraphQLers!

提交回复
热议问题