graphql-python / graphql-python/flask-graphql

Best way to authenticate requests

Abierto
#17 7 comentarios 5 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
1.3k
Forks
139
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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!

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.