Skip to content

Commit

Permalink
Revert custom override resolvers (#8409)
Browse files Browse the repository at this point in the history
* Revert "feat(amplify-provider-awscloudformation): enable custom resolvers for v2 transformer (#8332)"

This reverts commit 1c73042.

* Revert "feat(amplify-provider-awscloudformation): merge user config with transform generated resolvers (#8262)"

This reverts commit f25abbf.
  • Loading branch information
lazpavel authored Oct 9, 2021
1 parent 1057fc9 commit efbd048
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 441 deletions.
10 changes: 0 additions & 10 deletions packages/amplify-e2e-core/src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,3 @@ export function updateConfig(projectDir: string, projectName: string, config: an
const configPath = path.join(projectDir, 'amplify', 'backend', 'api', projectName, TRANSFORM_CONFIG_FILE_NAME);
fs.writeFileSync(configPath, JSON.stringify(config, null, 4));
}

export function addCustomResolver(projectDir: string, projectName: string, resolverName: string, resolver: string) {
const resolverPath = path.join(projectDir, 'amplify', 'backend', 'api', projectName, 'resolvers', resolverName);
fs.writeFileSync(resolverPath, resolver);
}

export function addCustomResourcesJson(projectDir: string, projectName: string, json?: string) {
const jsonPath = path.join(projectDir, 'amplify', 'backend', 'api', projectName, 'stacks', 'CustomResources.json');
fs.writeFileSync(jsonPath, json || '{}');
}
85 changes: 0 additions & 85 deletions packages/amplify-e2e-tests/src/__tests__/resolvers.test.ts

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { SearchableModelTransformer } from '@aws-amplify/graphql-searchable-tran
import { DefaultValueTransformer } from '@aws-amplify/graphql-default-value-transformer';
import { ProviderName as providerName } from '../constants';
import { hashDirectory } from '../upload-appsync-files';
import { mergeUserConfigWithTransformOutput, writeDeploymentToDisk } from './utils';
import { writeDeploymentToDisk } from './utils';
import { loadProject as readTransformerConfiguration } from './transform-config';
import { loadProject } from 'graphql-transformer-core';
import { AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-core';
Expand Down Expand Up @@ -437,8 +437,5 @@ async function _buildProject(opts: ProjectOptions<TransformerFactoryArgs>) {
stacks: opts.projectConfig.stacks || {},
featureFlags: new AmplifyCLIFeatureFlagAdapter(),
});

const transformOutput = transform.transform(userProjectConfig.schema.toString());

return mergeUserConfigWithTransformOutput(userProjectConfig, transformOutput);
return transform.transform(userProjectConfig.schema.toString());
}
Loading

0 comments on commit efbd048

Please sign in to comment.