Would be awesome! Thanks for answering <@UCC28J4DT...
# orm-help
e
Would be awesome! Thanks for answering @catalinmiron In the meantime I am continuing researching more about NodeJS maybe I will then have a clearer understanding since as said I am just getting started with backend development and web development in general(coming from native iOS Development using Swift and a little backend development (REST APIs) but with Vapor which uses Swift )
a
2 sandboxes to see the difference between REST & GraphQL:
^- REST API
^- GraphQL API with the same content
GraphQL is a specification created by Facebook. Several organizations have implemented GraphQL servers. One example GraphQL Server is “GraphQL Yoga” (which was created by the Prisma team)
However, this server by itself has shortcomings. Namely: when trying to communicate with data stored in a database.
The “Prisma Engine” (feature splash page: https://www.prisma.io/features/query-engine/) sits in the middle between your NodeJS service and the database where your data is stored.
As shown on the prisma home page, instead of needing to implement your own SQL Queries, Prisma generates them for you dynamically.
localhost:4000 == your node js service
localhost:4466 == prisma engine, which connects your node.js service to the database
notice how there’s only one query in localhost:4000 (allFoos). That query is defined in code here:
Copy code
const resolvers = {
  Query: {
    allFoos: (parent, args, ctx, info) => {
      const where = args.name
        ? {
            name_contains: args.name
          }
        : {};
      return ctx.db.query.foos({ where }, info);
    }
  }
};
Meanwhile, all of the queries listed in 4466 (right hand side of the screen) are generated by Prisma for you automatically. These queries are generated for you via prisma deploy
@nilan did i miss anything major ?
e
Hey @alechp, thanks for your effort to explain me this! I understand now that prisma.io is for making it easier for me to work with database while creating my GraphQL Server, auto generate certain code for me to make me work more efficient, There is one thing I still don't understand it is the feature "Data Modeling" Isn't that anyways the way how GraphQL is being written? What does this feature do additionally for me
a