Giter VIP home page Giter VIP logo

Comments (7)

jukkamarttinen avatar jukkamarttinen commented on June 15, 2024 1

What is the current status of this request?

from amplify-category-api.

cookmscott avatar cookmscott commented on June 15, 2024 1

@ashwindevendran, I've been scouring the internet looking for details of how to map connections for RDS in GraphQL + AppSync. I've added some feedback for the documentation which does not state that table relationships are not generated by the cli, even though the example includes customers with orders. It is rather confusing, and tbh what's the point in having a relational datastore if the relationships aren't honored in GraphQL! I think it would be AMAZING if the cli handled the relationships out of the box... because it's not clear how to set them up manually.

Edit: it looks like you just need to update or add your own resolvers (which honestly doesn't look that hard). I just think the documentation should mention that.

from amplify-category-api.

kaustavghosh06 avatar kaustavghosh06 commented on June 15, 2024

@danielphung90 You can modify the annotated graphql schema located in amplify/backend/api<api-name>/schema.graphql to link the types.

from amplify-category-api.

pmd30011991 avatar pmd30011991 commented on June 15, 2024

Yes I did modify in schema.graphql do I need to manually create the resolver files? For each linkage?

from amplify-category-api.

danielphung90 avatar danielphung90 commented on June 15, 2024

@danielphung90 You can modify the annotated graphql schema located in amplify/backend/api<api-name>/schema.graphql to link the types.

yeah which I did. but my main concern is: is there anyway to generate the resolvers and stacks base on schema.graphql. because after I generate the schema by using amplify api add-graphql-datasource then all the relationship become id: Int! what I want to do is link them without any change at resolver and stack part

Yes I did modify in schema.graphql do I need to manually create the resolver files? For each linkage?

@kaustavghosh06

from amplify-category-api.

ashwindevendran avatar ashwindevendran commented on June 15, 2024

@danielphung90 Currently there is no support for automatic generation of the RDS resolvers after the schema has been edited with relationships (I presume this is what you mean by linking types to one another). You can however manually create your own resolvers to handle relationships.

In the meantime we do recognize the benefits of generating the resolvers to handle relationship and so we will treat this as a feature request.

from amplify-category-api.

renebrandel avatar renebrandel commented on June 15, 2024

https://docs.amplify.aws/react/build-a-backend/graphqlapi/connect-api-to-existing-database/ you can now generate a GraphQL schema based on any MySQL/PostgreSQL database and also add relationship fields.

from amplify-category-api.

Related Issues (20)

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.