All Projects → flogy → graphql-ttl-transformer

flogy / graphql-ttl-transformer

Licence: MIT license
♻ Enable DynamoDB's time-to-live feature to auto-delete old entries in your AWS Amplify API!

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to graphql-ttl-transformer

photo-sharing-website
Static pre-rendered photo-sharing website
Stars: ✭ 33 (-56%)
Mutual labels:  dynamodb, amplify, amplify-cli
amplify-nuxt
Video series code for how to setup AWS Amplify with a Nuxt project
Stars: ✭ 27 (-64%)
Mutual labels:  amplify, aws-amplify
amazon-ivs-chime-messaging-ugc-demo
This demo is designed to educate people who want to build live streaming platform with chatting feature. This demo is implemented using Amplify with Amazon IVS, ChimeSDK Messaging.
Stars: ✭ 20 (-73.33%)
Mutual labels:  amplify, amplify-cli
aws-appsync-iot-core-realtime-dashboard
This sample application demonstrates a React based web dashboard receiving real-time updates from IoT sensors. The solution is built with AWS AppSync, AWS Amplify, Amazon Location Service, and AWS IoT Core technologies.
Stars: ✭ 75 (+0%)
Mutual labels:  dynamodb, amplify
cognito-amplify-custom-auth
A React/Redux web application that implements a custom UI for Cognito Userpool Auth using AWS Amplify
Stars: ✭ 27 (-64%)
Mutual labels:  amplify, aws-amplify
This Or That
This or that - Real-time atomic voting app built with AWS Amplify
Stars: ✭ 87 (+16%)
Mutual labels:  dynamodb, aws-amplify
basic-serverless-api
A basic full stack example of building an API with AWS Amplify, Amazon API Gateway, AWS Lambda, and Amazon DynamoDB
Stars: ✭ 45 (-40%)
Mutual labels:  dynamodb, aws-amplify
amplify-codegen-ui
Generate React components for use in an AWS Amplify project.
Stars: ✭ 14 (-81.33%)
Mutual labels:  amplify, aws-amplify
Aws Amplify Ecommerce
Learn how to integrate AWS Amplify and Amazon Pinpoint to create a retail website. You use the event data that's generated by customers activities on your site to send custom-tailored emails, creating a curated, omnichannel experience.
Stars: ✭ 71 (-5.33%)
Mutual labels:  dynamodb, aws-amplify
Aws Mobile React Sample
A React Starter App that displays how web developers can integrate their front end with AWS on the backend. The App interacts with AWS Cognito, API Gateway, Lambda and DynamoDB on the backend.
Stars: ✭ 650 (+766.67%)
Mutual labels:  dynamodb, aws-amplify
Aws Mobile Appsync Chat Starter Angular
GraphQL starter progressive web application (PWA) with Realtime and Offline functionality using AWS AppSync
Stars: ✭ 449 (+498.67%)
Mutual labels:  dynamodb, aws-amplify
Amplify Photo Sharing Workshop
Building full-stack cloud apps with AWS Amplify and React
Stars: ✭ 143 (+90.67%)
Mutual labels:  dynamodb, aws-amplify
Graphql Recipes
A list of GraphQL recipes that, when used with the Amplify CLI, will deploy an entire AWS AppSync GraphQL backend.
Stars: ✭ 137 (+82.67%)
Mutual labels:  dynamodb, aws-amplify
Aws Mobile React Native Starter
AWS Mobile React Native Starter App https://aws.amazon.com/mobile
Stars: ✭ 2,247 (+2896%)
Mutual labels:  dynamodb, aws-amplify
movies-dynamodb-lambda
Simple Serverless API in Node.JS with AWS Lambda, DynamoDB & API Gateway
Stars: ✭ 27 (-64%)
Mutual labels:  dynamodb
transilator
Text translation and synthesization Chrome plugin
Stars: ✭ 44 (-41.33%)
Mutual labels:  aws-amplify
dynamodb-manager
A Dynamodb admin & manager GUI for DynamoDB Local and remote.
Stars: ✭ 114 (+52%)
Mutual labels:  dynamodb
ecommerce-shopfront-on-aws
A high availability, API-first reference architecture for ecommerce using AWS services
Stars: ✭ 56 (-25.33%)
Mutual labels:  aws-amplify
CloudFrontier
Monitor the internet attack surface of various public cloud environments. Currently supports AWS, GCP, Azure, DigitalOcean and Oracle Cloud.
Stars: ✭ 102 (+36%)
Mutual labels:  dynamodb
aws-pdf-textract-pipeline
🔍 Data pipeline for crawling PDFs from the Web and transforming their contents into structured data using AWS textract. Built with AWS CDK + TypeScript
Stars: ✭ 141 (+88%)
Mutual labels:  dynamodb

Enable DynamoDB's time-to-live feature to auto-delete old entries in your AWS Amplify API!

graphql-ttl-transformer

Pull requests are welcome! npm GitHub license

Installation

npm install --save graphql-ttl-transformer

For projects using the old GraphQL Transformer v1 run:

npm install --save graphql-ttl-transformer@1

How to use

Setup custom transformer

Edit amplify/backend/api/<YOUR_API>/transform.conf.json and append "graphql-ttl-transformer" to the transformers field.

"transformers": [
    "graphql-ttl-transformer"
]

Use @ttl directive

Append @ttl to target fields.

type ExpiringChatMessage @model {
  id: ID!
  message: String
  expirationUnixTime: AWSTimestamp! @ttl
}

It is important that the field you use the directive is of type AWSTimestamp (recommended) or Int, as the expiration timestamp must be in Unix time format.

Contribute 🦸

Contributions are more than welcome! I love how AWS Amplify helps us developers building great apps in a short time. That's why I'd like to give back with contributions like this. If you feel the same and would like to join me in this project it would be awesome to get in touch! 😊

Please feel free to create, comment and of course solve some of the issues. To get started you can also go for the easier issues marked with the good first issue label if you like.

Development

  1. Clone this repository and open it in your code editor.
  2. Run npm link in the cloned project directory and npm link graphql-ttl-transformer in your test project where you want to use it. Maybe you'll have to uninstall the previously installed dependency as installed from NPM repository.
  3. Run npm start in your cloned project directory. Every code change is now immediately used in your test project, so you can just modify code and test it using amplify codegen models or amplify push.

Hint: It is important to always make sure the version of the installed graphql dependency matches the graphql version the graphql-transformer-core depends on.

Publish new NPM package version

  1. Make sure version number is updated.
  2. Run npm publish.
  3. Create new release in GitHub including a tag.

License

The MIT License

Credits

The graphql-ttl-transformer library is maintained and sponsored by the Swiss web and mobile app development company Florian Gyger Software.

If this library saved you some time and money please consider sponsoring me, so I can build more libraries for free and actively maintain them for you. Thank you 🙏

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].