namit-chandwani / nestjs-apollo-mongodb-backend

0 stars 0 forks source link

GraphQL service and Database service are mixed together #3

Open wtrocki opened 3 years ago

wtrocki commented 3 years ago

DB service currently exposes API.

I think GraphQL service, API service will be much better to handle this.

This particularly feels out of the place: https://github.com/namit-chandwani/nestjs-apollo-mongodb-backend/blob/master/src/database/database.providers.ts#L34-L36

GraphQL service uses this anyway so I think it would be good to move things around https://github.com/namit-chandwani/nestjs-apollo-mongodb-backend/blob/master/src/graphql/graphql.service.ts

wtrocki commented 3 years ago

@namit-chandwani Let's just move graphback to some separate service or.. even add it to the graphql.service. Thank you

namit-chandwani commented 3 years ago

@wtrocki Please have a look now. I'll merge the PR once you approve these changes.