nest
nest copied to clipboard
(feature) : Added a new sample project for GraphQL schema first testing
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [x] Other... Please describe:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
I have added a new sample project on Graphql testing with the schema first approach.
Does this PR introduce a breaking change?
- [ ] Yes
- [X] No
Other information
Pull Request Test Coverage Report for Build 8f722235-919f-4c28-bb43-b40f2024ee87
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 92.513%
Totals | |
---|---|
Change from base Build 5bd17c50-f4ca-40e5-b4dd-2c0c2dd7c586: | 0.0% |
Covered Lines: | 6425 |
Relevant Lines: | 6945 |
💛 - Coveralls
Could we update one of the existing projects instead of adding yet another example?
However you feel comfortable. Please let me know your thoughts on it
What would you prefer to do?
On Mon, Aug 28, 2023, 1:19 PM Kamil Mysliwiec @.***> wrote:
Could we update one of the existing projects instead of adding yet another example?
— Reply to this email directly, view it on GitHub https://github.com/nestjs/nest/pull/12281#issuecomment-1695249956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD77J2RQPDX7R3MUWVGR2OTXXRIALANCNFSM6AAAAAA36E5Z4E . You are receiving this because you authored the thread.Message ID: @.***>
If we could add tests to this https://github.com/nestjs/nest/tree/master/sample/12-graphql-schema-first sample instead, that would be easier to maintain down the road (we already have plenty of samples in this repository)
Thanks, I will do it
One more thing, Can I also write the documentation about Testing in GraphQL and Nest.js?
My idea is to write the documentation of my sample project into official Nest.js docs
What do you suggest?
Hey @kamilmysliwiec My example is using Postgres and TypeORM I could not find TypeORM and Postgres integration grahql-schema-first. Do you want me to add unit testing and integration testing without Postgres and TypeORM?
I have created a simple cats.services.spec.ts
in grahql-schema-first.
I am getting this error:
SyntaxError: /project/home/haidermalik12/workspace/src/cats/cats.service.spec.ts: Missing semicolon. (6:13)
4 |
5 | describe('CatsService', () => {
> 6 | let service: CatsService;
| ^
7 |
8 | beforeEach(async () => {
9 | const module: TestingModule = await Test.createTestingModule({
@kamilmysliwiec Could you help?
Here is my source code: Github Repo Here is the codesandBox URL CodeSandBox