diff --git a/postgraphile/spec/server/runtime.spec.ts b/postgraphile/spec/server/runtime.spec.ts index 3e62a9f4..85b55b61 100644 --- a/postgraphile/spec/server/runtime.spec.ts +++ b/postgraphile/spec/server/runtime.spec.ts @@ -28,6 +28,7 @@ describe('bootServer', () => { options: { pluginHook: jasmine.createSpy('pluginHook'), watchPg: true, + enableCors: true, simpleSubscriptions: true, graphiql: true, webSocketMiddlewares: [] }, diff --git a/postgraphile/src/adapters/postgraphile.ts b/postgraphile/src/adapters/postgraphile.ts index c7013359..924fe3d5 100644 --- a/postgraphile/src/adapters/postgraphile.ts +++ b/postgraphile/src/adapters/postgraphile.ts @@ -12,6 +12,7 @@ export interface PostgraphileOptions { pluginHook: PluginHookFn, simpleSubscriptions: boolean; watchPg: boolean; + enableCors: boolean; graphiql: boolean; // NOTE (jchristie@8thlight.com) Shape of the middlewares is not // currently important to this application, but if a need arises, diff --git a/postgraphile/src/server/config.ts b/postgraphile/src/server/config.ts index c5acf974..5c4dc310 100644 --- a/postgraphile/src/server/config.ts +++ b/postgraphile/src/server/config.ts @@ -28,6 +28,7 @@ export function buildServerConfig( pluginHook: pluginHook, simpleSubscriptions: true, watchPg: true, + enableCors: true, graphiql: true, webSocketMiddlewares: [ expressSessionHandler,