expose graphiql; temporary comment out postgraphile subscription setup;

update subscription setup after doc was fixed
This commit is contained in:
Taka Goto
2018-09-07 11:23:28 -05:00
parent ed5b6c8f14
commit d417b9cf3d
9 changed files with 61 additions and 30 deletions
+3 -2
View File
@@ -27,6 +27,7 @@ describe('buildServerConfig', () => {
.createSpyObj<PostgraphileMiddleware>(['call']),
serverUtilities = {
pluginHook: jasmine.createSpy('pluginHook'),
enableSubscriptions: jasmine.createSpy('enableSubscriptions'),
express: jasmine.createSpy('express'),
expressSession: jasmine.createSpy('expressSession'),
@@ -82,8 +83,8 @@ describe('buildServerConfig', () => {
it('provides the database config to Postgraphile', () => {
expect(serverUtilities.postgraphile).toHaveBeenCalledWith(
databaseConfig.host,
databaseConfig.database,
`${databaseConfig.host}/${databaseConfig.database}`,
["public", "maker"],
jasmine.any(Object));
});
+6 -1
View File
@@ -14,6 +14,7 @@ describe('bootServer', () => {
beforeEach(() => {
serverUtilities = {
pluginHook: jasmine.createSpy('pluginHook'),
enableSubscriptions: jasmine.createSpy('enableSubscriptions'),
express: jasmine.createSpy('express'),
expressSession: jasmine.createSpy('expressSession'),
@@ -24,7 +25,11 @@ describe('bootServer', () => {
serverConfig = {
middleware: jasmine.createSpyObj<PostgraphileMiddleware>(['call']),
options: { simpleSubscriptions: true, webSocketMiddlewares: [] },
options: {
pluginHook: jasmine.createSpy('pluginHook'),
simpleSubscriptions: true,
graphiql: true,
webSocketMiddlewares: [] },
port: 5678
};