How to use the graphql-dynamodb-transformer function in graphql-dynamodb-transformer

To help you get started, we’ve selected a few graphql-dynamodb-transformer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-amplify / amplify-cli / packages / graphql-transform-cli / src / commands / update.ts View on Github external
@param({
            description: 'The name of the application',
            required: true,
        })
        name: string,
        @param({
            description: 'The region to launch the stack in. Defaults to us-west-2',
            required: false,
            default: 'us-west-2'
        })
        region: string
    ) {
        const transformer = new GraphQLTransform({
            transformers: [
                new AppSyncTransformer(),
                new DynamoDBTransformer(),
                new AuthTransformer()
            ]
        })
        const cfdoc = transformer.transform(schema.readSync());
        const out = await updateStack(cfdoc, name, region)
        return 'Application update successfully started. It may take a few minutes to finish.'
    }
}
github aws-amplify / amplify-cli / packages / graphql-transform-cli / src / commands / create.ts View on Github external
@param({
            description: 'The name of the application',
            required: true,
        })
        name: string,
        @param({
            description: 'The region to launch the stack in. Defaults to us-west-2',
            required: false,
            default: 'us-west-2'
        })
        region: string
    ) {
        const transformer = new GraphQLTransform({
            transformers: [
                new AppSyncTransformer(),
                new DynamoDBTransformer(),
                new AuthTransformer()
            ]
        })
        const cfdoc = transformer.transform(schema.readSync());
        const out = await createStack(cfdoc, name, region)
        return 'Application creation successfully started. It may take a few minutes to finish.'
    }
}