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

A framework to transform from GraphQL SDL to AWS CloudFormation.

  • 2.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
10
Created

What is @aws-amplify/graphql-transformer-core?

@aws-amplify/graphql-transformer-core is a core library used in the AWS Amplify framework to transform GraphQL schemas into a set of AWS resources. It allows developers to define their data models using GraphQL schema language and automatically generate the necessary infrastructure to support those models in AWS.

What are @aws-amplify/graphql-transformer-core's main functionalities?

Schema Transformation

This feature allows you to transform a GraphQL schema into a set of AWS CloudFormation templates. The code sample demonstrates how to use the GraphQLTransform class to process a simple GraphQL schema.

const { GraphQLTransform } = require('@aws-amplify/graphql-transformer-core');
const schema = `
  type Post @model {
    id: ID!
    title: String!
    content: String
  }
`;
const transformer = new GraphQLTransform({
  transformers: [] // Add specific transformers here
});
const out = transformer.transform(schema);
console.log(out);

Custom Transformers

Developers can create custom transformers to extend the functionality of the schema transformation process. The code sample shows a basic structure of a custom transformer with before and after hooks.

class CustomTransformer {
  constructor() {
    // Initialization code
  }
  before(ctx) {
    // Code to run before transformation
  }
  after(ctx) {
    // Code to run after transformation
  }
}

const transformer = new GraphQLTransform({
  transformers: [new CustomTransformer()]
});

Other packages similar to @aws-amplify/graphql-transformer-core

Keywords

FAQs

Package last updated on 20 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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