包详细信息

@aws-amplify/graphql-model-transformer

aws-amplify449.8kApache-2.03.3.1

Amplify graphql @model transformer

graphql, cloudformation, aws, amplify

自述文件

GraphQL @model Transformer

Reference Documentation

@model

Object types that are annotated with @model are top level entities in the generated API. Objects annotated with @model are stored in DynamoDB and are capable of being protected via @auth, related to other objects via @connection, and streamed via @searchable.

Definition

directive @model(queries: ModelQueryMap, mutations: ModelMutationMap) on OBJECT
input ModelMutationMap {
  create: String
  update: String
  delete: String
}
input ModelQueryMap {
  get: String
  list: String
}

Usage

Define a GraphQL object type and annotate it with the @model directive to store objects of that type in DynamoDB and automatically configure CRUDL queries and mutations.

type Post @model {
  id: ID! # id: ID! is a required attribute.
  title: String!
  tags: [String!]!
}

You may also override the names of any generated queries and mutations as well as remove operations entirely.

type Post @model(queries: { get: "post" }, mutations: null) {
  id: ID!
  title: String!
  tags: [String!]!
}

This would create and configure a single query field post(id: ID!): Post and no mutation fields.

@auth

Object types that are annotated with @auth are protected by one of the supported authorization strategies. Types that are annotated with @auth must also be annotated with @model.

Definition

# When applied to a type, augments the application with
# owner and group based authorization rules.
directive @auth(rules: [AuthRule!]!) on OBJECT

input AuthRule {
  allow: AuthStrategy!
  ownerField: String = "owner"
  identityField: String = "username"
  groupsField: String
  groups: [String]
  queries: [ModelQuery]
  mutations: [ModelMutation]
}
enum AuthStrategy {
  owner
  groups
}
enum ModelQuery {
  get
  list
}
enum ModelMutation {
  create
  update
  delete
}

Authorization Strategies

Owner Authorization
# The simplest case
type Post @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  title: String!
}

# The long form way
type Post @model @auth(rules: [{ allow: owner, ownerField: "owner", mutations: [create, update, delete], queries: [get, list] }]) {
  id: ID!
  title: String!
  owner: String
}

