@snugdesk/whatsapp-widget 0.1.9 → 0.2.0

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.

Potentially problematic release.


This version of @snugdesk/whatsapp-widget might be problematic. Click here for more details.

@@ -64,7 +64,7 @@ class AppSyncGraphqlService {
64
64
  constructor(config, authenticationService) {
65
65
  this.authenticationService = authenticationService;
66
66
  this.config = config ?? defaultAppSyncConfig;
67
- this.ensureConfigured();
67
+ // this.ensureConfigured();
68
68
  }
69
69
  async query(statement, variables) {
70
70
  this.ensureConfigured();
@@ -176,8 +176,14 @@ class AppSyncGraphqlService {
176
176
  const existing = Amplify.getConfig?.() ?? {};
177
177
  const existingEndpoint = existing?.API?.GraphQL?.endpoint ?? existing?.API?.GraphQL?.graphql_endpoint ?? existing?.aws_appsync_graphqlEndpoint;
178
178
  const existingAuthMode = existing?.API?.GraphQL?.defaultAuthMode ?? existing?.aws_appsync_authenticationType;
179
+ const useHost = existingEndpoint === defaultAppSyncConfig.endpoint;
180
+ console.debug('[WhatsAppWidget] Host Amplify config', {
181
+ existingEndpoint,
182
+ existingAuthMode,
183
+ useHost,
184
+ });
179
185
  return {
180
- useHost: existingEndpoint === defaultAppSyncConfig.endpoint,
186
+ useHost,
181
187
  authMode: existingAuthMode,
182
188
  };
183
189
  }