graphql-python / graphene-gae

GraphQL Support for Google AppEngine [DEPRECATED - Looking for maintainers]

Home Page:http://docs.graphene-python.org/projects/gae/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

app.yaml handlers?

ppkn opened this issue · comments

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?

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