I'm trying to use Jared Palmer's Razzle library fo...
# orm-help
j
I'm trying to use Jared Palmer's Razzle library for SSR in lieu of Next.js, but seems that I may not be able to with graphql-yoga. Has anyone out there tried this? Or had luck configuring Prisma with ApolloServer/apollo-server-express by any chance?
z
if you need help setting up nextjs with graphql let me know
j
thanks, @Zarazas I appreciate it. I'm gonna see if I can get Razzle up since it seems like a lot less bloat for react/apollo but I'll keep that in mind if I come crawling back
z
what do you mean by “a lot less bloat” ?
if you just want to use react and apollo you dont need any framework
but IMO nextjs is superior because Zeit is actively developing it and the whole community around is is much bigger
👍 1
j
I want SSR though. From what I've been able to gather so far Razzle takes care of it without having to learn as much as Next requires. Next is great and I'd probably stick with it if I had nothing else to try but I've had a lot of problems with Next and build glitches, changing routes etc and it really slows be down. Razzle seems to be more bare bones and give you more flexibility.
z
okay, good luck with it. Maybe you can report back or I will ask you in a couple of weeks how your experience was with razzle
j
Thanks! fwiw I agree next is a great solution. The combination provides literally the best of both worlds. But Razzle is inspired pretty directly from Next. Dan Abramov is a contributor so that's hopeful but you're right on the downfall being lack of documentation and high popularity. I'm still keeping my next project, but also just trying to have another version in Razzle to see if it's better. I find the architecture appealing; one package.json, one src folder, one node_modules folder, one .env file..
z
you have your backend and your frontend in one repo, or what do you mean with “one package.json …” with nextjs. you also just have one of everything
j
razzle has the one command build built-in, for the entire stack. one package.json file sits at the root and manages front and back. no npm installs in each respective folder. You don't need a .env file for the front and another for the back, so common elements can be shared without worrying about keeping them in sync. It's a small difference but I like the idea. and it seems to cut out the need for a /pages directory, which is also small but anything that helps increase organizational efficiency is appealing to me.