» npm install @nestjs/graphql
What do you want to know GRAPHQL + NESTJS ?
GraphQL and NestJS
Is there a future for graphql?
Do you want to be a “Jr.” in two fields or get better in one? Being generalist is good but it means you will work in small companies where you have to do most of the stuff by yourself, but not enough time to learn any of it extensively. Finding a job is easier if you are experienced in one area while having some knowledge in the other as well.
I would learn more backend and devops now, and get more knowledge of the frontend along the way without focusing on it too much. Even you choose fullstack, you must choose what you want to focus: JavaScript or CSS (although you can and will do both at the same time, it takes time to learn both so again you will lack knowledge and experience in both).
Also focus on the skills that can make you a better programmer in general: testing, JavaScript/typescript, functional programming etc.
More on reddit.comIs it a good idea to use Nest.js and/or graphql for a serverless API?
Hello everyone !
TLDR; I'm considering using only Apollo without NestJs and I need your help for convincing myself not to.
Disclaimer
I love Nest and have been using it for quite a long time now for REST applications. I do understand and have already used some advanced features of the framework, but I do not have any expertise on the NestJs matter. There is a lot I might be missing here, hence this post. On the other side, I don't have any concrete experience with "just" Apollo, beside the months I spent coding this application and the days I spent on it's documentation.
Context
For the past 8 months, I have been working at my company in solo on our new GraphQL backend based on NestJs. We have a production grade system, including monitoring (separate logs application + sentry with performance tracing).
This backend, is like 98% GraphQL, and has 1 or 2 rest endpoints, for content that we didn't know how to stream over GraphQL we doing them. The point is, it could be full GraphQL with a bit of rework.
The question
I know that in my application, NestJs is based upon an Apollo middleware for express, so this made me question, why would I not use directly Apollo server to develop our backend ?
I do not feel comfortable with 3 layers of frameworks interacting together to power my GraphQL application and the whole thing seems a bit flaky. My biggest concerns are:
-
Error handling
This is just an example, but this (fixed) issue is a good recap of what I might fear on this point. In the end, I don't really know what errors are filtered and handled by, and where. There are two exception classes cohabitating, the one from Apollo and the one from NestJs, and this is, frankly, a mess in my code.
-
Sentry
We use Sentry, and I don't know how to properly integrate it. I want to integrate complex features, like providing a trace id on every request, or tracking performance during query and it's nested fields resolution. I ended up with a middleware for tracing, and an Apollo plugin for performance monitoring. Once again having to deal with two platforms made it a lot more complex.
I'm not gonna mention subscriptions, but in the end, it's lot of "Nest and Apollo conflict themselves on subject A, leading to flaky integrations for stuff A".
I'm not an expert in both, but I will need to come up with a decision quite shortly, some I'm asking for help or feedbacks from anyone who has already been in such a situation :)
Happy new year everyone, and many thanks for your help !