flogy / graphql-retain-transformer Goto Github PK
View Code? Open in Web Editor NEW๐จ Prevent losing production data by enabling the retain deletion policy for your AWS Amplify API!
License: MIT License
๐จ Prevent losing production data by enabling the retain deletion policy for your AWS Amplify API!
License: MIT License
๐ This is Rene from the AWS Amplify team! First off, THANK YOU for your amazing plugin!
I have some great news to share, we've rewritten the GraphQL Transformer plugin from the ground up to take advantage of some really amazing capabilities. All the details here: aws-amplify/amplify-cli#6217 (comment)
In order to make this plugin forward compatible with GraphQL Transformer v2, you need to make some tiny adjustments to the classes you inherit from. Migration steps here: https://gist.github.com/renebrandel/0b9537e2016e3dd9ed6d794b30b2e3f4
Happy to also hop on a call with you to walk you through the process. Email me at any time: renbran at amazon dot com
Hello, I'm having this error after npm installed the lib and added the @retain directive to my model:
An error occurred when pushing the resources to the cloud
๐ An error occurred during the push operation: /
ctx.getResource is not a function
Here is what I have done:
"transformers": [
"graphql-retain-transformer"
]
to transform.conf.json: the file is like that now:
{
"Version": 5,
"ElasticsearchWarning": true,
"ResolverConfig": {
"project": {
"ConflictHandler": "AUTOMERGE",
"ConflictDetection": "VERSION"
}
},
"transformers": [
"graphql-retain-transformer"
]
}
type Route @model @auth(rules: [{allow: public}]) @retain{
id: ID!
cost: Float
startTime: AWSTimestamp
endTime: AWSTimestamp
status: RouteStatus
name: String!
orders: [MpsOrder] @hasMany(indexName: "byRoute", fields: ["id"])
driver: Driver @hasOne
}
Error:
โ An error occurred when pushing the resources to the cloud
๐ An error occurred during the push operation: /
ctx.getResource is not a function
What I've done wrong, anyone else got this error before ?
Thank you!
hi
I've been searching through Github for as many graphql transformers for AppSync (an AWS Amplify) as I can find and came across this. Is there any chance you can expand on the readme to give more context about what this actualy does, why might I want to use it, what the implications are etc.
It sounds like a think I might find useful but there is just not quite enough info to know for sure :)
Cheers
Pete
Hi there,
Thanks a lot for this. This really should be part of Amplify core, but until then, this plugin has worked very well for us for about a month.
The biggest issue for us was figuring out how we install this package in the build process without installing our entire package.json which includes all our frontend packages.
We did a --no-save in the preBuild process and that worked without issues for a month or so, then just suddenly out of the blue it failed today.
How are you doing this? What's the cleanest way to do this where we are not spending build time on installing more than needed while still getting this package installed? If you have the golden solution here, then I would thank you by adding it to the README as a PR for this repository so others may have an easier time getting it set up. At the same time I may also add a bit of a Q&A that explains how DynamoDB reacts and handles this stuff.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.