From c4fabe367507f048f756ab4772942382449ef5a8 Mon Sep 17 00:00:00 2001 From: Urigo Date: Tue, 28 Feb 2017 20:05:45 +0200 Subject: [PATCH] added support for subscriptions --- .../src/expressApollo.ts | 1 + .../src/renderGraphiQL.ts | 84 +++++++++++++++---- 2 files changed, 67 insertions(+), 18 deletions(-) diff --git a/packages/graphql-server-express/src/expressApollo.ts b/packages/graphql-server-express/src/expressApollo.ts index d3ed376f9fd..b095a9f1405 100644 --- a/packages/graphql-server-express/src/expressApollo.ts +++ b/packages/graphql-server-express/src/expressApollo.ts @@ -72,6 +72,7 @@ export function graphiqlExpress(options: GraphiQL.GraphiQLData) { const graphiQLString = GraphiQL.renderGraphiQL({ endpointURL: options.endpointURL, + subscriptionsEndpoint: options.subscriptionsEndpoint, query: query || options.query, variables: q.variables && JSON.parse(q.variables) || options.variables, operationName: operationName || options.operationName, diff --git a/packages/graphql-server-module-graphiql/src/renderGraphiQL.ts b/packages/graphql-server-module-graphiql/src/renderGraphiQL.ts index 62ef287078e..2435e102998 100644 --- a/packages/graphql-server-module-graphiql/src/renderGraphiQL.ts +++ b/packages/graphql-server-module-graphiql/src/renderGraphiQL.ts @@ -66,6 +66,7 @@ export function renderGraphiQL(data: GraphiQLData): string { + `;