From d5af79e02250dda9b89369a0c716d27633c6c24a Mon Sep 17 00:00:00 2001 From: James Hrisho Date: Thu, 13 Apr 2017 09:38:20 -0400 Subject: [PATCH] Adds cors preflight to the graphql call (#6) --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 61f44e8..bab3444 100644 --- a/src/index.ts +++ b/src/index.ts @@ -134,7 +134,7 @@ function runServer(schemaIDL: Source, extensionIDL: Source, optionsCB) { const schema = buildServerSchema(schemaIDL); extensionIDL.body = extensionIDL.body.replace('', schema.getQueryType().name); } - + app.options('/graphql', cors()) app.use('/graphql', cors(), graphqlHTTP(() => { const schema = buildServerSchema(schemaIDL);