altair-graphql-core 8.2.1 → 8.2.2

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.
@@ -1,9 +1,9 @@
1
1
 
2
- > altair-graphql-core@8.2.1 bootstrap /home/runner/work/altair/altair/packages/altair-core
2
+ > altair-graphql-core@8.2.2 bootstrap /home/runner/work/altair/altair/packages/altair-core
3
3
  > pnpm build
4
4
 
5
5
 
6
- > altair-graphql-core@8.2.1 build /home/runner/work/altair/altair/packages/altair-core
6
+ > altair-graphql-core@8.2.2 build /home/runner/work/altair/altair/packages/altair-core
7
7
  > node ./scripts/build.js
8
8
 
9
9
  Generating types for partial-settings ...
@@ -15,6 +15,7 @@ export interface ISendMessageDto {
15
15
  sdl?: string;
16
16
  graphqlQuery?: string;
17
17
  graphqlVariables?: string;
18
+ graphqlResponse?: string;
18
19
  }
19
20
  export interface IRateMessageDto {
20
21
  rating: number;
@@ -15,6 +15,7 @@ export interface ISendMessageDto {
15
15
  sdl?: string;
16
16
  graphqlQuery?: string;
17
17
  graphqlVariables?: string;
18
+ graphqlResponse?: string;
18
19
  }
19
20
  export interface IRateMessageDto {
20
21
  rating: number;
@@ -7,6 +7,7 @@ class PluginFrameEngine {
7
7
  constructor(worker, options) {
8
8
  this.worker = worker;
9
9
  this.options = options;
10
+ // eslint-disable-next-line @typescript-eslint/ban-types
10
11
  this.eventListeners = {};
11
12
  this.readyPromise = new Promise((resolve) => {
12
13
  this.worker.subscribe(events_1.PLUGIN_ENGINE_READY, () => {
@@ -44,7 +44,7 @@ class AltairV3Panel {
44
44
  });
45
45
  }
46
46
  injectCSS(css) {
47
- let el = document.createElement('style');
47
+ const el = document.createElement('style');
48
48
  el.innerText = css.replace(/[\n\r]/g, '');
49
49
  document.head.appendChild(el);
50
50
  return el;
@@ -77,6 +77,7 @@ class PluginParentWorker extends worker_1.EvaluatorWorker {
77
77
  return;
78
78
  }
79
79
  if (e.data.frameId !== this.opts.id) {
80
+ // eslint-disable-next-line no-console
80
81
  console.error('Invalid frameId in data', e.data.frameId, this.opts.id);
81
82
  return;
82
83
  }
@@ -8,8 +8,9 @@ export declare class AppSyncRequestHandler implements GraphQLRequestHandler {
8
8
  "aws_appsync_graphqlEndpoint": "https://....appsync-api.us-west-2.amazonaws.com/graphql",
9
9
  "aws_appsync_region": "us-west-2",
10
10
  "aws_appsync_authenticationType": "API_KEY",
11
- "aws_appsync_apiKey": "..."
12
- "aws_appsync_jwtToken" "..."
11
+ "aws_appsync_apiKey": "...",
12
+ "aws_appsync_jwtToken" "...",
13
+ "aws_appsync_token" "..."
13
14
  }
14
15
  */
15
16
  handle(request: GraphQLRequestOptions): Observable<GraphQLResponseData>;
@@ -14,8 +14,9 @@ class AppSyncRequestHandler {
14
14
  "aws_appsync_graphqlEndpoint": "https://....appsync-api.us-west-2.amazonaws.com/graphql",
15
15
  "aws_appsync_region": "us-west-2",
16
16
  "aws_appsync_authenticationType": "API_KEY",
17
- "aws_appsync_apiKey": "..."
18
- "aws_appsync_jwtToken" "..."
17
+ "aws_appsync_apiKey": "...",
18
+ "aws_appsync_jwtToken" "...",
19
+ "aws_appsync_token" "..."
19
20
  }
20
21
  */
21
22
  handle(request) {
@@ -27,16 +28,19 @@ class AppSyncRequestHandler {
27
28
  ? request.additionalParams.aws_appsync_region
28
29
  : '';
29
30
  const auth = {
30
- type: (typeof request.additionalParams?.aws_appsync_authenticationType ===
31
+ type: typeof request.additionalParams?.aws_appsync_authenticationType ===
31
32
  'string'
32
33
  ? request.additionalParams.aws_appsync_authenticationType
33
- : ''),
34
+ : '',
34
35
  apiKey: typeof request.additionalParams?.aws_appsync_apiKey === 'string'
35
36
  ? request.additionalParams.aws_appsync_apiKey
36
37
  : '',
37
38
  jwtToken: typeof request.additionalParams?.aws_appsync_jwtToken === 'string'
38
39
  ? request.additionalParams.aws_appsync_jwtToken
39
40
  : '',
41
+ token: typeof request.additionalParams?.aws_appsync_token === 'string'
42
+ ? request.additionalParams.aws_appsync_token
43
+ : '',
40
44
  };
41
45
  const link = core_1.ApolloLink.from([
42
46
  (0, aws_appsync_auth_link_1.createAuthLink)({ url, region, auth }),
@@ -4,6 +4,7 @@ export class PluginFrameEngine {
4
4
  constructor(worker, options) {
5
5
  this.worker = worker;
6
6
  this.options = options;
7
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
8
  this.eventListeners = {};
8
9
  this.readyPromise = new Promise((resolve) => {
9
10
  this.worker.subscribe(PLUGIN_ENGINE_READY, () => {
@@ -41,7 +41,7 @@ export class AltairV3Panel {
41
41
  });
42
42
  }
43
43
  injectCSS(css) {
44
- let el = document.createElement('style');
44
+ const el = document.createElement('style');
45
45
  el.innerText = css.replace(/[\n\r]/g, '');
46
46
  document.head.appendChild(el);
47
47
  return el;
@@ -74,6 +74,7 @@ export class PluginParentWorker extends EvaluatorWorker {
74
74
  return;
75
75
  }
76
76
  if (e.data.frameId !== this.opts.id) {
77
+ // eslint-disable-next-line no-console
77
78
  console.error('Invalid frameId in data', e.data.frameId, this.opts.id);
78
79
  return;
79
80
  }
@@ -8,8 +8,9 @@ export declare class AppSyncRequestHandler implements GraphQLRequestHandler {
8
8
  "aws_appsync_graphqlEndpoint": "https://....appsync-api.us-west-2.amazonaws.com/graphql",
9
9
  "aws_appsync_region": "us-west-2",
10
10
  "aws_appsync_authenticationType": "API_KEY",
11
- "aws_appsync_apiKey": "..."
12
- "aws_appsync_jwtToken" "..."
11
+ "aws_appsync_apiKey": "...",
12
+ "aws_appsync_jwtToken" "...",
13
+ "aws_appsync_token" "..."
13
14
  }
14
15
  */
15
16
  handle(request: GraphQLRequestOptions): Observable<GraphQLResponseData>;
@@ -11,8 +11,9 @@ export class AppSyncRequestHandler {
11
11
  "aws_appsync_graphqlEndpoint": "https://....appsync-api.us-west-2.amazonaws.com/graphql",
12
12
  "aws_appsync_region": "us-west-2",
13
13
  "aws_appsync_authenticationType": "API_KEY",
14
- "aws_appsync_apiKey": "..."
15
- "aws_appsync_jwtToken" "..."
14
+ "aws_appsync_apiKey": "...",
15
+ "aws_appsync_jwtToken" "...",
16
+ "aws_appsync_token" "..."
16
17
  }
17
18
  */
18
19
  handle(request) {
@@ -24,16 +25,19 @@ export class AppSyncRequestHandler {
24
25
  ? request.additionalParams.aws_appsync_region
25
26
  : '';
26
27
  const auth = {
27
- type: (typeof request.additionalParams?.aws_appsync_authenticationType ===
28
+ type: typeof request.additionalParams?.aws_appsync_authenticationType ===
28
29
  'string'
29
30
  ? request.additionalParams.aws_appsync_authenticationType
30
- : ''),
31
+ : '',
31
32
  apiKey: typeof request.additionalParams?.aws_appsync_apiKey === 'string'
32
33
  ? request.additionalParams.aws_appsync_apiKey
33
34
  : '',
34
35
  jwtToken: typeof request.additionalParams?.aws_appsync_jwtToken === 'string'
35
36
  ? request.additionalParams.aws_appsync_jwtToken
36
37
  : '',
38
+ token: typeof request.additionalParams?.aws_appsync_token === 'string'
39
+ ? request.additionalParams.aws_appsync_token
40
+ : '',
37
41
  };
38
42
  const link = ApolloLink.from([
39
43
  createAuthLink({ url, region, auth }),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "altair-graphql-core",
3
3
  "description": "Several of the core logic for altair graphql client",
4
- "version": "8.2.1",
4
+ "version": "8.2.2",
5
5
  "author": "Samuel Imolorhe <altair@sirmuel.design> (https://sirmuel.design)",
6
6
  "bugs": "https://github.com/altair-graphql/altair/issues",
7
7
  "dependencies": {
@@ -13,8 +13,8 @@
13
13
  "apollo-cache-inmemory": "1.6.6",
14
14
  "apollo-link": "1.2.14",
15
15
  "apollo-link-http": "1.5.17",
16
- "aws-appsync-auth-link": "3.0.4",
17
- "aws-appsync-subscription-link": "3.0.6",
16
+ "aws-appsync-auth-link": "3.0.7",
17
+ "aws-appsync-subscription-link": "3.1.3",
18
18
  "color-name": "^2.0.0",
19
19
  "crypto-js": "3.3.0",
20
20
  "deepmerge": "4.2.2",