Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-amplify/graphql-transformer-core

Package Overview
Dependencies
Maintainers
10
Versions
431
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/graphql-transformer-core - npm Package Compare versions

Comparing version 2.2.0-rds-1.0 to 2.2.0-rds-2.0

19

API.md

@@ -17,2 +17,3 @@ ## API Report File for "@aws-amplify/graphql-transformer-core"

import { CfnGraphQLSchema } from 'aws-cdk-lib/aws-appsync';
import { CfnParameter } from 'aws-cdk-lib';
import { CfnResource } from 'aws-cdk-lib';

@@ -78,2 +79,3 @@ import { Construct } from 'constructs';

import { TransformHostProvider } from '@aws-amplify/graphql-transformer-interfaces';
import { TransformParameterProvider } from '@aws-amplify/graphql-transformer-interfaces';
import type { TransformParameters } from '@aws-amplify/graphql-transformer-interfaces';

@@ -85,3 +87,3 @@ import { TypeDefinitionNode } from 'graphql';

import { UnionTypeExtensionNode } from 'graphql';
import { VpcConfig } from '@aws-amplify/graphql-transformer-interfaces';
import type { VpcSubnetConfig } from '@aws-amplify/graphql-transformer-interfaces';

@@ -233,3 +235,3 @@ // @public (undocumented)

// (undocumented)
transform({ scope, nestedStackProvider, assetProvider, synthParameters, schema, datasourceConfig }: TransformOption): void;
transform({ scope, nestedStackProvider, parameterProvider, assetProvider, synthParameters, schema, datasourceConfig, }: TransformOption): void;
}

@@ -248,3 +250,3 @@

// (undocumented)
readonly sqlLambdaVpcConfig?: VpcConfig;
readonly sqlLambdaVpcConfig?: VpcSubnetConfig;
// Warning: (ae-forgotten-export) The symbol "StackMapping" needs to be exported by the entry point index.d.ts

@@ -353,2 +355,5 @@ //

