graphql-python / graphql-python/flask-graphql
Best way to authenticate requests
未关闭
- 主要语言
- Python
- 星标
- 1.3k
- 派生
- 139
- PR 合并指标
- 30 天内没有已合并 PR
描述
I am trying to figure out the best way to authenticate a request before my schema executes the query/mutation. I was thinking I could use the @app.resolver('url') tag and create a function that would authenticate the request and then pass it to the graphqlview. Something like this:
```
@app.route('/graphql/')
def graphql():
print request.headers #AUTHENTICATE HERE
print request.data
return GraphQLView.as_view('/graphql/', schema=schema, graphiql=True)
```
But this doesn't work, can someone either show me what I am doing wrong here or give me a different way to authenticate the request? Thanks!
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。