def __init__(self):
     engine_extension = EngineReportingExtension(engine_options, agent.add_trace)
     handlers = [
         (r'/graphql', TornadoGraphQLHandler, dict(graphiql=True, schema=SCHEMA, extensions=[engine_extension])),
         (r'/graphql/batch', TornadoGraphQLHandler, dict(graphiql=True, schema=SCHEMA, batch=True)),
     ]
     tornado.web.Application.__init__(self, handlers)
Exemple #2
0
 def __init__(self):
     engine_extension = lambda: EngineReportingExtension(
         engine_options, add_trace)
     handlers = [
         (
             r"/graphql",
             TornadoGraphQLHandler,
             dict(graphiql=True,
                  schema=schema,
                  extensions=[engine_extension]),
         ),
         (
             r"/graphql/batch",
             TornadoGraphQLHandler,
             dict(graphiql=True, schema=schema, batch=True),
         ),
     ]
     tornado.web.Application.__init__(self, handlers)