Contributing Guidelines
Relevant source files
The following files were used as context for generating this wiki page:
Nestjs-query welcomes contributions from the community to enhance its collection of packages for GraphQL CRUD operations. The project uses GitHub issues for tracking and pull requests for implementing changes. All contributors must follow the "golden rule" of being polite and respectful of the effort put in by others.
Sources: CONTRIBUTING.md:1-8, README.md:16-18
Development Workflow
The project is a TypeScript monorepo managed with Yarn 4 workspaces and Nx. It contains libraries in packages/, examples in examples/, and documentation in documentation/.
Sources: AGENTS.md:3-7
Getting Started
To set up the development environment, execute the following commands in the root directory:
npm install(oryarn)npm run bootstrapnpm run build
Sources: CONTRIBUTING.md:61-67, README.md:57-60
Contribution Types
The following table outlines the requirements for different types of contributions:
| Type | Requirement 1 | Requirement 2 | Requirement 3 |
|---|---|---|---|
| Bug Reports | Single bug per issue | Concise description | Reproducible example |
| Feature Requests | Single feature per issue | Concise description | Example use case |
| Pull Requests | Link to original issue | Comprehensive tests | Documentation updates |
Sources: CONTRIBUTING.md:12-60
Pull Request Lifecycle
The following diagram illustrates the lifecycle of a contribution from issue to merge.
The project requires all pull requests to pass automated checks and follow Conventional Commits guidelines before merging.
Sources: CONTRIBUTING.md:38-59, AGENTS.md:14-16
Standards and Conventions
Commit Messages
Nestjs-query follows the Conventional Commits format: <type>(<scope>): <subject>.
- Type:
feat,fix,docs,style,refactor,test, orchore. - Scope: Optional, typically the package name (e.g.,
core,graphql,typeorm). - Subject: Present-tense summary.
Sources: CONTRIBUTING.md:113-140, AGENTS.md:16-16
Code Style
- Use TypeScript without semicolons.
- Avoid default exports.
- Maintain narrow scopes for changes.
- Adhere to Prettier and ESLint configurations.
Sources: AGENTS.md:11-13
Testing Procedures
Unit Tests
Unit tests reside in the test/ directory of each package, matching the src/ path structure. They use the .spec.ts suffix and must not rely on persistent storage.
Sources: CONTRIBUTING.md:71-86, AGENTS.md:14-14
E2E Tests
End-to-end tests are located in the examples/ directory. They verify high-level functionality through the entire stack.
- Start backing services: Navigate to
./examplesand rundocker compose up -d. - Run tests: Run
npm run jest:e2efrom the root.
Sources: CONTRIBUTING.md:88-109, AGENTS.md:19-21
Documentation Guidelines
The project uses Docusaurus for its documentation site. New features require documentation updates.
Creating Documentation
New pages should be placed in specific directories based on content:
introduction: Installation and feature lists.concepts: Core Nestjs-query concepts.graphql: GraphQL-specific documentation.persistence: Persistence library adapters.
When creating a new page, you must add it to documentation/sidebars.js.
Sources: CONTRIBUTING.md:142-167, documentation/sidebars.js:8-105
Local Preview
To serve the documentation locally and verify changes, run:
nx serve documentation
Sources: CONTRIBUTING.md:152-154
Code of Conduct
All contributors must adhere to the Contributor Covenant Code of Conduct. The project pledges to provide a harassment-free experience for everyone. Unacceptable behaviors include sexualized language, trolling, personal attacks, and public or private harassment. Maintainers have the right to remove contributions or ban individuals who violate these standards.
Sources: CODE_OF_CONDUCT.md:1-47