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
7
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 0.12.3-beta.0 to 0.13.0-graphql-vnext-dev-preview.12

222

CHANGELOG.md

@@ -6,13 +6,16 @@ # Change Log

## [0.12.3-beta.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.12.2-beta.0...@aws-amplify/graphql-transformer-core@0.12.3-beta.0) (2021-11-14)
# [0.13.0-graphql-vnext-dev-preview.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.12) (2021-11-15)
**Note:** Version bump only for package @aws-amplify/graphql-transformer-core
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
## [0.12.2-beta.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.12.1-beta.0...@aws-amplify/graphql-transformer-core@0.12.2-beta.0) (2021-11-14)
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
**Note:** Version bump only for package @aws-amplify/graphql-transformer-core

@@ -22,11 +25,218 @@

# [0.13.0-graphql-vnext-dev-preview.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.11) (2021-11-15)
## [0.12.1-beta.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.12.1-beta.0) (2021-11-14)
**Note:** Version bump only for package @aws-amplify/graphql-transformer-core
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.10) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.9) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.8) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.7) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.6) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.5) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.4) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.3) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.2) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.1) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.13.0-graphql-vnext-dev-preview.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.10.0...@aws-amplify/graphql-transformer-core@0.13.0-graphql-vnext-dev-preview.0) (2021-11-15)
### Bug Fixes
* append apiKey if global auth is enabled and its not default auth ([#8843](https://github.com/aws-amplify/amplify-cli/issues/8843)) ([c54070c](https://github.com/aws-amplify/amplify-cli/commit/c54070c4b940fab7ed9f172417ee2d3e5c91f602))
* **graphql-transformer-core:** remove the allow_public_global directive references ([#8751](https://github.com/aws-amplify/amplify-cli/issues/8751)) ([c1385b8](https://github.com/aws-amplify/amplify-cli/commit/c1385b897af7d906fb11e433235e465508381c97))
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([b522995](https://github.com/aws-amplify/amplify-cli/commit/b52299557baff3fa5adc1053f7ecc1124ef3d00e))
### Features
* **graphql-transformer-core:** add support for user defined slots ([#8758](https://github.com/aws-amplify/amplify-cli/issues/8758)) ([93c8bfc](https://github.com/aws-amplify/amplify-cli/commit/93c8bfc4294c24659d1e03205a4a0f2262774b7d))
# [0.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-transformer-core@0.9.2...@aws-amplify/graphql-transformer-core@0.10.0) (2021-11-11)

@@ -33,0 +243,0 @@

2

lib/cdk-compat/template-asset.d.ts

@@ -31,4 +31,4 @@ import * as cdk from '@aws-cdk/core';

static inlineTemplateFromString(template: string): InlineTemplate;
static s3MappingTemplateFromString(template: string, templateName: string, type?: 'pipeline' | 'resolver' | 'function'): S3MappingTemplate;
static s3MappingTemplateFromString(template: string, templateName: string): S3MappingTemplate;
}
//# sourceMappingURL=template-asset.d.ts.map

@@ -91,4 +91,4 @@ "use strict";

}
static s3MappingTemplateFromString(template, templateName, type = 'pipeline') {
const templatePrefix = type == 'pipeline' ? 'pipelineFunctions' : 'resolvers';
static s3MappingTemplateFromString(template, templateName) {
const templatePrefix = 'resolvers';
return new S3MappingTemplate(template, `${templatePrefix}/${templateName}`);

@@ -95,0 +95,0 @@ }

export { GraphQLTransform, GraphQLTransformOptions, SyncUtils } from './transformation';
export { DeploymentResources } from './transformation/types';
export { DeploymentResources, UserDefinedSlot } from './transformation/types';
export { validateModelSchema } from './transformation/validation';

@@ -10,3 +10,3 @@ export { ConflictDetectionType, ConflictHandlerType, ResolverConfig, SyncConfig, SyncConfigOptimistic, SyncConfigServer, SyncConfigLambda, TransformConfig, TransformerProjectConfig, } from './config/index';

export declare const getAppSyncServiceExtraDirectives: () => string;
export { MappingTemplate } from './cdk-compat';
export { MappingTemplate, TransformerNestedStack } from './cdk-compat';
//# sourceMappingURL=index.d.ts.map

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.MappingTemplate = exports.getAppSyncServiceExtraDirectives = exports.TransformerResolver = exports.TransformerAuthBase = exports.TransformerPluginBase = exports.TransformerModelEnhancerBase = exports.TransformerModelBase = exports.IAM_UNAUTH_ROLE_PARAMETER = exports.IAM_AUTH_ROLE_PARAMETER = exports.DirectiveWrapper = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.ConflictHandlerType = exports.validateModelSchema = exports.SyncUtils = exports.GraphQLTransform = void 0;
exports.TransformerNestedStack = exports.MappingTemplate = exports.getAppSyncServiceExtraDirectives = exports.TransformerResolver = exports.TransformerAuthBase = exports.TransformerPluginBase = exports.TransformerModelEnhancerBase = exports.TransformerModelBase = exports.IAM_UNAUTH_ROLE_PARAMETER = exports.IAM_AUTH_ROLE_PARAMETER = exports.DirectiveWrapper = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.ConflictHandlerType = exports.validateModelSchema = exports.SyncUtils = exports.GraphQLTransform = void 0;
const graphql_1 = require("graphql");

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

Object.defineProperty(exports, "MappingTemplate", { enumerable: true, get: function () { return cdk_compat_1.MappingTemplate; } });
Object.defineProperty(exports, "TransformerNestedStack", { enumerable: true, get: function () { return cdk_compat_1.TransformerNestedStack; } });
//# sourceMappingURL=index.js.map
import { FeatureFlagProvider, TransformerPluginProvider, TransformHostProvider, AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-interfaces';
import { TransformConfig } from '../config';
import Template, { DeploymentResources } from './types';
import Template, { DeploymentResources, UserDefinedSlot } from './types';
export interface GraphQLTransformOptions {

@@ -14,2 +14,3 @@ readonly transformers: TransformerPluginProvider[];

readonly sandboxModeEnabled?: boolean;
readonly userDefinedSlots?: Record<string, UserDefinedSlot[]>;
}

@@ -27,2 +28,3 @@ export declare type StackMapping = {

private readonly buildParameters;
private readonly userDefinedSlots;
private seenTransformations;

@@ -29,0 +31,0 @@ constructor(options: GraphQLTransformOptions);

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

const SyncUtils = __importStar(require("./sync-utils"));
const cdk_compat_1 = require("../cdk-compat");
const utils_1 = require("./utils");

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

this.transformConfig = options.transformConfig || {};
this.userDefinedSlots = options.userDefinedSlots || {};
}

@@ -70,3 +72,3 @@ transform(schema) {

this.app = new core_1.App();
const context = new transformer_context_1.TransformerContext(this.app, parsedDocument, this.stackMappingOverrides, this.authConfig, this.options.featureFlags, this.transformConfig.ResolverConfig);
const context = new transformer_context_1.TransformerContext(this.app, parsedDocument, this.stackMappingOverrides, this.authConfig, this.options.sandboxModeEnabled, this.options.featureFlags, this.transformConfig.ResolverConfig);
const validDirectiveNameMap = this.transformers.reduce((acc, t) => ({ ...acc, [t.directive.name.value]: true }), {

@@ -80,3 +82,2 @@ aws_subscribe: true,

aws_cognito_user_pools: true,
allow_public_data_access_with_api_key: true,
deprecated: true,

@@ -257,3 +258,9 @@ });

const resolverEntries = context.resolvers.collectResolvers();
for (let [, resolver] of resolverEntries) {
for (const [resolverName, resolver] of resolverEntries) {
const userSlots = this.userDefinedSlots[resolverName];
if (userSlots) {
userSlots.forEach(({ slotName, template, fileName }) => {
resolver.addToSlot(slotName, cdk_compat_1.MappingTemplate.s3MappingTemplateFromString(template, fileName));
});
}
resolver.synthesize(context, api);

@@ -260,0 +267,0 @@ }

@@ -36,2 +36,9 @@ export default interface Template {

}
export declare type UserDefinedSlot = {
fileName: string;
resolverTypeName: string;
resolverFieldName: string;
slotName: string;
template: string;
};
//# sourceMappingURL=types.d.ts.map

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

directive @aws_cognito_user_pools(cognito_groups: [String!]) on FIELD_DEFINITION | OBJECT
directive @allow_public_data_access_with_api_key(in: [String!]) on OBJECT

@@ -82,0 +81,0 @@ # Allows transformer libraries to deprecate directive arguments.

@@ -27,5 +27,6 @@ import { FeatureFlagProvider, GraphQLAPIProvider, StackManagerProvider, TransformerContextOutputProvider, TransformerContextProvider, TransformerDataSourceManagerProvider, AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-interfaces';

readonly authConfig: AppSyncAuthConfiguration;
readonly sandboxModeEnabled: boolean;
private resolverConfig;
metadata: TransformerContextMetadata;
constructor(app: App, inputDocument: DocumentNode, stackMapping: Record<string, string>, authConfig: AppSyncAuthConfiguration, featureFlags?: FeatureFlagProvider, resolverConfig?: ResolverConfig);
constructor(app: App, inputDocument: DocumentNode, stackMapping: Record<string, string>, authConfig: AppSyncAuthConfiguration, sandboxModeEnabled?: boolean, featureFlags?: FeatureFlagProvider, resolverConfig?: ResolverConfig);
get api(): GraphQLAPIProvider;

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

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

class TransformerContext {
constructor(app, inputDocument, stackMapping, authConfig, featureFlags, resolverConfig) {
constructor(app, inputDocument, stackMapping, authConfig, sandboxModeEnabled, featureFlags, resolverConfig) {
this.inputDocument = inputDocument;

@@ -42,2 +42,3 @@ this.getResolverConfig = () => {

this.authConfig = authConfig;
this.sandboxModeEnabled = sandboxModeEnabled !== null && sandboxModeEnabled !== void 0 ? sandboxModeEnabled : false;
this.resourceHelper = new resource_helper_1.TransformerResourceHelper(stackManager);

@@ -44,0 +45,0 @@ this.featureFlags = featureFlags !== null && featureFlags !== void 0 ? featureFlags : new noop_feature_flag_1.NoopFeatureFlagProvider();

@@ -30,3 +30,3 @@ import { AppSyncFunctionConfigurationProvider, DataSourceProvider, GraphQLAPIProvider, MappingTemplateProvider, TransformerContextProvider, TransformerResolverProvider, TransformerResolversManagerProvider } from '@aws-amplify/graphql-transformer-interfaces';

synthesize: (context: TransformerContextProvider, api: GraphQLAPIProvider) => void;
synthesizePipelineFunctions: (stack: Stack, api: GraphQLAPIProvider, slotsNames: string[]) => AppSyncFunctionConfigurationProvider[];
synthesizeResolvers: (stack: Stack, api: GraphQLAPIProvider, slotsNames: string[]) => AppSyncFunctionConfigurationProvider[];
private substitueSlotInfo;

@@ -33,0 +33,0 @@ private ensureNoneDataSource;

@@ -116,4 +116,4 @@ "use strict";

this.ensureNoneDataSource(api);
const requestFns = this.synthesizePipelineFunctions(stack, api, this.requestSlots);
const responseFns = this.synthesizePipelineFunctions(stack, api, this.responseSlots);
const requestFns = this.synthesizeResolvers(stack, api, this.requestSlots);
const responseFns = this.synthesizeResolvers(stack, api, this.responseSlots);
[this.requestMappingTemplate, this.requestMappingTemplate].map(template => this.substitueSlotInfo(template, 'main', 0));

@@ -200,3 +200,3 @@ const dataSourceProviderFn = api.host.addAppSyncFunction(graphql_transformer_common_1.toPascalCase([this.typeName, this.fieldName, 'DataResolverFn']), this.requestMappingTemplate, this.responseMappingTemplate, ((_a = this.datasource) === null || _a === void 0 ? void 0 : _a.name) || NONE_DATA_SOURCE_NAME, stack);

};
this.synthesizePipelineFunctions = (stack, api, slotsNames) => {
this.synthesizeResolvers = (stack, api, slotsNames) => {
const appSyncFunctions = [];

@@ -203,0 +203,0 @@ for (let slotName of slotsNames) {

{
"name": "@aws-amplify/graphql-transformer-core",
"version": "0.12.3-beta.0",
"version": "0.13.0-graphql-vnext-dev-preview.12",
"description": "A framework to transform from GraphQL SDL to AWS CloudFormation.",

@@ -30,3 +30,3 @@ "repository": {

"dependencies": {
"@aws-amplify/graphql-transformer-interfaces": "1.12.3-beta.0",
"@aws-amplify/graphql-transformer-interfaces": "1.12.1-graphql-vnext-dev-preview.12",
"@aws-cdk/assets": "~1.124.0",

@@ -63,3 +63,3 @@ "@aws-cdk/aws-applicationautoscaling": "~1.124.0",

"graphql": "^14.5.8",
"graphql-transformer-common": "4.22.3-beta.0",
"graphql-transformer-common": "4.22.1-graphql-vnext-dev-preview.12",
"lodash": "^4.17.21",

@@ -90,3 +90,3 @@ "md5": "^2.3.0",

},
"gitHead": "13a3369b0af71c169cc5ff2943d2714cd790639e"
"gitHead": "73a2c5369870c5bb2b3931517a8b17c842d14c2a"
}

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