@common-stack/graphql-api 0.6.1-alpha.0 → 1.0.1-alpha.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.
- package/lib/api/graphql/index.d.ts +1 -0
- package/lib/api/index.d.ts +2 -0
- package/lib/api/resolvers.d.ts +22 -0
- package/lib/index.d.ts +6 -3
- package/lib/index.js +245 -117
- package/lib/index.js.map +1 -1
- package/lib/scalars/GraphQLTimestamp.d.ts +3 -0
- package/lib/scalars/index.d.ts +1 -1
- package/package.json +4 -21
- package/lib/api/resolver.d.ts +0 -10
- /package/lib/scalars/{anyobject.d.ts → AnyObject.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const schema: string[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const resolvers: {
|
|
2
|
+
AnyObject: import("graphql").GraphQLScalarType;
|
|
3
|
+
Date: any;
|
|
4
|
+
Time: any;
|
|
5
|
+
Timestamp: import("graphql").GraphQLScalarType;
|
|
6
|
+
URI: any;
|
|
7
|
+
URIInput: any;
|
|
8
|
+
DateTime: any;
|
|
9
|
+
JSON: import("graphql").GraphQLScalarType;
|
|
10
|
+
JSONObject: import("graphql").GraphQLScalarType;
|
|
11
|
+
};
|
|
12
|
+
export declare const resolverFunc: (options: any) => {
|
|
13
|
+
AnyObject: import("graphql").GraphQLScalarType;
|
|
14
|
+
Date: any;
|
|
15
|
+
Time: any;
|
|
16
|
+
Timestamp: import("graphql").GraphQLScalarType;
|
|
17
|
+
URI: any;
|
|
18
|
+
URIInput: any;
|
|
19
|
+
DateTime: any;
|
|
20
|
+
JSON: import("graphql").GraphQLScalarType;
|
|
21
|
+
JSONObject: import("graphql").GraphQLScalarType;
|
|
22
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export {
|
|
1
|
+
import { Feature } from '@common-stack/server-core';
|
|
2
|
+
import { schema, resolvers } from './api';
|
|
3
|
+
export { resolvers };
|
|
4
|
+
export { schema as rootSchemaDef };
|
|
4
5
|
export * from './scalars';
|
|
5
6
|
export * from './utils';
|
|
7
|
+
declare const _default: Feature<import("@common-stack/server-core").ConfigurationScope>;
|
|
8
|
+
export default _default;
|
package/lib/index.js
CHANGED
|
@@ -2,92 +2,113 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/ "./src/api/root-schema.graphqls":
|
|
6
|
-
|
|
7
|
-
!*** ./src/api/root-schema.graphqls ***!
|
|
8
|
-
|
|
5
|
+
/***/ "./src/api/graphql/root-schema.graphqls":
|
|
6
|
+
/*!**********************************************!*\
|
|
7
|
+
!*** ./src/api/graphql/root-schema.graphqls ***!
|
|
8
|
+
\**********************************************/
|
|
9
9
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
10
10
|
|
|
11
11
|
__webpack_require__.r(__webpack_exports__);
|
|
12
12
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13
13
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
14
14
|
/* harmony export */ });
|
|
15
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("scalar AnyObject\nscalar Date\nscalar Time\nscalar DateTime\nscalar URI\nscalar URIInput\nscalar Observable\
|
|
15
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("scalar AnyObject\nscalar Date\nscalar Time\nscalar DateTime\nscalar Timestamp\nscalar URI\nscalar URIInput\nscalar Observable\nscalar JSON\nscalar JSONObject\n\ndirective @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE\nenum CacheControlScope {\n PUBLIC\n PRIVATE\n}\n\n\n\"\"\"\n An object with an ID.\n\"\"\"\ninterface Node {\n \"\"\"\n The ID of the node.\n \"\"\"\n id: ID!\n}\n\n# Pagination information. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.\ntype PageInfo {\n # Whether there is a next page of nodes in the connection.\n hasNextPage: Boolean!\n}\n\n\"\"\"\n Represents a null return value.\n\"\"\"\ntype EmptyResponse {\n # A dummy null value.\n alwaysNil: String\n}\n\ntype FieldError {\n field: String!\n message: String!\n}\n\ninput Sort{\n key: String!,\n value: SortEnum!,\n}\n\nenum SortEnum{\n ASC,\n DESC\n}\n\ntype Query {\n \"\"\"\n Looks up a node by ID.\n \"\"\"\n node(id: ID!): Node\n\n}\n\ntype Mutation {\n dummy: Int\n}\n\ntype Subscription {\n dummy: Int\n}\n\n\ntype AdminIdeSettings {\n dummy: Int\n}\n\n\"\"\" All Moleculer Topic names are extended from this.\"\"\"\nenum MoleculerServiceName {\n dummy\n}\n\n#interface Node {\n# id: ID!\n#}\n\n\nschema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\n");
|
|
16
16
|
|
|
17
17
|
/***/ }),
|
|
18
18
|
|
|
19
|
-
/***/ "./src/api/
|
|
20
|
-
|
|
21
|
-
!*** ./src/api/
|
|
22
|
-
|
|
23
|
-
/***/ ((__unused_webpack_module,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
exports.resolvers = {
|
|
33
|
-
AnyObject: anyobject_1.GraphQLAnyObject,
|
|
34
|
-
Date: graphql_iso_date_1.GraphQLDate,
|
|
35
|
-
Time: graphql_iso_date_1.GraphQLTime,
|
|
36
|
-
URI: (0, graphql_type_uri_1.default)('URI'),
|
|
37
|
-
URIInput: (0, graphql_type_uri_1.default)('URIInput'),
|
|
38
|
-
DateTime: graphql_iso_date_1.GraphQLDateTime,
|
|
39
|
-
JSON: graphql_type_json_1.default,
|
|
40
|
-
JSONObject: graphql_type_json_1.GraphQLJSONObject,
|
|
41
|
-
};
|
|
19
|
+
/***/ "./src/api/graphql/index.ts":
|
|
20
|
+
/*!**********************************!*\
|
|
21
|
+
!*** ./src/api/graphql/index.ts ***!
|
|
22
|
+
\**********************************/
|
|
23
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24
|
+
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
/* harmony export */ schema: () => (/* binding */ schema)
|
|
28
|
+
/* harmony export */ });
|
|
29
|
+
/* harmony import */ var _root_schema_graphqls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./root-schema.graphqls */ "./src/api/graphql/root-schema.graphqls");
|
|
30
|
+
|
|
31
|
+
const schema = [_root_schema_graphqls__WEBPACK_IMPORTED_MODULE_0__["default"]];
|
|
42
32
|
|
|
43
33
|
|
|
44
34
|
/***/ }),
|
|
45
35
|
|
|
46
|
-
/***/ "./src/index.ts":
|
|
47
|
-
|
|
48
|
-
!*** ./src/index.ts ***!
|
|
49
|
-
|
|
50
|
-
/***/ (
|
|
36
|
+
/***/ "./src/api/index.ts":
|
|
37
|
+
/*!**************************!*\
|
|
38
|
+
!*** ./src/api/index.ts ***!
|
|
39
|
+
\**************************/
|
|
40
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
51
41
|
|
|
42
|
+
__webpack_require__.r(__webpack_exports__);
|
|
43
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
44
|
+
/* harmony export */ resolverFunc: () => (/* reexport safe */ _resolvers__WEBPACK_IMPORTED_MODULE_1__.resolverFunc),
|
|
45
|
+
/* harmony export */ resolvers: () => (/* reexport safe */ _resolvers__WEBPACK_IMPORTED_MODULE_1__.resolvers),
|
|
46
|
+
/* harmony export */ schema: () => (/* reexport safe */ _graphql__WEBPACK_IMPORTED_MODULE_0__.schema)
|
|
47
|
+
/* harmony export */ });
|
|
48
|
+
/* harmony import */ var _graphql__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./graphql */ "./src/api/graphql/index.ts");
|
|
49
|
+
/* harmony import */ var _resolvers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./resolvers */ "./src/api/resolvers.ts");
|
|
52
50
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/***/ }),
|
|
55
|
+
|
|
56
|
+
/***/ "./src/api/resolvers.ts":
|
|
57
|
+
/*!******************************!*\
|
|
58
|
+
!*** ./src/api/resolvers.ts ***!
|
|
59
|
+
\******************************/
|
|
60
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
61
|
+
|
|
62
|
+
__webpack_require__.r(__webpack_exports__);
|
|
63
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
64
|
+
/* harmony export */ resolverFunc: () => (/* binding */ resolverFunc),
|
|
65
|
+
/* harmony export */ resolvers: () => (/* binding */ resolvers)
|
|
66
|
+
/* harmony export */ });
|
|
67
|
+
/* harmony import */ var graphql_type_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphql-type-json */ "graphql-type-json");
|
|
68
|
+
/* harmony import */ var graphql_type_json__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphql_type_json__WEBPACK_IMPORTED_MODULE_0__);
|
|
69
|
+
/* harmony import */ var graphql_iso_date__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! graphql-iso-date */ "graphql-iso-date");
|
|
70
|
+
/* harmony import */ var graphql_iso_date__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphql_iso_date__WEBPACK_IMPORTED_MODULE_1__);
|
|
71
|
+
/* harmony import */ var _cdmbase_graphql_type_uri__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @cdmbase/graphql-type-uri */ "@cdmbase/graphql-type-uri");
|
|
72
|
+
/* harmony import */ var _cdmbase_graphql_type_uri__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_cdmbase_graphql_type_uri__WEBPACK_IMPORTED_MODULE_2__);
|
|
73
|
+
/* harmony import */ var _scalars_GraphQLTimestamp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../scalars/GraphQLTimestamp */ "./src/scalars/GraphQLTimestamp.ts");
|
|
74
|
+
/* harmony import */ var _scalars_AnyObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../scalars/AnyObject */ "./src/scalars/AnyObject.ts");
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
const resolvers = {
|
|
81
|
+
AnyObject: _scalars_AnyObject__WEBPACK_IMPORTED_MODULE_4__.GraphQLAnyObject,
|
|
82
|
+
Date: graphql_iso_date__WEBPACK_IMPORTED_MODULE_1__.GraphQLDate,
|
|
83
|
+
Time: graphql_iso_date__WEBPACK_IMPORTED_MODULE_1__.GraphQLTime,
|
|
84
|
+
Timestamp: _scalars_GraphQLTimestamp__WEBPACK_IMPORTED_MODULE_3__["default"],
|
|
85
|
+
URI: _cdmbase_graphql_type_uri__WEBPACK_IMPORTED_MODULE_2___default()('URI'),
|
|
86
|
+
URIInput: _cdmbase_graphql_type_uri__WEBPACK_IMPORTED_MODULE_2___default()('URIInput'),
|
|
87
|
+
DateTime: graphql_iso_date__WEBPACK_IMPORTED_MODULE_1__.GraphQLDateTime,
|
|
88
|
+
JSON: (graphql_type_json__WEBPACK_IMPORTED_MODULE_0___default()),
|
|
89
|
+
JSONObject: graphql_type_json__WEBPACK_IMPORTED_MODULE_0__.GraphQLJSONObject,
|
|
66
90
|
};
|
|
67
|
-
|
|
68
|
-
exports.rootSchemaDef = void 0;
|
|
69
|
-
const root_schema_graphqls_1 = __webpack_require__(/*! ./api/root-schema.graphqls */ "./src/api/root-schema.graphqls");
|
|
70
|
-
exports.rootSchemaDef = root_schema_graphqls_1.default;
|
|
71
|
-
__exportStar(__webpack_require__(/*! ./api/resolver */ "./src/api/resolver.ts"), exports);
|
|
72
|
-
__exportStar(__webpack_require__(/*! ./scalars */ "./src/scalars/index.ts"), exports);
|
|
73
|
-
__exportStar(__webpack_require__(/*! ./utils */ "./src/utils/index.ts"), exports);
|
|
91
|
+
const resolverFunc = (options) => resolvers;
|
|
74
92
|
|
|
75
93
|
|
|
76
94
|
/***/ }),
|
|
77
95
|
|
|
78
|
-
/***/ "./src/scalars/
|
|
96
|
+
/***/ "./src/scalars/AnyObject.ts":
|
|
79
97
|
/*!**********************************!*\
|
|
80
|
-
!*** ./src/scalars/
|
|
98
|
+
!*** ./src/scalars/AnyObject.ts ***!
|
|
81
99
|
\**********************************/
|
|
82
|
-
/***/ ((__unused_webpack_module,
|
|
83
|
-
|
|
100
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
84
101
|
|
|
85
|
-
|
|
86
|
-
|
|
102
|
+
__webpack_require__.r(__webpack_exports__);
|
|
103
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
104
|
+
/* harmony export */ GraphQLAnyObject: () => (/* binding */ GraphQLAnyObject)
|
|
105
|
+
/* harmony export */ });
|
|
106
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphql */ "graphql");
|
|
107
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphql__WEBPACK_IMPORTED_MODULE_0__);
|
|
87
108
|
// add any scalar types
|
|
88
|
-
|
|
109
|
+
|
|
89
110
|
//https://stackoverflow.com/questions/41557536/custom-map-keys-in-graphql-response
|
|
90
|
-
|
|
111
|
+
const GraphQLAnyObject = new graphql__WEBPACK_IMPORTED_MODULE_0__.GraphQLScalarType({
|
|
91
112
|
name: 'AnyObject',
|
|
92
113
|
description: 'Any JSON object. This type bypasses type checking.',
|
|
93
114
|
serialize: value => {
|
|
@@ -97,39 +118,91 @@ exports.GraphQLAnyObject = new graphql_1.GraphQLScalarType({
|
|
|
97
118
|
return value;
|
|
98
119
|
},
|
|
99
120
|
parseLiteral: ast => {
|
|
100
|
-
if (ast.kind !==
|
|
101
|
-
throw new
|
|
121
|
+
if (ast.kind !== graphql__WEBPACK_IMPORTED_MODULE_0__.Kind.OBJECT) {
|
|
122
|
+
throw new graphql__WEBPACK_IMPORTED_MODULE_0__.GraphQLError("Query error: Can only parse object but got a: " + ast.kind, [ast]);
|
|
102
123
|
}
|
|
103
124
|
return ast.fields;
|
|
104
125
|
}
|
|
105
126
|
});
|
|
106
127
|
|
|
107
128
|
|
|
129
|
+
/***/ }),
|
|
130
|
+
|
|
131
|
+
/***/ "./src/scalars/GraphQLTimestamp.ts":
|
|
132
|
+
/*!*****************************************!*\
|
|
133
|
+
!*** ./src/scalars/GraphQLTimestamp.ts ***!
|
|
134
|
+
\*****************************************/
|
|
135
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
136
|
+
|
|
137
|
+
__webpack_require__.r(__webpack_exports__);
|
|
138
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
139
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
140
|
+
/* harmony export */ });
|
|
141
|
+
/* harmony import */ var graphql_language__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphql/language */ "graphql/language");
|
|
142
|
+
/* harmony import */ var graphql_language__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphql_language__WEBPACK_IMPORTED_MODULE_0__);
|
|
143
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! graphql */ "graphql");
|
|
144
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphql__WEBPACK_IMPORTED_MODULE_1__);
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
// source from https://gist.github.com/langpavel/b30f3d507a47713b0c6e89016e4e9eb7
|
|
148
|
+
function serializeDate(value) {
|
|
149
|
+
if (value instanceof Date) {
|
|
150
|
+
return value.getTime();
|
|
151
|
+
}
|
|
152
|
+
else if (typeof value === 'number') {
|
|
153
|
+
return Math.trunc(value);
|
|
154
|
+
}
|
|
155
|
+
else if (typeof value === 'string') {
|
|
156
|
+
return Date.parse(value);
|
|
157
|
+
}
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
function parseDate(value) {
|
|
161
|
+
if (value === null) {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
try {
|
|
165
|
+
return new Date(value);
|
|
166
|
+
}
|
|
167
|
+
catch (err) {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
function parseDateFromLiteral(ast) {
|
|
172
|
+
if (ast.kind === graphql_language__WEBPACK_IMPORTED_MODULE_0__.Kind.INT) {
|
|
173
|
+
const num = parseInt(ast.value, 10);
|
|
174
|
+
return new Date(num);
|
|
175
|
+
}
|
|
176
|
+
else if (ast.kind === graphql_language__WEBPACK_IMPORTED_MODULE_0__.Kind.STRING) {
|
|
177
|
+
return parseDate(ast.value);
|
|
178
|
+
}
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
const TimestampType = new graphql__WEBPACK_IMPORTED_MODULE_1__.GraphQLScalarType({
|
|
182
|
+
name: 'Timestamp',
|
|
183
|
+
description: 'The javascript `Date` as integer. Type represents date and time ' +
|
|
184
|
+
'as number of milliseconds from start of UNIX epoch.',
|
|
185
|
+
serialize: serializeDate,
|
|
186
|
+
parseValue: parseDate,
|
|
187
|
+
parseLiteral: parseDateFromLiteral,
|
|
188
|
+
});
|
|
189
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TimestampType);
|
|
190
|
+
|
|
191
|
+
|
|
108
192
|
/***/ }),
|
|
109
193
|
|
|
110
194
|
/***/ "./src/scalars/index.ts":
|
|
111
195
|
/*!******************************!*\
|
|
112
196
|
!*** ./src/scalars/index.ts ***!
|
|
113
197
|
\******************************/
|
|
114
|
-
/***/ (
|
|
198
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
115
199
|
|
|
200
|
+
__webpack_require__.r(__webpack_exports__);
|
|
201
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
202
|
+
/* harmony export */ GraphQLAnyObject: () => (/* reexport safe */ _AnyObject__WEBPACK_IMPORTED_MODULE_0__.GraphQLAnyObject)
|
|
203
|
+
/* harmony export */ });
|
|
204
|
+
/* harmony import */ var _AnyObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AnyObject */ "./src/scalars/AnyObject.ts");
|
|
116
205
|
|
|
117
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
118
|
-
if (k2 === undefined) k2 = k;
|
|
119
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
120
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
121
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
122
|
-
}
|
|
123
|
-
Object.defineProperty(o, k2, desc);
|
|
124
|
-
}) : (function(o, m, k, k2) {
|
|
125
|
-
if (k2 === undefined) k2 = k;
|
|
126
|
-
o[k2] = m[k];
|
|
127
|
-
}));
|
|
128
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
129
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
130
|
-
};
|
|
131
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
132
|
-
__exportStar(__webpack_require__(/*! ./anyobject */ "./src/scalars/anyobject.ts"), exports);
|
|
133
206
|
|
|
134
207
|
|
|
135
208
|
/***/ }),
|
|
@@ -138,41 +211,47 @@ __exportStar(__webpack_require__(/*! ./anyobject */ "./src/scalars/anyobject.ts"
|
|
|
138
211
|
/*!******************************************************!*\
|
|
139
212
|
!*** ./src/utils/cache-paginated-queries.factory.ts ***!
|
|
140
213
|
\******************************************************/
|
|
141
|
-
/***/ ((__unused_webpack_module,
|
|
142
|
-
|
|
214
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143
215
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
216
|
+
__webpack_require__.r(__webpack_exports__);
|
|
217
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
218
|
+
/* harmony export */ DEFAULT_LIMIT: () => (/* binding */ DEFAULT_LIMIT),
|
|
219
|
+
/* harmony export */ DEFAULT_SKIP: () => (/* binding */ DEFAULT_SKIP),
|
|
220
|
+
/* harmony export */ cachePaginatedQueriesFactory: () => (/* binding */ cachePaginatedQueriesFactory)
|
|
221
|
+
/* harmony export */ });
|
|
222
|
+
const DEFAULT_SKIP = 0;
|
|
223
|
+
const DEFAULT_LIMIT = 10;
|
|
149
224
|
const cachePaginatedQueriesFactory = (queries) => {
|
|
150
225
|
return queries.reduce((acc, query) => {
|
|
151
226
|
const queryName = typeof query === 'string' ? query : query.name;
|
|
152
227
|
const keyArgs = typeof query === 'string' ? ['criteria', 'sort'] : query.keyArgs;
|
|
153
228
|
const skipKey = typeof query === 'string' ? 'skip' : query.skipKey;
|
|
154
229
|
const limitKey = typeof query === 'string' ? 'limit' : query.limitKey;
|
|
155
|
-
return
|
|
230
|
+
return {
|
|
231
|
+
...acc,
|
|
232
|
+
[queryName]: {
|
|
156
233
|
keyArgs,
|
|
157
234
|
merge(existing, incoming, { args }) {
|
|
158
|
-
const skip =
|
|
159
|
-
const merged =
|
|
160
|
-
incoming
|
|
235
|
+
const skip = args.get(skipKey, DEFAULT_SKIP);
|
|
236
|
+
const merged = existing?.data.length > 0 ? existing.data.slice(0) : [];
|
|
237
|
+
incoming?.data.forEach((curr, index) => {
|
|
161
238
|
merged[skip + index] = curr;
|
|
162
239
|
});
|
|
163
|
-
return
|
|
240
|
+
return { ...incoming, data: merged };
|
|
164
241
|
},
|
|
165
242
|
read(existing, { args }) {
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
243
|
+
const skip = args.get(skipKey, DEFAULT_SKIP);
|
|
244
|
+
const limit = args.get(limitKey, DEFAULT_LIMIT);
|
|
245
|
+
const data = existing?.data && existing?.data?.slice(skip, skip + limit);
|
|
246
|
+
return {
|
|
247
|
+
...existing,
|
|
248
|
+
data,
|
|
249
|
+
};
|
|
171
250
|
},
|
|
172
|
-
}
|
|
251
|
+
}
|
|
252
|
+
};
|
|
173
253
|
}, {});
|
|
174
254
|
};
|
|
175
|
-
exports.cachePaginatedQueriesFactory = cachePaginatedQueriesFactory;
|
|
176
255
|
|
|
177
256
|
|
|
178
257
|
/***/ }),
|
|
@@ -181,13 +260,14 @@ exports.cachePaginatedQueriesFactory = cachePaginatedQueriesFactory;
|
|
|
181
260
|
/*!****************************!*\
|
|
182
261
|
!*** ./src/utils/index.ts ***!
|
|
183
262
|
\****************************/
|
|
184
|
-
/***/ ((__unused_webpack_module,
|
|
263
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
185
264
|
|
|
265
|
+
__webpack_require__.r(__webpack_exports__);
|
|
266
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
267
|
+
/* harmony export */ cachePaginatedQueriesFactory: () => (/* reexport safe */ _cache_paginated_queries_factory__WEBPACK_IMPORTED_MODULE_0__.cachePaginatedQueriesFactory)
|
|
268
|
+
/* harmony export */ });
|
|
269
|
+
/* harmony import */ var _cache_paginated_queries_factory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cache-paginated-queries.factory */ "./src/utils/cache-paginated-queries.factory.ts");
|
|
186
270
|
|
|
187
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
188
|
-
exports.cachePaginatedQueriesFactory = void 0;
|
|
189
|
-
var cache_paginated_queries_factory_1 = __webpack_require__(/*! ./cache-paginated-queries.factory */ "./src/utils/cache-paginated-queries.factory.ts");
|
|
190
|
-
Object.defineProperty(exports, "cachePaginatedQueriesFactory", ({ enumerable: true, get: function () { return cache_paginated_queries_factory_1.cachePaginatedQueriesFactory; } }));
|
|
191
271
|
|
|
192
272
|
|
|
193
273
|
/***/ }),
|
|
@@ -202,6 +282,16 @@ module.exports = require("@cdmbase/graphql-type-uri");
|
|
|
202
282
|
|
|
203
283
|
/***/ }),
|
|
204
284
|
|
|
285
|
+
/***/ "@common-stack/server-core":
|
|
286
|
+
/*!********************************************!*\
|
|
287
|
+
!*** external "@common-stack/server-core" ***!
|
|
288
|
+
\********************************************/
|
|
289
|
+
/***/ ((module) => {
|
|
290
|
+
|
|
291
|
+
module.exports = require("@common-stack/server-core");
|
|
292
|
+
|
|
293
|
+
/***/ }),
|
|
294
|
+
|
|
205
295
|
/***/ "graphql":
|
|
206
296
|
/*!**************************!*\
|
|
207
297
|
!*** external "graphql" ***!
|
|
@@ -232,13 +322,13 @@ module.exports = require("graphql-type-json");
|
|
|
232
322
|
|
|
233
323
|
/***/ }),
|
|
234
324
|
|
|
235
|
-
/***/ "
|
|
236
|
-
|
|
237
|
-
!*** external "
|
|
238
|
-
|
|
325
|
+
/***/ "graphql/language":
|
|
326
|
+
/*!***********************************!*\
|
|
327
|
+
!*** external "graphql/language" ***!
|
|
328
|
+
\***********************************/
|
|
239
329
|
/***/ ((module) => {
|
|
240
330
|
|
|
241
|
-
module.exports = require("
|
|
331
|
+
module.exports = require("graphql/language");
|
|
242
332
|
|
|
243
333
|
/***/ })
|
|
244
334
|
|
|
@@ -262,13 +352,25 @@ module.exports = require("lodash");
|
|
|
262
352
|
/******/ };
|
|
263
353
|
/******/
|
|
264
354
|
/******/ // Execute the module function
|
|
265
|
-
/******/ __webpack_modules__[moduleId]
|
|
355
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
266
356
|
/******/
|
|
267
357
|
/******/ // Return the exports of the module
|
|
268
358
|
/******/ return module.exports;
|
|
269
359
|
/******/ }
|
|
270
360
|
/******/
|
|
271
361
|
/************************************************************************/
|
|
362
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
363
|
+
/******/ (() => {
|
|
364
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
365
|
+
/******/ __webpack_require__.n = (module) => {
|
|
366
|
+
/******/ var getter = module && module.__esModule ?
|
|
367
|
+
/******/ () => (module['default']) :
|
|
368
|
+
/******/ () => (module);
|
|
369
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
370
|
+
/******/ return getter;
|
|
371
|
+
/******/ };
|
|
372
|
+
/******/ })();
|
|
373
|
+
/******/
|
|
272
374
|
/******/ /* webpack/runtime/define property getters */
|
|
273
375
|
/******/ (() => {
|
|
274
376
|
/******/ // define getter functions for harmony exports
|
|
@@ -298,13 +400,39 @@ module.exports = require("lodash");
|
|
|
298
400
|
/******/ })();
|
|
299
401
|
/******/
|
|
300
402
|
/************************************************************************/
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
403
|
+
var __webpack_exports__ = {};
|
|
404
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
405
|
+
(() => {
|
|
406
|
+
/*!**********************!*\
|
|
407
|
+
!*** ./src/index.ts ***!
|
|
408
|
+
\**********************/
|
|
409
|
+
__webpack_require__.r(__webpack_exports__);
|
|
410
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
411
|
+
/* harmony export */ GraphQLAnyObject: () => (/* reexport safe */ _scalars__WEBPACK_IMPORTED_MODULE_2__.GraphQLAnyObject),
|
|
412
|
+
/* harmony export */ cachePaginatedQueriesFactory: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_3__.cachePaginatedQueriesFactory),
|
|
413
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
414
|
+
/* harmony export */ resolvers: () => (/* reexport safe */ _api__WEBPACK_IMPORTED_MODULE_1__.resolvers),
|
|
415
|
+
/* harmony export */ rootSchemaDef: () => (/* reexport safe */ _api__WEBPACK_IMPORTED_MODULE_1__.schema)
|
|
416
|
+
/* harmony export */ });
|
|
417
|
+
/* harmony import */ var _common_stack_server_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @common-stack/server-core */ "@common-stack/server-core");
|
|
418
|
+
/* harmony import */ var _common_stack_server_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_common_stack_server_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
419
|
+
/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./api */ "./src/api/index.ts");
|
|
420
|
+
/* harmony import */ var _scalars__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scalars */ "./src/scalars/index.ts");
|
|
421
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (new _common_stack_server_core__WEBPACK_IMPORTED_MODULE_0__.Feature({
|
|
429
|
+
schema: _api__WEBPACK_IMPORTED_MODULE_1__.schema,
|
|
430
|
+
createResolversFunc: _api__WEBPACK_IMPORTED_MODULE_1__.resolverFunc,
|
|
431
|
+
}));
|
|
432
|
+
|
|
433
|
+
})();
|
|
434
|
+
|
|
435
|
+
module.exports = __webpack_exports__;
|
|
308
436
|
/******/ })()
|
|
309
437
|
;
|
|
310
438
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;AAAA,iEAAe,mRAAmR,wBAAwB,4DAA4D,iEAAiE,mIAAmI,8FAA8F,0EAA0E,qDAAqD,qBAAqB,yCAAyC,eAAe,6CAA6C,kBAAkB,uBAAuB,gBAAgB,mFAAmF,mBAAmB,mBAAmB,uBAAuB,mBAAmB,6BAA6B,mBAAmB,+FAA+F,cAAc,qBAAqB,oBAAoB,cAAc,6EAA6E,KAAK;;;;;;;;;;;;;ACAn5C,8FAAmE;AACnE,2FAA6E;AAC7E,6GAAmD;AACnD,kGAAwD;AAE3C,iBAAS,GAAG;IACrB,SAAS,EAAE,4BAAgB;IAC3B,IAAI,EAAE,8BAAW;IACjB,IAAI,EAAE,8BAAW;IACjB,GAAG,EAAE,8BAAU,EAAC,KAAK,CAAC;IACtB,QAAQ,EAAE,8BAAU,EAAC,UAAU,CAAC;IAChC,QAAQ,EAAE,kCAAe;IACzB,IAAI,EAAE,2BAAW;IACjB,UAAU,EAAE,qCAAiB;CAChC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdF,uHAAuD;AAG9C,wBAHF,8BAAa,CAGE;AADtB,0FAA+B;AAE/B,sFAA0B;AAC1B,kFAAwB;;;;;;;;;;;;;;ACLxB,uBAAuB;AACvB,gEAAgE;AAEhE,kFAAkF;AACrE,wBAAgB,GAAG,IAAI,2BAAiB,CAAC;IACpD,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,oDAAoD;IACjE,SAAS,EAAE,KAAK,CAAC,EAAE;QACjB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,UAAU,EAAE,KAAK,CAAC,EAAE;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,YA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WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;UENA;UACA;UACA;UACA","sources":["webpack://@common-stack/graphql-api/./src/api/root-schema.graphqls","webpack://@common-stack/graphql-api/./src/api/resolver.ts","webpack://@common-stack/graphql-api/./src/index.ts","webpack://@common-stack/graphql-api/./src/scalars/anyobject.ts","webpack://@common-stack/graphql-api/./src/scalars/index.ts","webpack://@common-stack/graphql-api/./src/utils/cache-paginated-queries.factory.ts","webpack://@common-stack/graphql-api/./src/utils/index.ts","webpack://@common-stack/graphql-api/external commonjs \"@cdmbase/graphql-type-uri\"","webpack://@common-stack/graphql-api/external commonjs \"graphql\"","webpack://@common-stack/graphql-api/external commonjs \"graphql-iso-date\"","webpack://@common-stack/graphql-api/external commonjs \"graphql-type-json\"","webpack://@common-stack/graphql-api/external commonjs \"lodash\"","webpack://@common-stack/graphql-api/webpack/bootstrap","webpack://@common-stack/graphql-api/webpack/runtime/define property getters","webpack://@common-stack/graphql-api/webpack/runtime/hasOwnProperty shorthand","webpack://@common-stack/graphql-api/webpack/runtime/make namespace object","webpack://@common-stack/graphql-api/webpack/before-startup","webpack://@common-stack/graphql-api/webpack/startup","webpack://@common-stack/graphql-api/webpack/after-startup"],"sourcesContent":["export default \"scalar AnyObject\\nscalar Date\\nscalar Time\\nscalar DateTime\\nscalar URI\\nscalar URIInput\\nscalar Observable\\n\\nscalar JSON\\nscalar JSONObject\\n\\ndirective @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE\\nenum CacheControlScope {\\n PUBLIC\\n PRIVATE\\n}\\n\\n\\\"\\\"\\\"\\n An object with an ID.\\n\\\"\\\"\\\"\\ninterface Node {\\n \\\"\\\"\\\"\\n The ID of the node.\\n \\\"\\\"\\\"\\n id: ID!\\n}\\n\\n# Pagination information. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.\\ntype PageInfo {\\n # Whether there is a next page of nodes in the connection.\\n hasNextPage: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\n Represents a null return value.\\n\\\"\\\"\\\"\\ntype EmptyResponse {\\n # A dummy null value.\\n alwaysNil: String\\n}\\n\\ntype FieldError {\\n field: String!\\n message: String!\\n}\\n\\ninput Sort{\\n key: String!,\\n value: SortEnum!,\\n}\\n\\nenum SortEnum{\\n ASC,\\n DESC\\n}\\n\\ntype Query {\\n \\\"\\\"\\\"\\n Looks up a node by ID.\\n \\\"\\\"\\\"\\n node(id: ID!): Node\\n\\n}\\n\\ntype Mutation {\\n dummy: Int\\n}\\n\\ntype Subscription {\\n dummy: Int\\n}\\n\\n\\ntype AdminIdeSettings {\\n dummy: Int\\n}\\n\\n\\\"\\\"\\\" All Moleculer Topic names are extended from this.\\\"\\\"\\\"\\nenum MoleculerServiceName {\\n dummy\\n}\\n\\n#interface Node {\\n# id: ID!\\n#}\\n\\n\\nschema {\\n query: Query\\n mutation: Mutation\\n subscription: Subscription\\n}\\n\\n\";","import GraphQLJSON, { GraphQLJSONObject } from 'graphql-type-json';\nimport { GraphQLDate, GraphQLTime, GraphQLDateTime } from 'graphql-iso-date';\nimport GraphQLURI from '@cdmbase/graphql-type-uri';\nimport { GraphQLAnyObject } from '../scalars/anyobject';\n\nexport const resolvers = {\n AnyObject: GraphQLAnyObject,\n Date: GraphQLDate,\n Time: GraphQLTime,\n URI: GraphQLURI('URI'),\n URIInput: GraphQLURI('URIInput'),\n DateTime: GraphQLDateTime,\n JSON: GraphQLJSON,\n JSONObject: GraphQLJSONObject,\n};\n","import rootSchemaDef from './api/root-schema.graphqls';\n\nexport * from './api/resolver';\nexport { rootSchemaDef };\nexport * from './scalars';\nexport * from './utils';\n","// add any scalar types\nimport { GraphQLError, GraphQLScalarType, Kind } from 'graphql';\n\n//https://stackoverflow.com/questions/41557536/custom-map-keys-in-graphql-response\nexport const GraphQLAnyObject = new GraphQLScalarType({\n name: 'AnyObject',\n description: 'Any JSON object. This type bypasses type checking.',\n serialize: value => {\n return value;\n },\n parseValue: value => {\n return value;\n },\n parseLiteral: ast => {\n if (ast.kind !== Kind.OBJECT) {\n throw new GraphQLError(\"Query error: Can only parse object but got a: \" + ast.kind, [ast]);\n }\n return ast.fields;\n }\n});\n\n","export * from './anyobject';\n","import { get } from 'lodash';\nimport { TypePolicies } from '@apollo/client';\n\ninterface QueryOptionsInterface {\n name: string,\n keyArgs?: (string[] | string)[]\n skipKey?: string,\n limitKey?: string,\n}\n\n\nexport const DEFAULT_SKIP = 0;\nexport const DEFAULT_LIMIT = 10;\n\nexport const cachePaginatedQueriesFactory = (queries: (string | QueryOptionsInterface)[]): TypePolicies => {\n return queries.reduce((acc, query) => {\n const queryName = typeof query === 'string' ? query : query.name;\n const keyArgs = typeof query === 'string' ? ['criteria', 'sort'] : query.keyArgs;\n const skipKey = typeof query === 'string' ? 'skip' : query.skipKey;\n const limitKey = typeof query === 'string' ? 'limit' : query.limitKey;\n return {\n ...acc,\n [queryName]: {\n keyArgs,\n merge(existing, incoming, { args }) {\n const skip = get(args, skipKey) || DEFAULT_SKIP;\n const merged = existing?.data.length > 0 ? existing.data.slice(0) : [];\n incoming?.data.forEach((curr, index) => {\n merged[skip + index] = curr;\n },)\n return { ...incoming, data: merged };\n },\n read(existing, { args }) {\n const skip = get(args, skipKey) || DEFAULT_SKIP;\n const limit = get(args, limitKey) || DEFAULT_LIMIT;\n const data = existing?.data && existing?.data?.slice(skip, skip + limit);\n return {\n ...existing,\n data,\n }\n },\n }\n }\n }, {})\n}\n","export { cachePaginatedQueriesFactory } from './cache-paginated-queries.factory';\n","module.exports = require(\"@cdmbase/graphql-type-uri\");","module.exports = require(\"graphql\");","module.exports = require(\"graphql-iso-date\");","module.exports = require(\"graphql-type-json\");","module.exports = require(\"lodash\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/index.ts\");\n",""],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;AAAA,iEAAe,mSAAmS,wBAAwB,8DAA8D,iEAAiE,mIAAmI,8FAA8F,0EAA0E,qDAAqD,qBAAqB,yCAAyC,eAAe,6CAA6C,kBAAkB,uBAAuB,gBAAgB,mFAAmF,mBAAmB,mBAAmB,uBAAuB,mBAAmB,6BAA6B,mBAAmB,+FAA+F,cAAc,qBAAqB,oBAAoB,cAAc,6EAA6E,KAAK;;;;;;;;;;;;;;;ACAr3C;AAEzC,MAAM,MAAM,GAAG,CAAC,6DAAU,CAAC,CAAC;;;;;;;;;;;;;;;;;;;ACFT;AACE;;;;;;;;;;;;;;;;;;;;;;;;ACDuC;AACU;A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AK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;oBAChD,MAAM,IAAI,GAAG,QAAQ,EAAE,IAAI,IAAI,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC;oBACzE,OAAO;wBACH,GAAG,QAAQ;wBACX,IAAI;qBACP;gBACL,CAAC;aACJ;SACJ;IACL,CAAC,EAAE,EAAE,CAAC;AACV,CAAC;;;;;;;;;;;;;;;;AC3CgF;;;;;;;;;;;ACAjF;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;ACNoD;AACI;AAEnC;AACc;AACT;AACF;AAGxB,iEAAe,IAAI,8DAAO,CAAC;IACvB,MAAM;IACN,mBAAmB,EAAE,8CAAY;CACpC,CAAC","sources":["webpack://@common-stack/graphql-api/./src/api/graphql/root-schema.graphqls","webpack://@common-stack/graphql-api/./src/api/graphql/index.ts","webpack://@common-stack/graphql-api/./src/api/index.ts","webpack://@common-stack/graphql-api/./src/api/resolvers.ts","webpack://@common-stack/graphql-api/./src/scalars/AnyObject.ts","webpack://@common-stack/graphql-api/./src/scalars/GraphQLTimestamp.ts","webpack://@common-stack/graphql-api/./src/scalars/index.ts","webpack://@common-stack/graphql-api/./src/utils/cache-paginated-queries.factory.ts","webpack://@common-stack/graphql-api/./src/utils/index.ts","webpack://@common-stack/graphql-api/external commonjs \"@cdmbase/graphql-type-uri\"","webpack://@common-stack/graphql-api/external commonjs \"@common-stack/server-core\"","webpack://@common-stack/graphql-api/external commonjs \"graphql\"","webpack://@common-stack/graphql-api/external commonjs \"graphql-iso-date\"","webpack://@common-stack/graphql-api/external commonjs \"graphql-type-json\"","webpack://@common-stack/graphql-api/external commonjs \"graphql/language\"","webpack://@common-stack/graphql-api/webpack/bootstrap","webpack://@common-stack/graphql-api/webpack/runtime/compat get default export","webpack://@common-stack/graphql-api/webpack/runtime/define property getters","webpack://@common-stack/graphql-api/webpack/runtime/hasOwnProperty shorthand","webpack://@common-stack/graphql-api/webpack/runtime/make namespace object","webpack://@common-stack/graphql-api/./src/index.ts"],"sourcesContent":["export default \"scalar AnyObject\\nscalar Date\\nscalar Time\\nscalar DateTime\\nscalar Timestamp\\nscalar URI\\nscalar URIInput\\nscalar Observable\\nscalar JSON\\nscalar JSONObject\\n\\ndirective @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE\\nenum CacheControlScope {\\n PUBLIC\\n PRIVATE\\n}\\n\\n\\n\\\"\\\"\\\"\\n An object with an ID.\\n\\\"\\\"\\\"\\ninterface Node {\\n \\\"\\\"\\\"\\n The ID of the node.\\n \\\"\\\"\\\"\\n id: ID!\\n}\\n\\n# Pagination information. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.\\ntype PageInfo {\\n # Whether there is a next page of nodes in the connection.\\n hasNextPage: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\n Represents a null return value.\\n\\\"\\\"\\\"\\ntype EmptyResponse {\\n # A dummy null value.\\n alwaysNil: String\\n}\\n\\ntype FieldError {\\n field: String!\\n message: String!\\n}\\n\\ninput Sort{\\n key: String!,\\n value: SortEnum!,\\n}\\n\\nenum SortEnum{\\n ASC,\\n DESC\\n}\\n\\ntype Query {\\n \\\"\\\"\\\"\\n Looks up a node by ID.\\n \\\"\\\"\\\"\\n node(id: ID!): Node\\n\\n}\\n\\ntype Mutation {\\n dummy: Int\\n}\\n\\ntype Subscription {\\n dummy: Int\\n}\\n\\n\\ntype AdminIdeSettings {\\n dummy: Int\\n}\\n\\n\\\"\\\"\\\" All Moleculer Topic names are extended from this.\\\"\\\"\\\"\\nenum MoleculerServiceName {\\n dummy\\n}\\n\\n#interface Node {\\n# id: ID!\\n#}\\n\\n\\nschema {\\n query: Query\\n mutation: Mutation\\n subscription: Subscription\\n}\\n\\n\";","import rootSchema from './root-schema.graphqls';\n\nexport const schema = [rootSchema];\n","export * from './graphql';\nexport * from './resolvers';\n","import GraphQLJSON, { GraphQLJSONObject } from 'graphql-type-json';\nimport { GraphQLDate, GraphQLTime, GraphQLDateTime } from 'graphql-iso-date';\nimport GraphQLURI from '@cdmbase/graphql-type-uri';\nimport GraphqlTimestamp from '../scalars/GraphQLTimestamp';\nimport { GraphQLAnyObject } from '../scalars/AnyObject';\n\nexport const resolvers = {\n AnyObject: GraphQLAnyObject,\n Date: GraphQLDate,\n Time: GraphQLTime,\n Timestamp: GraphqlTimestamp,\n URI: GraphQLURI('URI'),\n URIInput: GraphQLURI('URIInput'),\n DateTime: GraphQLDateTime,\n JSON: GraphQLJSON,\n JSONObject: GraphQLJSONObject,\n};\n\nexport const resolverFunc = (options) => resolvers;","// add any scalar types\nimport { GraphQLError, GraphQLScalarType, Kind } from 'graphql';\n\n//https://stackoverflow.com/questions/41557536/custom-map-keys-in-graphql-response\nexport const GraphQLAnyObject = new GraphQLScalarType({\n name: 'AnyObject',\n description: 'Any JSON object. This type bypasses type checking.',\n serialize: value => {\n return value;\n },\n parseValue: value => {\n return value;\n },\n parseLiteral: ast => {\n if (ast.kind !== Kind.OBJECT) {\n throw new GraphQLError(\"Query error: Can only parse object but got a: \" + ast.kind, [ast]);\n }\n return ast.fields;\n }\n});\n\n","import { Kind } from 'graphql/language';\nimport { GraphQLScalarType } from 'graphql';\n\n\n// source from https://gist.github.com/langpavel/b30f3d507a47713b0c6e89016e4e9eb7\nfunction serializeDate(value) {\n if (value instanceof Date) {\n return value.getTime();\n } else if (typeof value === 'number') {\n return Math.trunc(value);\n } else if (typeof value === 'string') {\n return Date.parse(value);\n }\n return null;\n}\n\nfunction parseDate(value) {\n if (value === null) {\n return null;\n }\n\n try {\n return new Date(value);\n } catch (err) {\n return null;\n }\n}\n\nfunction parseDateFromLiteral(ast) {\n if (ast.kind === Kind.INT) {\n const num = parseInt(ast.value, 10);\n return new Date(num);\n } else if (ast.kind === Kind.STRING) {\n return parseDate(ast.value);\n }\n return null;\n}\n\nconst TimestampType = new GraphQLScalarType({\n name: 'Timestamp',\n description:\n 'The javascript `Date` as integer. Type represents date and time ' +\n 'as number of milliseconds from start of UNIX epoch.',\n serialize: serializeDate,\n parseValue: parseDate,\n parseLiteral: parseDateFromLiteral,\n});\n\nexport default TimestampType;","export * from './AnyObject';\n","import { TypePolicies } from '@apollo/client';\n\ninterface QueryOptionsInterface {\n name: string,\n keyArgs?: (string[] | string)[]\n skipKey?: string,\n limitKey?: string,\n}\n\n\nexport const DEFAULT_SKIP = 0;\nexport const DEFAULT_LIMIT = 10;\n\nexport const cachePaginatedQueriesFactory = (queries: (string | QueryOptionsInterface)[]): TypePolicies => {\n return queries.reduce((acc, query) => {\n const queryName = typeof query === 'string' ? query : query.name;\n const keyArgs = typeof query === 'string' ? ['criteria', 'sort'] : query.keyArgs;\n const skipKey = typeof query === 'string' ? 'skip' : query.skipKey;\n const limitKey = typeof query === 'string' ? 'limit' : query.limitKey;\n return {\n ...acc,\n [queryName]: {\n keyArgs,\n merge(existing, incoming, { args }) {\n const skip = args.get(skipKey, DEFAULT_SKIP);\n const merged = existing?.data.length > 0 ? existing.data.slice(0) : [];\n incoming?.data.forEach((curr, index) => {\n merged[skip + index] = curr;\n },)\n return { ...incoming, data: merged };\n },\n read(existing, { args }) {\n const skip = args.get(skipKey, DEFAULT_SKIP);\n const limit = args.get(limitKey, DEFAULT_LIMIT);\n const data = existing?.data && existing?.data?.slice(skip, skip + limit);\n return {\n ...existing,\n data,\n }\n },\n }\n }\n }, {})\n}\n","export { cachePaginatedQueriesFactory } from './cache-paginated-queries.factory';\n","module.exports = require(\"@cdmbase/graphql-type-uri\");","module.exports = require(\"@common-stack/server-core\");","module.exports = require(\"graphql\");","module.exports = require(\"graphql-iso-date\");","module.exports = require(\"graphql-type-json\");","module.exports = require(\"graphql/language\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Feature } from '@common-stack/server-core';\nimport { schema, resolvers, resolverFunc } from './api';\n\nexport { resolvers };\nexport { schema as rootSchemaDef };\nexport * from './scalars';\nexport * from './utils';\n\n\nexport default new Feature({\n schema,\n createResolversFunc: resolverFunc,\n})"],"names":[],"sourceRoot":""}
|
package/lib/scalars/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './AnyObject';
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@common-stack/graphql-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1-alpha.0",
|
|
4
4
|
"description": "graphql api for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
|
+
"module": "lib/index.js",
|
|
8
9
|
"typings": "lib/index.d.ts",
|
|
9
10
|
"scripts": {
|
|
10
11
|
"build": "yarn build:clean && yarn build:lib",
|
|
@@ -18,25 +19,6 @@
|
|
|
18
19
|
"test:watch": "npm test -- --watch",
|
|
19
20
|
"watch": "yarn build:lib:watch"
|
|
20
21
|
},
|
|
21
|
-
"jest": {
|
|
22
|
-
"moduleFileExtensions": [
|
|
23
|
-
"ts",
|
|
24
|
-
"tsx",
|
|
25
|
-
"js",
|
|
26
|
-
"json"
|
|
27
|
-
],
|
|
28
|
-
"modulePaths": [
|
|
29
|
-
"node_modules"
|
|
30
|
-
],
|
|
31
|
-
"roots": [
|
|
32
|
-
"src"
|
|
33
|
-
],
|
|
34
|
-
"testEnvironment": "node",
|
|
35
|
-
"testRegex": "/__tests__/.*test*\\.(ts|tsx|js)$",
|
|
36
|
-
"transform": {
|
|
37
|
-
"\\.(ts|tsx)$": "<rootDir>/../../node_modules/ts-jest/preprocessor.js"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
22
|
"dependencies": {
|
|
41
23
|
"@cdmbase/graphql-type-uri": "^2.0.0",
|
|
42
24
|
"@vscode-alt/monaco-editor": "^0.21.2",
|
|
@@ -45,12 +27,13 @@
|
|
|
45
27
|
},
|
|
46
28
|
"peerDependencies": {
|
|
47
29
|
"@cdm-logger/core": ">=7.0.12",
|
|
30
|
+
"@common-stack/server-core": "*",
|
|
48
31
|
"lodash": "^4.17.21"
|
|
49
32
|
},
|
|
50
33
|
"publishConfig": {
|
|
51
34
|
"access": "public"
|
|
52
35
|
},
|
|
53
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "e23d595c58eedb3ecda0913cf206f54d8a9e470f",
|
|
54
37
|
"typescript": {
|
|
55
38
|
"definition": "lib/index.d.ts"
|
|
56
39
|
}
|
package/lib/api/resolver.d.ts
DELETED
|
File without changes
|