Hello there, So I finished my course of GraphQL + ...
# orm-help
t
Hello there, So I finished my course of GraphQL + Prisma + Postgres, and I don’t know if I am ready to change NodeJS + Mongoose + MongoDB… to GraphQL + Prisma. Because my job is related to Web API and offline API, and when I use GraphQL I have to write the NodeJS layer yet, so why should I use ? I think the only positive point, it is because I can fetch all data that I need in just one request, is it really an advantage that makes me change how I work ? I am confused ? What do you think about it ?
h
So I guess you are having a REST api right now? If you are fine with mongodb, there is no reason to switch to prisma+postgres. Prisma is an abstraction layer on databases just like mongoose. Changing to prisma can be the very last step in switching to Graphql.
If you have a graphql server, you can fetch data directly with apollo client with out translating to an http get request by hand. You can search for tutorials in how to start with apollo. It really make your code cleaner and more in sync with your backend code because Graphql forces you to type your queries.
👍 1
t
Yes, thanks for the help! I found this url, 4 ways to fetch data from GraphQL… Apollo-fetch is a good solution in my APIs https://blog.apollographql.com/4-simple-ways-to-call-a-graphql-api-a6807bcdb355