Owner authorization specifies that a user (or set of user's) can access an object. To do so, each object has an ownerField (by default "owner") that stores ownership information and is verified in various ways during resolver execution.

You may use the queries and mutations arguments to specify which operations are augmented:

get: If the record's owner is not the same as the logged in user (via $ctx.identity.username), throw $util.unauthorized(). list: Filter $ctx.result.items for owned items. create: Inject the logged in user's $ctx.identity.username as the ownerField automatically. update: Add conditional update that checks the stored ownerField is the same as $ctx.identity.username. delete: Add conditional update that checks the stored ownerField is the same as $ctx.identity.username.

IN PROGRESS

# TODO: (WORK IN PROGRESS) Does not yet support multi-owner
type Post @model @auth(rules: [{ allow: owner, ownerField: "owners", mutations: [create, update, delete], queries: [get, list] }]) {
  id: ID!
  title: String!
  owners: [String]
}
Group Authorization

Static Group Auth

# Static group auth
type Post @model @auth(rules: [{ allow: groups, groups: ["Admin"] }]) {
  id: ID!
  title: String
}

If the user credential (as specified by the resolver's $ctx.identity) is not enrolled in the Admin group, throw an unauthorized error via $util.unauthorized().

Dynamic Group Auth

# Dynamic group auth with multiple groups
type Post @model @auth(rules: [{ allow: groups, groupsField: "groups" }]) {
  id: ID!
  title: String
  groups: [String]
}

# Dynamic group auth with a single group
type Post @model @auth(rules: [{ allow: groups, groupsField: "group" }]) {
  id: ID!
  title: String
  group: String
}

With dynamic group authorization, each record contains an attribute specifying what groups should be able to access it. Use the groupsField argument to specify which attribute in the underlying data store holds this group information. To specify that a single group should have access use a field of type String. To specify that multiple groups should have access use a field of type [String].

@connection

The @connection directive allows you to specify relationships between @model object types. Currently this supports one-to-one, one-to-many, and many-to-one relationships. An error will be thrown when trying to configure a many-to-many relationship.

Definition

directive @connection(name: String) on FIELD_DEFINITION

Usage

Relationships are specified by annotating fields on an @model object type with the @connection directive.

Unnamed Connections

In the simplest case, you may define a one-to-one connection:

type Project @model {
  id: ID!
  name: String
  team: Team @connection
}
type Team @model {
  id: ID!
  name: String!
}

Once transformed you would then be able to create projects with a team via:

mutation CreateProject {
  createProject(input: { name: "New Project", projectTeamId: "a-team-id" }) {
    id
    name
    team {
      id
      name
    }
  }
}

Note: The Project.team resolver will be preconfigured to work with the defined connection.

Likewise you may make a simple one-to-many connection:

type Post {
  id: ID!
  title: String!
  comments: [Comment] @connection
}
type Comment {
  id: ID!
  content: String!
}

One transformed, you would create comments with a post via:

mutation CreateCommentOnPost {
  createComment(input: { content: "A comment", postCommentsId: "a-post-id" }) {
    id
    content
  }
}

Note: The "postCommentsId" field on the input may seem like a strange name and it is. In the one-to-many case without a provided "name" argument there is only partial information to work with resulting in the strange name. To fix this, provide a value for the @connection's name argument and complete the bi-directional relationship by adding a corresponding @connection field to the Comment type.

Named Connections

The name arguments specifies a name for the connection and is used to create bi-directional relationships that reference the same underlying foreign key.

For example, if you wanted your Post.comments and Comment.post fields to refer to opposite sides of the same relationship you would provide a name.

type Post @model {
  id: ID!
  title: String!
  comments: [Comment] @connection(name: "PostComments")
}
type Comment @model {
  id: ID!
  content: String!
  post: Post @connection(name: "PostComments")
}

One transformed, you would create comments with a post via:

mutation CreateCommentOnPost {
  createComment(input: { content: "A comment", commentPostId: "a-post-id" }) {
    id
    content
    post {
      id
      title
      comments {
        id
        # and so on...
      }
    }
  }
}

Performance

In order to keep connection queries fast and efficient, the graphql transform manages GSIs on the generated tables on your behalf. We bake in best practices to keep your queries efficient but this also comes with additional cost.

@searchable

The @searchable directive handles streaming the data of an @model object type and configures search resolvers that search that information.

Definition

# Streams data from dynamodb into opensearch and exposes search capabilities.
directive @searchable(queries: SearchableQueryMap) on OBJECT
input SearchableQueryMap {
  search: String
}

What is the Amplify GraphQL Transform

The Amplify GraphQL Transform is a set of libraries committed to simplifying the process of developing, deploying, and maintaining APIs on AWS. With it, you define your API using the GraphQL Schema Definition Language (SDL) and then pass it to this library where it is expanded and transformed into a fully descriptive cloudformation template that implements your API's data model.

For example, you might define the data model for an app like this:

type Blog @model @searchable {
  id: ID!
  name: String!
  posts: [Post] @connection(name: "BlogPosts")
}
type Post @model @searchable {
  id: ID!
  title: String!
  tags: [String]
  blog: Blog @connection(name: "BlogPosts")
  comments: [Comment] @connection
  createdAt: String
  updatedAt: String
}
type Comment @model {
  id: ID!
  content: String!
}

And then pass the schema to an instance of the GraphQLTransform class with the DynamoDB, @searchable, and Connection transformers enabled:

import GraphQLTransform from 'graphql-transformer-core';
import AppSyncDynamoDBTransformer from 'graphql-dynamodb-transformer';
import SearchableModelTransformer from 'amplify-graphql-searchable-transformer';
import AppSyncConnectionTransformer from 'graphql-connection-transformer';
import AppSyncAuthTransformer from 'graphql-auth-transformer';

const transformer = new GraphQLTransform({
  transformers: [
    new AppSyncDynamoDBTransformer(),
    new SearchableModelTransformer(),
    new AppSyncAuthTransformer(),
    new AppSyncConnectionTransformer(),
  ],
});
const cfdoc = transformer.transform(schema.readSync());
const out = await createStack(cfdoc, name, region);
console.log('Application creation successfully started. It may take a few minutes to finish.');

The GraphQLTransform class implements a single transform() function that when invoked parses the document, walks the AST, and when a directive such as @model is found invokes any relevant transformers. In this case the transformers were defined for you but the code is structured to make writing custom transformers as simple as possible. The output of the above code is a full CloudFormation document that defines DynamoDB tables, an OpenSearch cluster, a lambda function to stream from DynamoDB -> OpenSearch, an AppSync API, AppSync data sources, CRUD resolvers (create, update, delete, get, list, search), resolvers that implement connections between types stored in different DynamoDB tables, a number of minimally scoped IAM roles,

GraphQL Transform Libraries

The code is contained in a mono-repo that includes a number of packages that are related to the transform and a number of packages that are not. The related packages are broken up as follows

graphql-transform

The package contains the core of the library and acts as the entry point to the transform. The core class GraphQLTransform takes as config a list of transformers and handles the logic that parses the input SDL, walks the AST, and routes directives to transformers.

graphql-dynamodb-transformer

This package implements a number of directives that deal with DynamoDB. Out of the box, this implements the @model and connection directives.

amplify-graphql-searchable-transformer

This package implements any directives that deal with OpenSearch. Out of the box, this implements the @searchable directive.

graphql-auth-transformer

This package implements any directives related to authN or authZ workflows. Out of the box, it configures an Amazon Cognito UserPool and implements the @auth directive.

graphql-transformer-e2e-tests

This pacakge implements end-to-end tests for the transform libraries. It builds an API with the transform, deploys it via CloudFormation, and hits the AppSync data plane to test all generated code paths.

graphql-mapping-template

This package provides a lightweight wrapper around the AppSync Resolver VTL and is used by transformer libraries as a convenience.

Prerequisites

npm install -g lerna
npm install -g yarn

Installing

Install the dependencies

lerna bootstrap

And build

lerna run build

Running the tests

Tests are written with jest and can be run for all packages with

lerna run test

Alternatively, there are some debug configurations defined in .vscode/launch.json you can use Visual Studio code to add debug breakpoints to debug the code.

Contributing

TODO

Versioning

TODO

License

This project is licensed under the MIT License - see the LICENSE.md file for details

更新日志

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

3.3.1 (2025-06-09)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.3.0 (2025-04-17)

Features

  • add grantStreamRead to amplify managed table (#3253) (d5e9428)

3.2.2 (2025-04-09)

Bug Fixes

  • handle ContinuousBackupsUnavailableException in updateContinuousBackups when RequestType is 'Create' (#3203) (99fdf46)

Reverts

3.2.1 (2025-03-06)

Bug Fixes

  • use aws owned key as default for ddb sse (#3197) (14e5d54)

3.2.0 (2025-02-26)

Features

3.1.6 (2025-02-07)

Bug Fixes

  • improve migration import error message (#3140) (e0f0b60)
  • sort table description properties before comparing (#3144) (513e649)

3.1.5 (2025-01-30)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.1.4 (2025-01-16)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.1.3 (2024-12-23)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.1.2 (2024-12-17)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.1.1 (2024-11-14)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.1.0 (2024-11-08)

Features

  • add imported DDB tables for gen 2 migration in experimental state (#2992) (0c415b3)

3.0.7 (2024-10-28)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.0.6 (2024-10-17)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.0.5 (2024-10-10)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.0.4 (2024-10-01)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.0.3 (2024-09-16)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.0.2 (2024-09-06)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.0.1 (2024-08-28)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

3.0.0 (2024-08-20)

  • feat!: bump version for v2 transformer packages (7dac35c)

BREAKING CHANGES

  • distinguish from LTS version

2.11.4 (2024-08-12)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.11.3 (2024-07-25)

Bug Fixes

2.11.2 (2024-07-15)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.11.1 (2024-07-02)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.11.0 (2024-07-01)

Bug Fixes

  • auth to use validateUsingSource in place of auth filter to show error message (#2523) (b7d83f9)

Features

  • support custom SSL certs in SQL lambda handler (#2631) (f444517)

2.10.2 (2024-06-25)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.10.1 (2024-05-15)

Bug Fixes

  • api: handle attribute type change on gsi (#2542) (f0a4709)

2.10.0 (2024-05-10)

Features

2.9.1 (2024-05-01)

Bug Fixes

  • graphql-relational-transformer: nullability enforcement for references relational fields (#2510) (d540097)
  • set installLatestAwsSdk on AwsCustomResource to false (#2509) (53665c0)

Performance Improvements

  • graphql-model-transformer: minimal provider framework and inline policies (#2490) (a86c816)

2.9.0 (2024-04-26)

Bug Fixes

  • add non-scalar and array fields to SQL relations (#2501) (511f020)
  • auto generated id when timestamps: null (#2470) (936a4f9)

Features

2.8.0 (2024-04-11)

Bug Fixes

  • amplify-table: describe ttl rate limit (#2410) (0d2ea6a)
  • remove null timestamp fields from filter input (#2435) (045ece2)

Features

2.7.0 (2024-03-28)

Features

  • add secrets manager as credential store for sql lambda (#2289) (affdb98)

2.6.0 (2024-03-13)

Features

  • expose table representative & access refactor for amplify managed table in api construct (8777cd1)

2.5.0 (2024-02-28)

Features

2.4.5 (2024-02-05)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.4.4 (2024-01-30)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.4.3 (2024-01-22)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.4.2 (2023-12-18)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.4.1 (2023-12-14)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.4.0 (2023-12-06)

Features

2.3.3 (2023-11-22)

Bug Fixes

  • Allow custom SQL statements without model declarations (#2087) (ea5b26c)

2.3.2 (2023-11-18)

Bug Fixes

  • regionalize lambda layer patching SNS topics (#2079) (6006c86)

2.3.1 (2023-11-16)

Bug Fixes

2.3.0 (2023-11-15)

Bug Fixes

  • address managed table QA feedbacks (#2059) (82a5cd6)
  • api: make id optional if not a string type (48ecac0)
  • Change 'rds' to 'sql' in public-facing symbols (#2069) (ff374dd)

Features

  • add debug mode env variable (0d2f177)
  • add managed table support in API construct (#2024) (96a0d94), closes #1849 #1903 #1940 #1971 #1973
  • add postgres engine and update types as needed (#1979) (5257d53)
  • add refersTo directive transformer for model renaming (#1830) (afbd6f2)
  • Add SQL database support to AmplifyGraphqlApi construct (#1986) (2ff63a5), closes #1917 #1983
  • api: add arrays and objects support for rds datasource (cbfb017)
  • api: add vpc endpoints for ssm (5a4ffc4)
  • api: custom queries support using sql directive (5214037)
  • api: rds auth model level rules (d2b0217)
  • refersTo supports field name mappings on RDS models (#1865) (ee60011)
  • sql lambda provisioned concurrency (#2055) (d8c5bf0)
  • transformer behavior of replacing table upon gsi updates (#2067) (c4b7530)

2.2.4 (2023-11-02)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.2.3 (2023-10-12)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.2.2 (2023-10-05)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.2.1 (2023-10-02)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.2.0 (2023-09-20)

Features

  • disable amplify cfn outputs for cdk apps (0c72d18)

2.1.3 (2023-09-07)

Bug Fixes

  • npm publish ignore tests and lambdas sources (e1411cd)

2.1.2 (2023-08-30)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.1.1 (2023-08-28)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

2.1.0 (2023-08-09)

Features

  • bump major version of transformer packages (2458c84)

1.4.0 (2023-07-21)

Bug Fixes

  • api: add delay to rds patching (3785b8e)

Features

  • graphql: patching rds lambda layer (a751fcb)
  • graphql: pull rds latest layer (8325ef5)
  • graphql: vpc support for sql lambda (9cc4407)

1.3.8 (2023-07-17)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

1.3.7 (2023-07-07)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

1.3.6 (2023-07-07)

Bug Fixes

1.3.5 (2023-07-07)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

1.3.4 (2023-06-29)

Bug Fixes

  • handling of all floating promises (#1577) (d5981b2)
  • use addDependency instead of addDependsOn (7fd1333)

1.3.3 (2023-06-20)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

1.3.2 (2023-06-05)

Bug Fixes

  • graphql: renamed subscription should generate auth resolver (bbf3998)

1.3.1 (2023-05-23)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

1.3.0 (2023-05-17)

Bug Fixes

  • auth: ownerfield as pk in relational models (#1389) (20a38bd)
  • graphql: import rds errors due to primary key and index (dbb8efe)
  • graphql: index rds query (73389da)
  • graphql: make ids on nested non-model types required (#1429) (219884d)
  • PR feedback, windows build fix (5a3f9cc)
  • rds v2 e2e tests (f0f344d)
  • update lambda to get db details from ssm (4e3d10b)

Features

  • add RDS primary key transformer (b6cd813)
  • datastore-filters: add filters for DataStore _deleted property (9812083)

1.2.1 (2023-04-25)

Bug Fixes

  • auth: ownerfield as pk in relational models (#1389) (9b636f7)

1.2.0 (2023-03-30)

Features

1.1.1 (2023-03-15)

Bug Fixes

  • cascaded embeddable type input is respected by the GraphQL Model Transformer (bd34a3f)

1.1.0 (2023-03-01)

Bug Fixes

  • error in transformers if override has never been setup (#1270) (bba14c3)
  • lock CDK v2 version (#923) (2afe40c)
  • preserve logical id patterns for dynamodb tables and search domain (#894) (7530fc2)

Features

  • migrate index and model transformers to CDK v2 (#860) (886ab6c)

1.1.0-beta.6 (2023-02-21)

Bug Fixes

  • error in transformers if override has never been setup (#1270) (bba14c3)
  • lock CDK v2 version (#923) (2afe40c)
  • preserve logical id patterns for dynamodb tables and search domain (#894) (7530fc2)

Features

  • migrate index and model transformers to CDK v2 (#860) (886ab6c)

1.1.0-beta.5 (2023-02-15)

Bug Fixes

  • lock CDK v2 version (#923) (2afe40c)
  • preserve logical id patterns for dynamodb tables and search domain (#894) (7530fc2)

Features

  • migrate index and model transformers to CDK v2 (#860) (886ab6c)

1.1.0-beta.4 (2023-02-03)

Bug Fixes

  • lock CDK v2 version (#923) (2afe40c)
  • preserve logical id patterns for dynamodb tables and search domain (#894) (7530fc2)

Features

  • migrate index and model transformers to CDK v2 (#860) (886ab6c)

1.1.0-beta.3 (2022-12-27)

Bug Fixes

  • lock CDK v2 version (#923) (2afe40c)
  • preserve logical id patterns for dynamodb tables and search domain (#894) (7530fc2)

Features

  • migrate index and model transformers to CDK v2 (#860) (886ab6c)

1.1.0-beta.2 (2022-12-12)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

1.1.0-beta.1 (2022-11-30)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

1.1.0-beta.0 (2022-11-18)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

1.1.0-cdkv2.2 (2022-11-15)

Bug Fixes

  • lock CDK v2 version (#923) (2afe40c)
  • preserve logical id patterns for dynamodb tables and search domain (#894) (7530fc2)

Features

  • migrate index and model transformers to CDK v2 (#860) (886ab6c)

1.1.0-cdkv2.1 (2022-10-24)

Bug Fixes

1.1.0-cdkv2.0 (2022-10-24)

Bug Fixes

  • preserve logical id patterns for dynamodb tables and search domain (#894) (7530fc2)

Features

  • migrate index and model transformers to CDK v2 (#860) (886ab6c)

0.16.9 (2023-02-27)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.16.8 (2023-02-10)

Bug Fixes

  • transformer: conflict detection respects to per model rule (#1201) (9fd7e16)

0.16.7 (2023-01-26)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.16.6 (2023-01-12)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.16.5 (2023-01-12)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.16.4 (2022-12-03)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.16.3 (2022-11-08)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.16.2 (2022-10-26)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.16.1 (2022-10-24)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.16.0 (2022-10-04)

Features

0.15.7 (2022-09-14)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.15.6 (2022-08-23)

Reverts

  • Revert "Undo change to directive merge that broke tests" (#756) (3da2ce6), closes #756

0.15.5 (2022-08-16)

Bug Fixes

  • set cfn values correctly when applying lambda-based conflict resolution (4542759)

0.15.4 (2022-08-04)

Bug Fixes

  • graphql: revert subscriptions server-side filtering (20cffc0)

0.15.3 (2022-07-26)

Bug Fixes

  • graphql: incorrect filter expression on model transformer (#697) (a6fc3be)

0.15.2 (2022-07-20)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.15.1 (2022-07-14)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.15.0 (2022-07-01)

Features

  • graphql: add runtime filtering support for subscriptions (#551) (0a24bb0)

0.14.6 (2022-06-23)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.14.5 (2022-06-13)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.14.4 (2022-06-10)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.14.3 (2022-06-07)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.14.2 (2022-05-31)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.14.1 (2022-05-02)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.14.0 (2022-04-29)

Features

0.13.6 (2022-04-27)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.13.5 (2022-04-18)

Bug Fixes

  • graphql-model-transformer: fix create mutation when index field is null (#10073) (1e9d140)

0.13.4 (2022-04-07)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.13.3 (2022-03-23)

Bug Fixes

  • graphql: avoid static datastructures in gql transform (#10006) (cd73fdd)

0.13.2 (2022-02-25)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.13.1 (2022-02-15)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.13.0 (2022-01-31)

7.6.14 (2022-01-28)

Features

  • [@maps](https://github.com/maps)To directive to enable renaming models while retaining data (#9340) (aedf45d)

0.10.8 (2022-01-27)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.10.7 (2022-01-20)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.10.6 (2022-01-13)

Bug Fixes

  • clean up missing and unused GraphQL v2 dependencies (#9486) (a6ca44e)
  • use StackMapping for V2 resolvers (#9238) (d354e78)

0.10.5 (2022-01-10)

7.6.7 (2022-01-10)

Bug Fixes

  • graphql-model-transformer: add id field to update input objects (#9276) (45cd973)
  • graphql: correct typo filterExpression on v2 resolvers (#9412) (71bf468)
  • make update input id field required (#9452) (345fe28)

0.10.3 (2021-12-21)

Bug Fixes

  • generate list types will nullable elements (#9310) (e972956)
  • graphql-model-transformer: @aws_lambda GQL transformer pass through directive list (#9231) (25f0c9d)
  • handle strings as custom subscription names (#9210) (7b068c6)

0.10.2 (2021-12-17)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.10.1 (2021-12-03)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.10.0 (2021-11-23)

Features

0.9.4 (2021-11-21)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.9.3 (2021-11-19)

Bug Fixes

  • graphql-default-value-transformer: support for @default directive for required fields (#8906) (dc0179d)

0.9.2 (2021-11-17)

Bug Fixes

  • append apiKey if global auth is enabled and its not default auth (#8843) (3aadcde)
  • passing ddb params from root to nested model stacks (#8766) (7124cc0)

0.9.1 (2021-11-15)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.7.0 (2021-11-11)

Bug Fixes

  • datastore logical id (#8761) (e86cbb9)
  • graphql-model-transformer: fixed model transformer ID generation when ID field is not specified (#8633) (b515d16)
  • graphql-model-transformer: override resource logical id to fix v1 to v2 transformer migration (#8597) (e3a2afb)
  • graphql-model-transformer: subscription resolver logical id fix (#8712) (f562f37)
  • move @model params to root stack and fix ds logical id (#8736) (df4408c)
  • override none,DDB,lambda datasource logical IDs (#8723) (c534dc4)

Features

0.6.4 (2021-10-10)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.6.3 (2021-09-27)

Bug Fixes

  • graphql-model-transformer: @model conflict resolution (#8035) (f3bdc4a)
  • graphql-model-transformer: iam role name does not exceed 64 characters (#8244) (812a671)
  • graphql-model-transformer: remove unnecessary warnings for resolver config per type (#8265) (2f2f0a5)

0.6.2 (2021-09-14)

Bug Fixes

  • graphql-model-transformer: fix typo in print block (#8152) (7377e58)

0.6.1 (2021-09-02)

Bug Fixes

  • add model transformer v2 e2e tests (#7946) (351a8bc)
  • model transformer support condition (#7935) (fc93dba)
  • update and create input field type known model types filtering (#7929) (16334f7)

0.6.0 (2021-08-24)

Bug Fixes

  • graphql-model-transformer: added @model name reserved words validation (#7877) (781ddbb)

Features

0.5.1 (2021-08-06)

Bug Fixes

0.5.0 (2021-07-30)

Features

  • capability injection for the vNext GraphQL Transformer (#7735) (f3eae13)

0.4.6 (2021-07-27)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.4.5 (2021-07-16)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.4.4 (2021-07-12)

Bug Fixes

  • get mock working with gql transformer v2 (#7574) (4fa2900)

0.4.3 (2021-06-30)

Bug Fixes

  • update DDB data source name in gql transformer v2 (#7443) (7abe3bd)

0.4.2 (2021-06-24)

Bug Fixes

0.4.1 (2021-05-26)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.4.0 (2021-05-18)

Features

0.3.6 (2021-05-03)

4.50.1 (2021-05-03)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.3.5 (2021-05-03)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.3.4 (2021-03-05)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.3.3 (2021-02-26)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.3.2 (2021-02-11)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.3.1 (2021-02-10)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.3.0 (2020-12-11)

Features

0.2.1 (2020-11-22)

Note: Version bump only for package @aws-amplify/graphql-model-transformer

0.2.0 (2020-11-22)

Features

0.1.0 (2020-11-08)

Features