app.yaml handlers?
ppkn opened this issue · comments
Daniel Pipkin commented
I'm pretty new to Google App Engine.
What do I need to add to the handlers section of app.yaml
to make it work?
Maximillian Dornseif commented
You have to write your own WSGI application. https://github.com/graphql-python/graphene-gae/blob/master/tests/_webapp2/test_graphql_handler.py gives some hints.
eg mygraphql.py:
import webapp2
from graphene_gae.webapp2 import graphql_application, GraphQLHandler
[define query etc]
schema = graphene.Schema(query=QueryRoot)
graphql_application.config['graphql_schema'] = schema
graphql_application.config['graphql_pretty'] = True
application = webapp2.WSGIApplication([
('/graphql', GraphQLHandler)
])
then in app.yaml:
- url: /graphql
script: mygraphql.application