Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

app.yaml handlers? #39

Open
ppkn opened this issue Aug 7, 2018 · 1 comment
Open

app.yaml handlers? #39

ppkn opened this issue Aug 7, 2018 · 1 comment

Comments

@ppkn
Copy link

ppkn commented Aug 7, 2018

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?

@mdornseif
Copy link
Contributor

mdornseif commented Feb 4, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants