@deepdub/graphql-codegen-transformer
Advanced tools
@@ -168,3 +168,3 @@ "use strict"; | ||
| this.objectDefinitions.forEach(({ objectDefinition, objectArguments }) => { | ||
| var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r; | ||
| var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; | ||
| const name = objectDefinition.name.value; | ||
@@ -228,22 +228,22 @@ const isSubscribe = !!((_b = (_a = objectArguments === null || objectArguments === void 0 ? void 0 : objectArguments.find((arg) => arg.name.value === 'subscribe')) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value); | ||
| objectPropertiesObj[name][field.name.value] = type; | ||
| const indexDirective = (_p = field.directives) === null || _p === void 0 ? void 0 : _p.find((directive) => directive.name.value === 'index'); | ||
| if (!indexDirective) { | ||
| continue; | ||
| } | ||
| const queryField = (_r = (_q = indexDirective.arguments) === null || _q === void 0 ? void 0 : _q.find((arg) => arg.name.value === 'queryField')) === null || _r === void 0 ? void 0 : _r.value; | ||
| if (!queryField || queryField.kind !== 'StringValue') { | ||
| continue; | ||
| } | ||
| if (endpoints && !endpoints.includes(queryField.value)) { | ||
| continue; | ||
| } | ||
| api += populatePlaceholders(templates.endpointsListQueryDefinition, { | ||
| ObjectName: name, | ||
| ObjectNamePlural: (0, utils_1.pluralize)(name), | ||
| QueryField: queryField.value, | ||
| QueriesModule: isCustomQuery ? 'customQueries' : 'queries', | ||
| IsSubscribe: String(isSubscribe), | ||
| SubscribeBy: subscribeBy ? `'${subscribeBy}'` : 'undefined', | ||
| const indexDirectives = (_p = field.directives) === null || _p === void 0 ? void 0 : _p.filter((directive) => directive.name.value === 'index'); | ||
| indexDirectives === null || indexDirectives === void 0 ? void 0 : indexDirectives.forEach((indexDirective) => { | ||
| var _a, _b; | ||
| const queryField = (_b = (_a = indexDirective.arguments) === null || _a === void 0 ? void 0 : _a.find((arg) => arg.name.value === 'queryField')) === null || _b === void 0 ? void 0 : _b.value; | ||
| if (!queryField || queryField.kind !== 'StringValue') { | ||
| return; | ||
| } | ||
| if (endpoints && !endpoints.includes(queryField.value)) { | ||
| return; | ||
| } | ||
| api += populatePlaceholders(templates.endpointsListQueryDefinition, { | ||
| ObjectName: name, | ||
| ObjectNamePlural: (0, utils_1.pluralize)(name), | ||
| QueryField: queryField.value, | ||
| QueriesModule: isCustomQuery ? 'customQueries' : 'queries', | ||
| IsSubscribe: String(isSubscribe), | ||
| SubscribeBy: subscribeBy ? `'${subscribeBy}'` : 'undefined', | ||
| }); | ||
| exportedHooks.push(`use${(0, change_case_1.pascalCase)(queryField.value)}Query`); | ||
| }); | ||
| exportedHooks.push(`use${(0, change_case_1.pascalCase)(queryField.value)}Query`); | ||
| } | ||
@@ -250,0 +250,0 @@ objectPropertiesObj[name].createdAt = 'Date'; |
+1
-1
| { | ||
| "name": "@deepdub/graphql-codegen-transformer", | ||
| "//": "When fully deploying the GQL v2 upgrade, make sure I remove this beta version and re-publish this without the beta tag.", | ||
| "version": "2.0.8", | ||
| "version": "2.0.9", | ||
| "description": "Deepdub @codegen transformer", | ||
@@ -6,0 +6,0 @@ "author": "deepdub.ai", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
103886
0.19%