@aws-amplify/graphql-relational-transformer

Amplify GraphQL relational modeling transformers

Usage no npm install needed!

<script type="module">
  import awsAmplifyGraphqlRelationalTransformer from 'https://cdn.skypack.dev/@aws-amplify/graphql-relational-transformer';
</script>

README

GraphQL Relational Modeling Transformers

Reference Documentation

@hasOne

The @hasOne directive allows you to define "has one" relationships between data.

Definition

directive @hasOne(fields: [String!]) on FIELD_DEFINITION

@hasMany

The @hasMany directive allows you to define "has many" relationships between data.

Definition

directive @hasMany(indexName: String, fields: [String!], limit: Int = 100) on FIELD_DEFINITION

@belongsTo

The @belongsTo directive allows you to define "belongs to" relationships between data.

Definition

directive @belongsTo(fields: [String!]) on FIELD_DEFINITION

@manyToMany

The @manyToMany directive allows you to define "many to many" relationships between data.

Definition

directive @manyToMany(relationName: String!, limit: Int = 100) on FIELD_DEFINITION