@rxdi/graphql-pubsub 0.7.245 → 0.7.246

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,7 @@ export declare class GRAPHQL_PUB_SUB_DI_CONFIG {
38
38
  log?: boolean;
39
39
  activateRabbitMQ?: boolean;
40
40
  protocol?: PubSubProtocol;
41
+ path?: string;
41
42
  logger?: any;
42
43
  subscriptionServerOptions?: GRAPHQL_PUBSUB_SERVER_OPTIONS;
43
44
  }
@@ -59,6 +59,15 @@ let SubscriptionService = class SubscriptionService {
59
59
  if (schema) {
60
60
  this.config.graphqlOptions.schema = schema;
61
61
  }
62
+ // During lambda specialize the user module is loaded with
63
+ // LAMBFORGE_RUNTIME=1. If a schema-reload hook fires during
64
+ // that transient phase, update the config reference but leave
65
+ // the existing server intact — it is recreated in step 2 of
66
+ // specialize (applyAppModule → reloadSchema) when the flag
67
+ // is no longer set.
68
+ if (process.env.LAMBFORGE_RUNTIME) {
69
+ return;
70
+ }
62
71
  if (this.subscriptionServer) {
63
72
  this.subscriptionServer.close();
64
73
  this.subscriptionServer = null;
@@ -71,7 +80,7 @@ let SubscriptionService = class SubscriptionService {
71
80
  return connectionParams;
72
81
  },
73
82
  onOperation: (connectionParams, params, webSocket) => {
74
- return params;
83
+ return Object.assign(Object.assign({}, params), { schema: this.config.graphqlOptions.schema });
75
84
  },
76
85
  };
77
86
  if (this.pubConfig.authentication) {
@@ -90,7 +99,7 @@ let SubscriptionService = class SubscriptionService {
90
99
  config.onDisconnect = auth.onSubDisconnect.bind(auth);
91
100
  }
92
101
  }
93
- this.subscriptionServer = new subscriptions_transport_ws_1.SubscriptionServer(config, Object.assign({ server: this.server.listener, path: '/subscriptions' }, this.pubConfig.subscriptionServerOptions));
102
+ this.subscriptionServer = new subscriptions_transport_ws_1.SubscriptionServer(config, Object.assign({ server: this.server.listener }, this.pubConfig.subscriptionServerOptions));
94
103
  });
95
104
  }
96
105
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxdi/graphql-pubsub",
3
- "version": "0.7.245",
3
+ "version": "0.7.246",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/rxdi/graphql-pubsub"
@@ -29,14 +29,14 @@
29
29
  },
30
30
  "homepage": "https://github.com/rxdi/graphql-pubsub#readme",
31
31
  "dependencies": {
32
- "@rxdi/graphql-rabbitmq-subscriptions": "^0.7.244",
33
- "@rxdi/rabbitmq-pubsub": "^0.7.244",
32
+ "@rxdi/graphql-rabbitmq-subscriptions": "^0.7.245",
33
+ "@rxdi/rabbitmq-pubsub": "^0.7.245",
34
34
  "subscriptions-transport-ws": "^0.9.19"
35
35
  },
36
36
  "devDependencies": {
37
- "@rxdi/core": "^0.7.244",
38
- "@rxdi/graphql": "^0.7.244",
39
- "@rxdi/hapi": "^0.7.244",
37
+ "@rxdi/core": "^0.7.245",
38
+ "@rxdi/graphql": "^0.7.245",
39
+ "@rxdi/hapi": "^0.7.245",
40
40
  "@types/graphql": "^14.5.0",
41
41
  "@types/hapi": "^18.0.4",
42
42
  "@types/node": "^25.0.3",