Graphback: Create Nest.js template

Created on 15 Nov 2020  路  22Comments  路  Source: aerogear/graphback

Graphback comes with number of templates (see repo templates directory.) Over the last month we seen increased demand to Nest.js framework and it wil.be good to be able to have some nest.js backend template

enhancement help wanted good first issue templates up for grabs

Most helpful comment

Mu suggestions on how to get started, in order:

  1. Play around with Graphback. Create a TODO application. Use graphback.dev to guide you
  2. Learn about Nest.js. Also create a TODO application.
  3. Use your knowledge learned to migrate your Nest.js TODO application to use Graphback

All 22 comments

/cc @craicoverflow, @machi1990
Automatically generated comment to notify maintainers

Hey @wtrocki! I'd like to work on this. I haven't used Nest.js before though so it might take me some time. The goal here is similar to the Fastify template right?

@RinkiyaKeDad Exactly. NestJS is the most top level framework giving developers opiniated layers on top of the express/or fastify. We could do it as separate template

Hey @wtrocki I'd like to work in this. I havent used Nest.js before though so it might take me some time..

We are working with @RinkiyaKeDad on community extensions that will enable adding templates outside repo. Having some Nest.js template added as separate repo would be amazing. We can help you with basics etc. Obviously we will still add some contribution to this repo in form of metadata

@wtrocki can you please tell how how can i start to contributing

@hussainashraf if you create separate repository with the basic nest application and then try to follow graphback documentation to add graphback to it.. Then you can ping us on PR for review.
Once that is there we can add this template to this repository by merging your PR with the links to the template you have created.

@RinkiyaKeDad Little bit offtopic, but since you wanted to work on this - I think having community template capability is critical here so we can work on this to enable @hussainashraf to contribute back to repository and validate our work. Thank you so much guys for interest! We really appreciate that!

Yup that sounds great @wtrocki! We are in the final steps of adding the community template capability, till then like @wtrocki already said you could start creating the Next.js template in a new repository @hussainashraf. I could aslo help you out with that if you want :)

hi @wtrocki @RinkiyaKeDad can you please guide me what are prerequisite to work on this issue because i am new in open source contribution so having no idea about this issue I only know java , git,github , web development and from some past day I learned about graphql so Please help me out .. so I can contribute better

Mu suggestions on how to get started, in order:

  1. Play around with Graphback. Create a TODO application. Use graphback.dev to guide you
  2. Learn about Nest.js. Also create a TODO application.
  3. Use your knowledge learned to migrate your Nest.js TODO application to use Graphback

Sounds like plan

While setting up nest i am getting this error also tried to update node but didn't work is there any way to get around.

:\nestnode_modules\fs-extralib\mkdirs\make-dir.js:85
} catch {
^

SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:607:28)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (D:\nestnode_modules\fs-extralib\mkdirs\index.js:3:44)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: nest start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hp\AppData\Roaming\npm-cache_logs\2020-12-06T12_19_21_261Z-debug.log`

Hi @mukeshgupta7, I think apart from updating node you also might need to update the fs-extra package to 9.0.0 or higher.

Hey @wtrocki! I'd like to work on this, can you please guide me because i am new in open source contribution so having no idea about this issue I only know java , github , git, web development in react and node js

There is a lot of interest on this issue. @craicoverflow already pointed out one of possible ways to get started working on this:

My suggestions on how to get started, in order:
1 Play around with Graphback. Create a TODO application. Use graphback.dev to guide you
2 Learn about Nest.js. Also create a TODO application.
3 Use your knowledge learned to migrate your Nest.js TODO application to use Graphback

If you do 1 and 2 ping us with the repository names. We can create a repository and help with migration.

@wtrocki let me take over this issue. Since I have some prerequisites in nest.js so my 2nd point is already on the board which leaves a single todo app with graphback. So give a day or two to create a repo for the same.

  1. Play around with Graphback. Create a TODO application. Use graphback.dev to guide you
  2. Learn about Nest.js. Also create a TODO application.
  3. Use your knowledge learned to migrate your Nest.js TODO application to use Graphback

There is a lot of interest on this issue. @craicoverflow already pointed out one of possible ways to get started working on this:

My suggestions on how to get started, in order:
1 Play around with Graphback. Create a TODO application. Use graphback.dev to guide you
2 Learn about Nest.js. Also create a TODO application.
3 Use your knowledge learned to migrate your Nest.js TODO application to use Graphback

If you do 1 and 2 ping us with the repository names. We can create a repository and help with migration.

Hey @wtrocki! I'm done with the first 2 steps mentioned above.
Repo for step 2 (NestJS Server): https://github.com/namit-chandwani/NestJS-Apollo-Notemaking-App-Backend

I would appreciate it if you could help me migrate this server to use Graphback.

@namit-chandwani have you tried following the steps outlined in Adding Graphback to your project

@namit-chandwani have you tried following the steps outlined in Adding Graphback to your project

@craicoverflow Yes, I'm done with the migration by following all the steps mentioned in this doc.
Since NestJS is a bit different from Express, the only challenge was getting that asynchronous code thing to work with NestJS. And the documentation helped a lot here.

Here's the template repo: https://github.com/namit-chandwani/nestjs-apollo-mongodb-backend

Please have a look and do let me know if there are any changes that I need to make!

Is there anything more that need to be done or is there any more issue available?

Is there anything more that need to be done or is there any more issue available?

Hey @mukeshgupta7!
As you can see from the linked PR, the template has already been created.
Though if you're still interested in working on this template, there are a couple of issues created in it's repo, you can work on those along with me if you feel like.

Here's the link for the same: https://github.com/namit-chandwani/nestjs-apollo-mongodb-backend/issues

Was this page helpful?
0 / 5 - 0 ratings