Code Monkey home page Code Monkey logo

graphql-retain-transformer's Introduction

graphql-retain-transformer's People

Contributors

flogy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

graphql-retain-transformer's Issues

Ready this transformer plugin for GraphQL Transformer v2

๐Ÿ‘‹ 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)

How to migrate your plugin to GraphQL Transformer v2

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

Can you explain more what this does and why I might need to use it?

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

Best practice on how to use in Amplify Console build process

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.

Error occurred during the push operation:

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:

  • run: npm install --save graphql-retain-transformer on the root folder of the project
  • added:
"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"
    ]
}
  • Added the retain directive to my model in graphql schema, the model is like this:
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
}
  • run: amplify push dev

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.