@aws-amplify/graphql-transformer-core
Advanced tools
Comparing version 2.4.5 to 2.5.0-implicit-fields.0
12
API.md
@@ -203,2 +203,8 @@ ## API Report File for "@aws-amplify/graphql-transformer-core" | ||
// @public (undocumented) | ||
export const getConditionInputName: (modelName: string) => string; | ||
// @public (undocumented) | ||
export const getConnectionName: (modelName: string) => string; | ||
// @public (undocumented) | ||
export const getDefaultStrategyNameForDbType: (dbType: ModelDataSourceStrategySqlDbType) => string; | ||
@@ -212,2 +218,5 @@ | ||
// @public (undocumented) | ||
export const getFilterInputName: (modelName: string) => string; | ||
// @public (undocumented) | ||
export const getImportedRDSTypeFromStrategyDbType: (dbType: ModelDataSourceStrategyDbType) => ImportedRDSType; | ||
@@ -249,2 +258,5 @@ | ||
// @public (undocumented) | ||
export const getSubscriptionFilterInputName: (modelName: string) => string; | ||
// @public (undocumented) | ||
function getSyncConfig(ctx: TransformerTransformSchemaStepContextProvider, typeName: string): SyncConfig | undefined; | ||
@@ -251,0 +263,0 @@ |
@@ -5,3 +5,3 @@ export { constructDataSourceStrategies, constructSqlDirectiveDataSourceStrategies, getModelTypeNames, GraphQLTransform, GraphQLTransformOptions, SyncUtils, } from './transformation'; | ||
export { ConflictDetectionType, ConflictHandlerType, ResolverConfig, SyncConfig, SyncConfigOptimistic, SyncConfigServer, SyncConfigLambda, TransformConfig, } from './config/index'; | ||
export { APICategory, collectDirectives, collectDirectivesByTypeNames, DirectiveWrapper, fieldsWithSqlDirective, generateGetArgumentsInput, GetArgumentsOptions, getModelDataSourceNameForTypeName, getDefaultStrategyNameForDbType, getImportedRDSTypeFromStrategyDbType, getKeySchema, getModelDataSourceStrategy, getParameterStoreSecretPath, getPrimaryKeyFields, getResourceName, getResourceNamesForStrategy, getResourceNamesForStrategyName, getSortKeyFieldNames, getStrategyDbTypeFromTypeNode, getTable, isAmplifyDynamoDbModelDataSourceStrategy, isBuiltInGraphqlNode, isDefaultDynamoDbModelDataSourceStrategy, isDynamoDbModel, isDynamoDbType, isModelType, isMutationNode, isObjectTypeDefinitionNode, isQueryNode, isSqlDbType, isSqlModel, isSqlStrategy, normalizeDbType, setResourceName, SQLLambdaResourceNames, } from './utils'; | ||
export { APICategory, collectDirectives, collectDirectivesByTypeNames, DirectiveWrapper, fieldsWithSqlDirective, generateGetArgumentsInput, GetArgumentsOptions, getModelDataSourceNameForTypeName, getDefaultStrategyNameForDbType, getImportedRDSTypeFromStrategyDbType, getKeySchema, getModelDataSourceStrategy, getParameterStoreSecretPath, getPrimaryKeyFields, getResourceName, getResourceNamesForStrategy, getResourceNamesForStrategyName, getSortKeyFieldNames, getStrategyDbTypeFromTypeNode, getTable, isAmplifyDynamoDbModelDataSourceStrategy, isBuiltInGraphqlNode, isDefaultDynamoDbModelDataSourceStrategy, isDynamoDbModel, isDynamoDbType, isModelType, isMutationNode, isObjectTypeDefinitionNode, isQueryNode, isSqlDbType, isSqlModel, isSqlStrategy, normalizeDbType, setResourceName, SQLLambdaResourceNames, getFilterInputName, getConditionInputName, getSubscriptionFilterInputName, getConnectionName, } from './utils'; | ||
export type { SetResourceNameProps } from './utils'; | ||
@@ -8,0 +8,0 @@ export * from './utils/operation-names'; |
@@ -17,4 +17,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ImportedRDSType = exports.DDB_DEFAULT_DATASOURCE_STRATEGY = exports.DDB_DB_TYPE = exports.DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY = exports.StackManager = exports.TransformerResolver = exports.TransformerAuthBase = exports.TransformerPluginBase = exports.TransformerModelEnhancerBase = exports.TransformerModelBase = exports.setResourceName = exports.normalizeDbType = exports.isSqlStrategy = exports.isSqlModel = exports.isSqlDbType = exports.isQueryNode = exports.isObjectTypeDefinitionNode = exports.isMutationNode = exports.isModelType = exports.isDynamoDbType = exports.isDynamoDbModel = exports.isDefaultDynamoDbModelDataSourceStrategy = exports.isBuiltInGraphqlNode = exports.isAmplifyDynamoDbModelDataSourceStrategy = exports.getTable = exports.getStrategyDbTypeFromTypeNode = exports.getSortKeyFieldNames = exports.getResourceNamesForStrategyName = exports.getResourceNamesForStrategy = exports.getResourceName = exports.getPrimaryKeyFields = exports.getParameterStoreSecretPath = exports.getModelDataSourceStrategy = exports.getKeySchema = exports.getImportedRDSTypeFromStrategyDbType = exports.getDefaultStrategyNameForDbType = exports.getModelDataSourceNameForTypeName = exports.generateGetArgumentsInput = exports.fieldsWithSqlDirective = exports.DirectiveWrapper = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.APICategory = exports.ConflictHandlerType = exports.validateModelSchema = exports.SyncUtils = exports.GraphQLTransform = exports.getModelTypeNames = exports.constructSqlDirectiveDataSourceStrategies = exports.constructDataSourceStrategies = void 0; | ||
exports.ObjectDefinitionWrapper = exports.InputObjectDefinitionWrapper = exports.InputFieldWrapper = exports.FieldWrapper = exports.EnumWrapper = exports.MappingTemplate = exports.getAppSyncServiceExtraDirectives = exports.SQL_SCHEMA_FILE_NAME = exports.POSTGRES_DB_TYPE = exports.MYSQL_DB_TYPE = void 0; | ||
exports.StackManager = exports.TransformerResolver = exports.TransformerAuthBase = exports.TransformerPluginBase = exports.TransformerModelEnhancerBase = exports.TransformerModelBase = exports.getConnectionName = exports.getSubscriptionFilterInputName = exports.getConditionInputName = exports.getFilterInputName = exports.setResourceName = exports.normalizeDbType = exports.isSqlStrategy = exports.isSqlModel = exports.isSqlDbType = exports.isQueryNode = exports.isObjectTypeDefinitionNode = exports.isMutationNode = exports.isModelType = exports.isDynamoDbType = exports.isDynamoDbModel = exports.isDefaultDynamoDbModelDataSourceStrategy = exports.isBuiltInGraphqlNode = exports.isAmplifyDynamoDbModelDataSourceStrategy = exports.getTable = exports.getStrategyDbTypeFromTypeNode = exports.getSortKeyFieldNames = exports.getResourceNamesForStrategyName = exports.getResourceNamesForStrategy = exports.getResourceName = exports.getPrimaryKeyFields = exports.getParameterStoreSecretPath = exports.getModelDataSourceStrategy = exports.getKeySchema = exports.getImportedRDSTypeFromStrategyDbType = exports.getDefaultStrategyNameForDbType = exports.getModelDataSourceNameForTypeName = exports.generateGetArgumentsInput = exports.fieldsWithSqlDirective = exports.DirectiveWrapper = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.APICategory = exports.ConflictHandlerType = exports.validateModelSchema = exports.SyncUtils = exports.GraphQLTransform = exports.getModelTypeNames = exports.constructSqlDirectiveDataSourceStrategies = exports.constructDataSourceStrategies = void 0; | ||
exports.ObjectDefinitionWrapper = exports.InputObjectDefinitionWrapper = exports.InputFieldWrapper = exports.FieldWrapper = exports.EnumWrapper = exports.MappingTemplate = exports.getAppSyncServiceExtraDirectives = exports.SQL_SCHEMA_FILE_NAME = exports.POSTGRES_DB_TYPE = exports.MYSQL_DB_TYPE = exports.ImportedRDSType = exports.DDB_DEFAULT_DATASOURCE_STRATEGY = exports.DDB_DB_TYPE = exports.DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY = void 0; | ||
const graphql_1 = require("graphql"); | ||
@@ -66,2 +66,6 @@ const validation_1 = require("./transformation/validation"); | ||
Object.defineProperty(exports, "setResourceName", { enumerable: true, get: function () { return utils_1.setResourceName; } }); | ||
Object.defineProperty(exports, "getFilterInputName", { enumerable: true, get: function () { return utils_1.getFilterInputName; } }); | ||
Object.defineProperty(exports, "getConditionInputName", { enumerable: true, get: function () { return utils_1.getConditionInputName; } }); | ||
Object.defineProperty(exports, "getSubscriptionFilterInputName", { enumerable: true, get: function () { return utils_1.getSubscriptionFilterInputName; } }); | ||
Object.defineProperty(exports, "getConnectionName", { enumerable: true, get: function () { return utils_1.getConnectionName; } }); | ||
__exportStar(require("./utils/operation-names"), exports); | ||
@@ -68,0 +72,0 @@ __exportStar(require("./errors"), exports); |
@@ -43,2 +43,4 @@ import { DocumentNode, EnumTypeDefinitionNode, EnumTypeExtensionNode, FieldDefinitionNode, InputObjectTypeDefinitionNode, InputObjectTypeExtensionNode, InterfaceTypeExtensionNode, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, OperationTypeDefinitionNode, SchemaDefinitionNode, TypeDefinitionNode, TypeSystemDefinitionNode, UnionTypeDefinitionNode, UnionTypeExtensionNode } from 'graphql'; | ||
addInput(inp: InputObjectTypeDefinitionNode): void; | ||
updateInput(obj: InputObjectTypeDefinitionNode): void; | ||
getInput(name: string): InputObjectTypeDefinitionNode | undefined; | ||
addEnum(en: EnumTypeDefinitionNode): void; | ||
@@ -45,0 +47,0 @@ buildSchema(): string; |
@@ -423,2 +423,16 @@ "use strict"; | ||
} | ||
updateInput(obj) { | ||
if (!this.nodeMap[obj.name.value]) { | ||
throw new Error(`Type ${obj.name.value} does not exist.`); | ||
} | ||
this.nodeMap[obj.name.value] = obj; | ||
} | ||
getInput(name) { | ||
if (this.nodeMap[name]) { | ||
const node = this.nodeMap[name]; | ||
if (node.kind === graphql_1.Kind.INPUT_OBJECT_TYPE_DEFINITION) { | ||
return node; | ||
} | ||
} | ||
} | ||
addEnum(en) { | ||
@@ -425,0 +439,0 @@ if (this.nodeMap[en.name.value]) { |
@@ -1,2 +0,2 @@ | ||
export { getPrimaryKeyFields } from './model-util'; | ||
export { getPrimaryKeyFields, getFilterInputName, getConditionInputName, getSubscriptionFilterInputName, getConnectionName, } from './model-util'; | ||
export { DirectiveWrapper, GetArgumentsOptions, generateGetArgumentsInput } from './directive-wrapper'; | ||
@@ -3,0 +3,0 @@ export { collectDirectives, collectDirectivesByTypeNames } from './type-map-utils'; |
@@ -17,5 +17,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getResourceNamesForStrategyName = exports.getResourceNamesForStrategy = exports.getResourceName = exports.getDefaultStrategyNameForDbType = exports.setResourceName = exports.APICategory = exports.getParameterStoreSecretPath = exports.DEFAULT_SCHEMA_DEFINITION = exports.getStrategyDbTypeFromTypeNode = exports.getSortKeyFieldNames = exports.getKeySchema = exports.getTable = exports.stripDirectives = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.generateGetArgumentsInput = exports.DirectiveWrapper = exports.getPrimaryKeyFields = void 0; | ||
exports.getResourceNamesForStrategyName = exports.getResourceNamesForStrategy = exports.getResourceName = exports.getDefaultStrategyNameForDbType = exports.setResourceName = exports.APICategory = exports.getParameterStoreSecretPath = exports.DEFAULT_SCHEMA_DEFINITION = exports.getStrategyDbTypeFromTypeNode = exports.getSortKeyFieldNames = exports.getKeySchema = exports.getTable = exports.stripDirectives = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.generateGetArgumentsInput = exports.DirectiveWrapper = exports.getConnectionName = exports.getSubscriptionFilterInputName = exports.getConditionInputName = exports.getFilterInputName = exports.getPrimaryKeyFields = void 0; | ||
var model_util_1 = require("./model-util"); | ||
Object.defineProperty(exports, "getPrimaryKeyFields", { enumerable: true, get: function () { return model_util_1.getPrimaryKeyFields; } }); | ||
Object.defineProperty(exports, "getFilterInputName", { enumerable: true, get: function () { return model_util_1.getFilterInputName; } }); | ||
Object.defineProperty(exports, "getConditionInputName", { enumerable: true, get: function () { return model_util_1.getConditionInputName; } }); | ||
Object.defineProperty(exports, "getSubscriptionFilterInputName", { enumerable: true, get: function () { return model_util_1.getSubscriptionFilterInputName; } }); | ||
Object.defineProperty(exports, "getConnectionName", { enumerable: true, get: function () { return model_util_1.getConnectionName; } }); | ||
var directive_wrapper_1 = require("./directive-wrapper"); | ||
@@ -22,0 +26,0 @@ Object.defineProperty(exports, "DirectiveWrapper", { enumerable: true, get: function () { return directive_wrapper_1.DirectiveWrapper; } }); |
import { ObjectTypeDefinitionNode } from 'graphql'; | ||
export declare const getPrimaryKeyFields: (type: ObjectTypeDefinitionNode) => string[]; | ||
export declare const getFilterInputName: (modelName: string) => string; | ||
export declare const getConditionInputName: (modelName: string) => string; | ||
export declare const getSubscriptionFilterInputName: (modelName: string) => string; | ||
export declare const getConnectionName: (modelName: string) => string; | ||
//# sourceMappingURL=model-util.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPrimaryKeyFields = void 0; | ||
exports.getConnectionName = exports.getSubscriptionFilterInputName = exports.getConditionInputName = exports.getFilterInputName = exports.getPrimaryKeyFields = void 0; | ||
const graphql_transformer_common_1 = require("graphql-transformer-common"); | ||
const getPrimaryKeyFields = (type) => { | ||
@@ -19,2 +20,18 @@ var _a, _b, _c, _d; | ||
exports.getPrimaryKeyFields = getPrimaryKeyFields; | ||
const getFilterInputName = (modelName) => { | ||
return (0, graphql_transformer_common_1.toPascalCase)(['Model', modelName, 'FilterInput']); | ||
}; | ||
exports.getFilterInputName = getFilterInputName; | ||
const getConditionInputName = (modelName) => { | ||
return (0, graphql_transformer_common_1.toPascalCase)(['Model', modelName, 'ConditionInput']); | ||
}; | ||
exports.getConditionInputName = getConditionInputName; | ||
const getSubscriptionFilterInputName = (modelName) => { | ||
return (0, graphql_transformer_common_1.toPascalCase)(['ModelSubscription', modelName, 'FilterInput']); | ||
}; | ||
exports.getSubscriptionFilterInputName = getSubscriptionFilterInputName; | ||
const getConnectionName = (modelName) => { | ||
return (0, graphql_transformer_common_1.toPascalCase)(['Model', modelName, 'Connection']); | ||
}; | ||
exports.getConnectionName = getConnectionName; | ||
//# sourceMappingURL=model-util.js.map |
{ | ||
"name": "@aws-amplify/graphql-transformer-core", | ||
"version": "2.4.5", | ||
"version": "2.5.0-implicit-fields.0", | ||
"description": "A framework to transform from GraphQL SDL to AWS CloudFormation.", | ||
@@ -31,6 +31,6 @@ "repository": { | ||
"dependencies": { | ||
"@aws-amplify/graphql-transformer-interfaces": "3.3.3", | ||
"@aws-amplify/graphql-transformer-interfaces": "3.4.0-implicit-fields.0", | ||
"fs-extra": "^8.1.0", | ||
"graphql": "^15.5.0", | ||
"graphql-transformer-common": "4.28.0", | ||
"graphql-transformer-common": "4.28.1-implicit-fields.0", | ||
"hjson": "^3.2.2", | ||
@@ -72,5 +72,5 @@ "lodash": "^4.17.21", | ||
"global": { | ||
"branches": 69, | ||
"functions": 31, | ||
"lines": 56 | ||
"branches": 67, | ||
"functions": 30, | ||
"lines": 49 | ||
} | ||
@@ -82,5 +82,11 @@ }, | ||
], | ||
"testEnvironment": "../../FixJestEnvironment.js" | ||
"testEnvironment": "../../FixJestEnvironment.js", | ||
"collectCoverageFrom": [ | ||
"src/**/*.ts" | ||
], | ||
"coveragePathIgnorePatterns": [ | ||
"/__tests__/" | ||
] | ||
}, | ||
"gitHead": "9791c1ae7481483371655cad20a1179286c01018" | ||
"gitHead": "d3c8f090361933fc72f45ddef935529bf3b0611d" | ||
} |
Sorry, the diff of this file is too big to display
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
625249
5405
2
+ Added@aws-amplify/graphql-transformer-interfaces@3.4.0-implicit-fields.0(transitive)
+ Addedgraphql-mapping-template@4.20.15-implicit-fields.0(transitive)
+ Addedgraphql-transformer-common@4.28.1-implicit-fields.0(transitive)
- Removed@aws-amplify/graphql-transformer-interfaces@3.3.3(transitive)
- Removedgraphql-mapping-template@4.20.14(transitive)
- Removedgraphql-transformer-common@4.28.0(transitive)
Updated@aws-amplify/graphql-transformer-interfaces@3.4.0-implicit-fields.0