@ttoss/appsync-api 0.18.3 → 0.18.4
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.
- package/dist/esm/index.js +4 -4
- package/dist/index.js +4 -4
- package/package.json +15 -11
- package/src/createAppSyncResolverHandler.ts +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -267,9 +267,9 @@ var createApiTemplate = ({
|
|
|
267
267
|
// src/createAppSyncResolverHandler.ts
|
|
268
268
|
import { buildSchema } from "@ttoss/graphql-api";
|
|
269
269
|
|
|
270
|
-
// ../
|
|
271
|
-
var
|
|
272
|
-
return JSON.parse(Buffer.from(
|
|
270
|
+
// ../auth-core/src/encodeDecode.ts
|
|
271
|
+
var decode = encoded => {
|
|
272
|
+
return JSON.parse(Buffer.from(encoded, "base64").toString("utf8"));
|
|
273
273
|
};
|
|
274
274
|
|
|
275
275
|
// src/createAppSyncResolverHandler.ts
|
|
@@ -296,7 +296,7 @@ var createAppSyncResolverHandler = ({
|
|
|
296
296
|
if (!headersCredentials) {
|
|
297
297
|
return null;
|
|
298
298
|
}
|
|
299
|
-
return
|
|
299
|
+
return decode(headersCredentials);
|
|
300
300
|
})();
|
|
301
301
|
const schema = buildSchema(buildSchemaInput);
|
|
302
302
|
const parentType = schema.getType(parentTypeName);
|
package/dist/index.js
CHANGED
|
@@ -299,9 +299,9 @@ var createApiTemplate = ({
|
|
|
299
299
|
// src/createAppSyncResolverHandler.ts
|
|
300
300
|
var import_graphql_api2 = require("@ttoss/graphql-api");
|
|
301
301
|
|
|
302
|
-
// ../
|
|
303
|
-
var
|
|
304
|
-
return JSON.parse(Buffer.from(
|
|
302
|
+
// ../auth-core/src/encodeDecode.ts
|
|
303
|
+
var decode = encoded => {
|
|
304
|
+
return JSON.parse(Buffer.from(encoded, "base64").toString("utf8"));
|
|
305
305
|
};
|
|
306
306
|
|
|
307
307
|
// src/createAppSyncResolverHandler.ts
|
|
@@ -328,7 +328,7 @@ var createAppSyncResolverHandler = ({
|
|
|
328
328
|
if (!headersCredentials) {
|
|
329
329
|
return null;
|
|
330
330
|
}
|
|
331
|
-
return
|
|
331
|
+
return decode(headersCredentials);
|
|
332
332
|
})();
|
|
333
333
|
const schema = (0, import_graphql_api2.buildSchema)(buildSchemaInput);
|
|
334
334
|
const parentType = schema.getType(parentTypeName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/appsync-api",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.4",
|
|
4
4
|
"description": "A library for building GraphQL APIs for AWS AppSync.",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -11,31 +11,35 @@
|
|
|
11
11
|
"url": "https://github.com/ttoss/ttoss.git",
|
|
12
12
|
"directory": "packages/appsync-api"
|
|
13
13
|
},
|
|
14
|
-
"
|
|
15
|
-
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/esm/index.js",
|
|
17
|
+
"require": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
16
21
|
"files": [
|
|
17
22
|
"dist",
|
|
18
23
|
"src"
|
|
19
24
|
],
|
|
20
25
|
"sideEffects": false,
|
|
21
|
-
"typings": "dist/index.d.ts",
|
|
22
26
|
"dependencies": {
|
|
23
|
-
"@ttoss/cloudformation": "^0.9.
|
|
27
|
+
"@ttoss/cloudformation": "^0.9.1"
|
|
24
28
|
},
|
|
25
29
|
"peerDependencies": {
|
|
26
30
|
"graphql": "^16.6.0",
|
|
27
|
-
"@ttoss/graphql-api": "^0.5.
|
|
31
|
+
"@ttoss/graphql-api": "^0.5.1"
|
|
28
32
|
},
|
|
29
33
|
"devDependencies": {
|
|
30
34
|
"@types/aws-lambda": "^8.10.130",
|
|
31
35
|
"graphql": "^16.8.1",
|
|
32
36
|
"graphql-shield": "^7.6.5",
|
|
33
37
|
"jest": "^29.7.0",
|
|
34
|
-
"tsup": "^8.0.
|
|
35
|
-
"@ttoss/
|
|
36
|
-
"@ttoss/
|
|
37
|
-
"@ttoss/
|
|
38
|
-
"carlin": "^1.31.
|
|
38
|
+
"tsup": "^8.0.2",
|
|
39
|
+
"@ttoss/auth-core": "^0.0.3",
|
|
40
|
+
"@ttoss/config": "^1.31.5",
|
|
41
|
+
"@ttoss/graphql-api": "^0.5.1",
|
|
42
|
+
"carlin": "^1.31.12"
|
|
39
43
|
},
|
|
40
44
|
"keywords": [
|
|
41
45
|
"api",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { BuildSchemaInput, buildSchema } from '@ttoss/graphql-api';
|
|
3
3
|
import { type GraphQLObjectType } from 'graphql';
|
|
4
|
-
import {
|
|
4
|
+
import { decode } from '@ttoss/auth-core';
|
|
5
5
|
import type { AppSyncResolverHandler as AwsAppSyncResolverHandler } from 'aws-lambda';
|
|
6
6
|
|
|
7
7
|
export type AppSyncResolverHandler<
|
|
@@ -29,7 +29,7 @@ export const createAppSyncResolverHandler = ({
|
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
return
|
|
32
|
+
return decode(headersCredentials);
|
|
33
33
|
})();
|
|
34
34
|
|
|
35
35
|
const schema = buildSchema(buildSchemaInput);
|