// @public (undocumented)
export const isRDSModel: (context: TransformerContextProvider, modelName: string) => boolean | undefined;
// @public (undocumented)
export class MappingTemplate {

@@ -431,6 +436,8 @@ // Warning: (ae-forgotten-export) The symbol "InlineTemplate" needs to be exported by the entry point index.d.ts

// Warning: (ae-forgotten-export) The symbol "ResourceToStackMap" needs to be exported by the entry point index.d.ts
constructor(scope: Construct, nestedStackProvider: NestedStackProvider, resourceMapping: ResourceToStackMap);
constructor(scope: Construct, nestedStackProvider: NestedStackProvider, parameterProvider: TransformParameterProvider | undefined, resourceMapping: ResourceToStackMap);
// (undocumented)
createStack: (stackName: string) => Stack;
// (undocumented)
getParameter: (name: string) => CfnParameter | void;
// (undocumented)
getScopeFor: (resourceId: string, defaultStackName?: string) => Construct;

@@ -440,2 +447,4 @@ // (undocumented)

// (undocumented)
getStackFor: (resourceId: string, defaultStackName?: string) => Construct;
// (undocumented)
hasStack: (stackName: string) => boolean;

@@ -610,2 +619,4 @@ // (undocumented)

// (undocumented)
mapToStack: (stack: Stack) => void;
// (undocumented)
setScope: (scope: Construct) => void;

@@ -612,0 +623,0 @@ // (undocumented)

@@ -5,3 +5,2 @@ "use strict";

const aws_appsync_1 = require("aws-cdk-lib/aws-appsync");
const aws_appsync_2 = require("aws-cdk-lib/aws-appsync");
const constructs_1 = require("constructs");

@@ -16,3 +15,3 @@ const template_asset_1 = require("./cdk-compat/template-asset");

const responseTemplate = props.responseMappingTemplate.bind(this);
this.function = new aws_appsync_2.CfnFunctionConfiguration(this, `${id}.AppSyncFunction`, {
this.function = new aws_appsync_1.CfnFunctionConfiguration(this, `${id}.AppSyncFunction`, {
name: id,

@@ -19,0 +18,0 @@ apiId: props.api.apiId,

import { APIIAMResourceProvider, GraphQLAPIProvider, TransformHostProvider } from '@aws-amplify/graphql-transformer-interfaces';
import { ApiKeyConfig, AuthorizationConfig, AuthorizationType, GraphqlApiBase, LogConfig } from 'aws-cdk-lib/aws-appsync';
import { CfnApiKey } from 'aws-cdk-lib/aws-appsync';
import { ApiKeyConfig, AuthorizationConfig, AuthorizationType, GraphqlApiBase, LogConfig, CfnApiKey } from 'aws-cdk-lib/aws-appsync';
import { Grant, IGrantable } from 'aws-cdk-lib/aws-iam';

@@ -5,0 +4,0 @@ import { CfnResource } from 'aws-cdk-lib';

@@ -28,3 +28,2 @@ "use strict";

const aws_appsync_1 = require("aws-cdk-lib/aws-appsync");
const aws_appsync_2 = require("aws-cdk-lib/aws-appsync");
const aws_iam_1 = require("aws-cdk-lib/aws-iam");

@@ -78,3 +77,3 @@ const cdk = __importStar(require("aws-cdk-lib"));

this.validateAuthorizationProps(modes);
this.api = new aws_appsync_2.CfnGraphQLApi(this, 'Resource', {
this.api = new aws_appsync_1.CfnGraphQLApi(this, 'Resource', {
name: props.name,

@@ -139,3 +138,3 @@ authenticationType: defaultMode.authorizationType,

const expires = (config === null || config === void 0 ? void 0 : config.expires) ? config === null || config === void 0 ? void 0 : config.expires.toEpoch() : undefined;
return new aws_appsync_2.CfnApiKey(this, `${(config === null || config === void 0 ? void 0 : config.name) || 'Default'}ApiKey`, {
return new aws_appsync_1.CfnApiKey(this, `${(config === null || config === void 0 ? void 0 : config.name) || 'Default'}ApiKey`, {
expires,

@@ -142,0 +141,0 @@ description: (config === null || config === void 0 ? void 0 : config.description) || undefined,

@@ -5,3 +5,3 @@ export { GraphQLTransform, GraphQLTransformOptions, SyncUtils } from './transformation';

export { ConflictDetectionType, ConflictHandlerType, ResolverConfig, SyncConfig, SyncConfigOptimistic, SyncConfigServer, SyncConfigLambda, TransformConfig, DatasourceType, DBType, } from './config/index';
export { GetArgumentsOptions, generateGetArgumentsInput, getTable, getKeySchema, getSortKeyFieldNames, getParameterStoreSecretPath, collectDirectives, collectDirectivesByTypeNames, DirectiveWrapper, APICategory, getPrimaryKeyFields, getDatasourceType, setResourceName, getResourceName, } from './utils';
export { GetArgumentsOptions, generateGetArgumentsInput, getTable, getKeySchema, getSortKeyFieldNames, getParameterStoreSecretPath, collectDirectives, collectDirectivesByTypeNames, DirectiveWrapper, APICategory, getPrimaryKeyFields, getDatasourceType, setResourceName, getResourceName, isRDSModel, } from './utils';
export type { SetResourceNameProps } from './utils';

@@ -8,0 +8,0 @@ export * from './utils/operation-names';

@@ -17,3 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ObjectDefinitionWrapper = exports.InputObjectDefinitionWrapper = exports.InputFieldWrapper = exports.FieldWrapper = exports.EnumWrapper = exports.MappingTemplate = exports.getAppSyncServiceExtraDirectives = exports.RDS_SCHEMA_FILE_NAME = exports.MYSQL_DB_TYPE = exports.ImportedRDSType = exports.DDB_DB_TYPE = exports.StackManager = exports.TransformerResolver = exports.TransformerAuthBase = exports.TransformerPluginBase = exports.TransformerModelEnhancerBase = exports.TransformerModelBase = exports.getResourceName = exports.setResourceName = exports.getDatasourceType = exports.getPrimaryKeyFields = exports.APICategory = exports.DirectiveWrapper = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.getParameterStoreSecretPath = exports.getSortKeyFieldNames = exports.getKeySchema = exports.getTable = exports.generateGetArgumentsInput = exports.ConflictHandlerType = exports.validateModelSchema = exports.SyncUtils = exports.GraphQLTransform = void 0;
exports.ObjectDefinitionWrapper = exports.InputObjectDefinitionWrapper = exports.InputFieldWrapper = exports.FieldWrapper = exports.EnumWrapper = exports.MappingTemplate = exports.getAppSyncServiceExtraDirectives = exports.RDS_SCHEMA_FILE_NAME = exports.MYSQL_DB_TYPE = exports.ImportedRDSType = exports.DDB_DB_TYPE = exports.StackManager = exports.TransformerResolver = exports.TransformerAuthBase = exports.TransformerPluginBase = exports.TransformerModelEnhancerBase = exports.TransformerModelBase = exports.isRDSModel = exports.getResourceName = exports.setResourceName = exports.getDatasourceType = exports.getPrimaryKeyFields = exports.APICategory = exports.DirectiveWrapper = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.getParameterStoreSecretPath = exports.getSortKeyFieldNames = exports.getKeySchema = exports.getTable = exports.generateGetArgumentsInput = exports.ConflictHandlerType = exports.validateModelSchema = exports.SyncUtils = exports.GraphQLTransform = void 0;
const graphql_1 = require("graphql");

@@ -42,2 +42,3 @@ const validation_1 = require("./transformation/validation");

Object.defineProperty(exports, "getResourceName", { enumerable: true, get: function () { return utils_1.getResourceName; } });
Object.defineProperty(exports, "isRDSModel", { enumerable: true, get: function () { return utils_1.isRDSModel; } });
__exportStar(require("./utils/operation-names"), exports);

@@ -44,0 +45,0 @@ __exportStar(require("./errors"), exports);

import { DynamoDbDataSourceOptions, MappingTemplateProvider, SearchableDataSourceOptions, TransformHostProvider, VpcConfig } from '@aws-amplify/graphql-transformer-interfaces';
import { BaseDataSource, DataSourceOptions, DynamoDbDataSource, HttpDataSource, HttpDataSourceOptions, LambdaDataSource, NoneDataSource } from 'aws-cdk-lib/aws-appsync';
import { CfnResolver } from 'aws-cdk-lib/aws-appsync';
import { BaseDataSource, DataSourceOptions, DynamoDbDataSource, HttpDataSource, HttpDataSourceOptions, LambdaDataSource, NoneDataSource, CfnResolver } from 'aws-cdk-lib/aws-appsync';
import { ITable } from 'aws-cdk-lib/aws-dynamodb';

@@ -5,0 +4,0 @@ import { IRole } from 'aws-cdk-lib/aws-iam';

@@ -8,3 +8,2 @@ "use strict";

const aws_appsync_1 = require("aws-cdk-lib/aws-appsync");
const aws_appsync_2 = require("aws-cdk-lib/aws-appsync");
const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");

@@ -99,3 +98,3 @@ const aws_cdk_lib_1 = require("aws-cdk-lib");

const dataSource = this.dataSources.get(dataSourceName);
const resolver = new aws_appsync_2.CfnResolver(scope || this.api, resolverName, {
const resolver = new aws_appsync_1.CfnResolver(scope || this.api, resolverName, {
apiId: this.api.apiId,

@@ -119,3 +118,3 @@ fieldName,

if (pipelineConfig) {
const resolver = new aws_appsync_2.CfnResolver(scope || this.api, resolverName, {
const resolver = new aws_appsync_1.CfnResolver(scope || this.api, resolverName, {
apiId: this.api.apiId,

@@ -122,0 +121,0 @@ fieldName,

@@ -1,3 +0,3 @@

import { AppSyncAuthConfiguration, TransformerPluginProvider, TransformHostProvider, TransformerLog, NestedStackProvider, VpcConfig, RDSLayerMapping, SynthParameters } from '@aws-amplify/graphql-transformer-interfaces';
import type { AssetProvider, StackManagerProvider, TransformParameters } from '@aws-amplify/graphql-transformer-interfaces';
import { AppSyncAuthConfiguration, TransformerPluginProvider, TransformHostProvider, TransformerLog, NestedStackProvider, RDSLayerMapping, SynthParameters } from '@aws-amplify/graphql-transformer-interfaces';
import type { AssetProvider, StackManagerProvider, TransformParameterProvider, TransformParameters, VpcSubnetConfig } from '@aws-amplify/graphql-transformer-interfaces';
import { DocumentNode } from 'graphql/language';

@@ -17,3 +17,3 @@ import { Construct } from 'constructs';

readonly resolverConfig?: ResolverConfig;
readonly sqlLambdaVpcConfig?: VpcConfig;
readonly sqlLambdaVpcConfig?: VpcSubnetConfig;
readonly rdsLayerMapping?: RDSLayerMapping;

@@ -24,2 +24,3 @@ }

nestedStackProvider: NestedStackProvider;
parameterProvider?: TransformParameterProvider;
assetProvider: AssetProvider;

@@ -46,3 +47,3 @@ synthParameters: SynthParameters;

preProcessSchema(schema: DocumentNode): DocumentNode;
transform({ scope, nestedStackProvider, assetProvider, synthParameters, schema, datasourceConfig }: TransformOption): void;
transform({ scope, nestedStackProvider, parameterProvider, assetProvider, synthParameters, schema, datasourceConfig, }: TransformOption): void;
protected generateGraphQlApi(stackManager: StackManagerProvider, synthParameters: SynthParameters, output: TransformerOutput): GraphQLApi;

@@ -49,0 +50,0 @@ private collectResolvers;

@@ -70,3 +70,2 @@ "use strict";

this.sqlLambdaVpcConfig = options.sqlLambdaVpcConfig;
this.sqlLambdaVpcConfig = options.sqlLambdaVpcConfig;
this.transformParameters = {

@@ -93,7 +92,7 @@ ...transform_parameters_1.defaultTransformParameters,

}
transform({ scope, nestedStackProvider, assetProvider, synthParameters, schema, datasourceConfig }) {
transform({ scope, nestedStackProvider, parameterProvider, assetProvider, synthParameters, schema, datasourceConfig, }) {
var _a, _b;
this.seenTransformations = {};
const parsedDocument = (0, graphql_1.parse)(schema);
const context = new transformer_context_1.TransformerContext(scope, nestedStackProvider, assetProvider, synthParameters, parsedDocument, (_a = datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.modelToDatasourceMap) !== null && _a !== void 0 ? _a : new Map(), (_b = datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.customQueries) !== null && _b !== void 0 ? _b : new Map(), this.stackMappingOverrides, this.authConfig, this.transformParameters, this.resolverConfig, datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.datasourceSecretParameterLocations, this.sqlLambdaVpcConfig, datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.rdsLayerMapping);
const context = new transformer_context_1.TransformerContext(scope, nestedStackProvider, parameterProvider, assetProvider, synthParameters, parsedDocument, (_a = datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.modelToDatasourceMap) !== null && _a !== void 0 ? _a : new Map(), (_b = datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.customQueries) !== null && _b !== void 0 ? _b : new Map(), this.stackMappingOverrides, this.authConfig, this.transformParameters, this.resolverConfig, datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.datasourceSecretParameterLocations, this.sqlLambdaVpcConfig, datasourceConfig === null || datasourceConfig === void 0 ? void 0 : datasourceConfig.rdsLayerMapping);
const validDirectiveNameMap = this.transformers.reduce((acc, t) => ({ ...acc, [t.directive.name.value]: true }), {

@@ -100,0 +99,0 @@ aws_subscribe: true,

@@ -1,3 +0,3 @@

import { GraphQLAPIProvider, StackManagerProvider, TransformerContextOutputProvider, TransformerContextProvider, TransformerDataSourceManagerProvider, AppSyncAuthConfiguration, VpcConfig, RDSLayerMapping, SynthParameters } from '@aws-amplify/graphql-transformer-interfaces';
import type { AssetProvider, NestedStackProvider, TransformParameters } from '@aws-amplify/graphql-transformer-interfaces';
import { GraphQLAPIProvider, StackManagerProvider, TransformerContextOutputProvider, TransformerContextProvider, TransformerDataSourceManagerProvider, AppSyncAuthConfiguration, RDSLayerMapping, SynthParameters } from '@aws-amplify/graphql-transformer-interfaces';
import type { AssetProvider, NestedStackProvider, TransformParameterProvider, TransformParameters, VpcSubnetConfig } from '@aws-amplify/graphql-transformer-interfaces';
import { TransformerContextMetadataProvider } from '@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transformer-context-provider';

@@ -35,7 +35,7 @@ import { DocumentNode } from 'graphql';

readonly datasourceSecretParameterLocations: Map<string, RDSConnectionSecrets>;
readonly sqlLambdaVpcConfig?: VpcConfig;
readonly sqlLambdaVpcConfig?: VpcSubnetConfig;
readonly rdsLayerMapping?: RDSLayerMapping;
readonly customQueries: Map<string, string>;
metadata: TransformerContextMetadata;
constructor(scope: Construct, nestedStackProvider: NestedStackProvider, assetProvider: AssetProvider, synthParameters: SynthParameters, inputDocument: DocumentNode, modelToDatasourceMap: Map<string, DatasourceType>, customQueries: Map<string, string>, stackMapping: Record<string, string>, authConfig: AppSyncAuthConfiguration, transformParameters: TransformParameters, resolverConfig?: ResolverConfig, datasourceSecretParameterLocations?: Map<string, RDSConnectionSecrets>, sqlLambdaVpcConfig?: VpcConfig, rdsLayerMapping?: RDSLayerMapping);
constructor(scope: Construct, nestedStackProvider: NestedStackProvider, parameterProvider: TransformParameterProvider | undefined, assetProvider: AssetProvider, synthParameters: SynthParameters, inputDocument: DocumentNode, modelToDatasourceMap: Map<string, DatasourceType>, customQueries: Map<string, string>, stackMapping: Record<string, string>, authConfig: AppSyncAuthConfiguration, transformParameters: TransformParameters, resolverConfig?: ResolverConfig, datasourceSecretParameterLocations?: Map<string, RDSConnectionSecrets>, sqlLambdaVpcConfig?: VpcSubnetConfig, rdsLayerMapping?: RDSLayerMapping);
get api(): GraphQLAPIProvider;

@@ -42,0 +42,0 @@ getResolverConfig: <ResolverConfig_1>() => ResolverConfig_1 | undefined;

@@ -31,3 +31,3 @@ "use strict";

class TransformerContext {
constructor(scope, nestedStackProvider, assetProvider, synthParameters, inputDocument, modelToDatasourceMap, customQueries, stackMapping, authConfig, transformParameters, resolverConfig, datasourceSecretParameterLocations, sqlLambdaVpcConfig, rdsLayerMapping) {
constructor(scope, nestedStackProvider, parameterProvider, assetProvider, synthParameters, inputDocument, modelToDatasourceMap, customQueries, stackMapping, authConfig, transformParameters, resolverConfig, datasourceSecretParameterLocations, sqlLambdaVpcConfig, rdsLayerMapping) {
this.synthParameters = synthParameters;

@@ -41,3 +41,3 @@ this.inputDocument = inputDocument;

this.providerRegistry = new provider_registry_1.TransformerContextProviderRegistry();
this.stackManager = new stack_manager_1.StackManager(scope, nestedStackProvider, stackMapping);
this.stackManager = new stack_manager_1.StackManager(scope, nestedStackProvider, parameterProvider, stackMapping);
this.authConfig = authConfig;

@@ -44,0 +44,0 @@ this.resourceHelper = new resource_helper_1.TransformerResourceHelper(this.synthParameters);

@@ -31,6 +31,4 @@ "use strict";

}
else {
if (existingEntry.isList !== entry.isList) {
throw new Error(`Resolver of type [${existingEntry.typeName}] and field [${existingEntry.fieldName}] already registered with isList set to [${existingEntry.isList}]`);
}
else if (existingEntry.isList !== entry.isList) {
throw new Error(`Resolver of type [${existingEntry.typeName}] and field [${existingEntry.fieldName}] already registered with isList set to [${existingEntry.isList}]`);
}

@@ -37,0 +35,0 @@ return this;

@@ -45,3 +45,3 @@ "use strict";

case graphql_1.Kind.ENUM_TYPE_DEFINITION:
case graphql_1.Kind.UNION_TYPE_DEFINITION:
case graphql_1.Kind.UNION_TYPE_DEFINITION: {
const typeDef = inputDef;

@@ -54,2 +54,3 @@ if (this.isAmplifyInput(typeDef.name.value))

break;
}
case graphql_1.Kind.SCHEMA_DEFINITION:

@@ -56,0 +57,0 @@ if (!this.getSchema()) {

import { AppSyncFunctionConfigurationProvider, DataSourceProvider, GraphQLAPIProvider, MappingTemplateProvider, TransformerContextProvider, TransformerResolverProvider, TransformerResolversManagerProvider } from '@aws-amplify/graphql-transformer-interfaces';
import { Stack } from 'aws-cdk-lib';
import { Construct } from 'constructs';

@@ -32,2 +33,3 @@ type Slot = {

constructor(typeName: string, fieldName: string, resolverLogicalId: string, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider, requestSlots: string[], responseSlots: string[], datasource?: DataSourceProvider | undefined);
mapToStack: (stack: Stack) => void;
setScope: (scope: Construct) => void;

@@ -34,0 +36,0 @@ addToSlot: (slotName: string, requestMappingTemplate?: MappingTemplateProvider, responseMappingTemplate?: MappingTemplateProvider, dataSource?: DataSourceProvider) => void;

@@ -83,2 +83,5 @@ "use strict";

this.slotMap = new Map();
this.mapToStack = (stack) => {
this.scope = stack;
};
this.setScope = (scope) => {

@@ -85,0 +88,0 @@ this.scope = scope;

@@ -1,3 +0,3 @@

import { StackManagerProvider, NestedStackProvider } from '@aws-amplify/graphql-transformer-interfaces';
import { Stack } from 'aws-cdk-lib';
import { StackManagerProvider, NestedStackProvider, TransformParameterProvider } from '@aws-amplify/graphql-transformer-interfaces';
import { CfnParameter, Stack } from 'aws-cdk-lib';
import { Construct } from 'constructs';

@@ -8,10 +8,13 @@ export type ResourceToStackMap = Record<string, string>;

private readonly nestedStackProvider;
private readonly parameterProvider;
private stacks;
private resourceToStackMap;
constructor(scope: Construct, nestedStackProvider: NestedStackProvider, resourceMapping: ResourceToStackMap);
constructor(scope: Construct, nestedStackProvider: NestedStackProvider, parameterProvider: TransformParameterProvider | undefined, resourceMapping: ResourceToStackMap);
createStack: (stackName: string) => Stack;
hasStack: (stackName: string) => boolean;
getScopeFor: (resourceId: string, defaultStackName?: string) => Construct;
getStackFor: (resourceId: string, defaultStackName?: string) => Construct;
getParameter: (name: string) => CfnParameter | void;
getStack: (stackName: string) => Stack;
}
//# sourceMappingURL=stack-manager.d.ts.map

@@ -5,5 +5,6 @@ "use strict";

class StackManager {
constructor(scope, nestedStackProvider, resourceMapping) {
constructor(scope, nestedStackProvider, parameterProvider, resourceMapping) {
this.scope = scope;
this.nestedStackProvider = nestedStackProvider;
this.parameterProvider = parameterProvider;
this.stacks = new Map();

@@ -26,2 +27,4 @@ this.createStack = (stackName) => {

};
this.getStackFor = (resourceId, defaultStackName) => this.getScopeFor(resourceId, defaultStackName);
this.getParameter = (name) => this.parameterProvider && this.parameterProvider.provide(name);
this.getStack = (stackName) => {

@@ -28,0 +31,0 @@ if (this.stacks.has(stackName)) {

@@ -36,3 +36,3 @@ "use strict";

};
case aws_appsync_1.AuthorizationType.USER_POOL:
case aws_appsync_1.AuthorizationType.USER_POOL: {
if (!synthParameters.userPoolId) {

@@ -47,2 +47,3 @@ throw new Error('Expected userPoolId to be present in synth parameters when user pool auth is specified.');

};
}
case aws_appsync_1.AuthorizationType.IAM:

@@ -49,0 +50,0 @@ return {

@@ -1,2 +0,2 @@

export { getPrimaryKeyFields } from './model-util';
export { getPrimaryKeyFields, isRDSModel } from './model-util';
export { DirectiveWrapper, GetArgumentsOptions, generateGetArgumentsInput } from './directive-wrapper';

@@ -3,0 +3,0 @@ export { collectDirectives, collectDirectivesByTypeNames } from './type-map-utils';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getResourceName = exports.setResourceName = exports.APICategory = exports.getParameterStoreSecretPath = exports.DEFAULT_SCHEMA_DEFINITION = exports.getDatasourceType = exports.getSortKeyFieldNames = exports.getKeySchema = exports.getTable = exports.stripDirectives = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.generateGetArgumentsInput = exports.DirectiveWrapper = exports.getPrimaryKeyFields = void 0;
exports.getResourceName = exports.setResourceName = exports.APICategory = exports.getParameterStoreSecretPath = exports.DEFAULT_SCHEMA_DEFINITION = exports.getDatasourceType = exports.getSortKeyFieldNames = exports.getKeySchema = exports.getTable = exports.stripDirectives = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.generateGetArgumentsInput = exports.DirectiveWrapper = exports.isRDSModel = 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, "isRDSModel", { enumerable: true, get: function () { return model_util_1.isRDSModel; } });
var directive_wrapper_1 = require("./directive-wrapper");

@@ -7,0 +8,0 @@ Object.defineProperty(exports, "DirectiveWrapper", { enumerable: true, get: function () { return directive_wrapper_1.DirectiveWrapper; } });

import { ObjectTypeDefinitionNode } from 'graphql';
import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
export declare const getPrimaryKeyFields: (type: ObjectTypeDefinitionNode) => string[];
export declare const isRDSModel: (context: TransformerContextProvider, modelName: string) => boolean | undefined;
//# sourceMappingURL=model-util.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPrimaryKeyFields = void 0;
exports.isRDSModel = exports.getPrimaryKeyFields = void 0;
const types_1 = require("../types");
const getPrimaryKeyFields = (type) => {

@@ -19,2 +20,9 @@ var _a, _b, _c, _d;

exports.getPrimaryKeyFields = getPrimaryKeyFields;
const isRDSModel = (context, modelName) => {
var _a;
if (context.modelToDatasourceMap && context.modelToDatasourceMap.get(modelName)) {
return ((_a = context.modelToDatasourceMap.get(modelName)) === null || _a === void 0 ? void 0 : _a.dbType) === types_1.MYSQL_DB_TYPE;
}
};
exports.isRDSModel = isRDSModel;
//# sourceMappingURL=model-util.js.map

@@ -202,3 +202,3 @@ "use strict";

const field = this.fields.find((f) => f.name === name);
return field ? true : false;
return !!field;
};

@@ -255,3 +255,3 @@ this.getField = (name) => {

const field = this.fields.find((f) => f.name === name);
return field ? true : false;
return !!field;
};

@@ -258,0 +258,0 @@ this.getField = (name) => {

{
"name": "@aws-amplify/graphql-transformer-core",
"version": "2.2.0-rds-1.0",
"version": "2.2.0-rds-2.0",
"description": "A framework to transform from GraphQL SDL to AWS CloudFormation.",

@@ -31,6 +31,6 @@ "repository": {

"dependencies": {
"@aws-amplify/graphql-transformer-interfaces": "3.2.0-rds-1.0",
"@aws-amplify/graphql-transformer-interfaces": "3.2.0-rds-2.0",
"fs-extra": "^8.1.0",
"graphql": "^15.5.0",
"graphql-transformer-common": "4.26.0-rds-1.0",
"graphql-transformer-common": "4.26.0-rds-2.0",
"hjson": "^3.2.2",

@@ -77,3 +77,3 @@ "lodash": "^4.17.21",

},
"gitHead": "223cc16f30e64ab18ac1eda6a31c68db7606c8b8"
"gitHead": "b0257bd87b199069cb66625d6554377dc65c4c8a"
}

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

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc