├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── development.yml ├── .gitignore ├── .prettierrc ├── .releaserc ├── .renovaterc ├── .snyk ├── .typedoc.js ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── codecov.yml ├── commitlint.config.js ├── docs ├── connections.md ├── mutations.md └── refetching-data.md ├── husky.config.js ├── jest.config.js ├── lint-staged.config.js ├── package-lock.json ├── package.json ├── renovate.json ├── rollup.config.js ├── src ├── common │ ├── index.ts │ ├── metadata-storage.class.spec.ts │ ├── metadata-storage.class.ts │ ├── scalar.utils.spec.ts │ ├── scalar.utils.ts │ └── types.ts ├── connection │ ├── args │ │ ├── backward-connection-args.type.ts │ │ ├── connection-args.type.ts │ │ ├── forward-connection-args.type.ts │ │ └── index.ts │ ├── connection-type.factory.ts │ ├── connection.type.ts │ ├── index.ts │ ├── page-info.type.ts │ └── resolve-connection-field.decorator.ts ├── global-object-identification │ ├── global-id │ │ ├── global-id-field.decorator.spec.ts │ │ ├── global-id-field.decorator.ts │ │ ├── global-id-field.resolver.spec.ts │ │ ├── global-id-field.resolver.ts │ │ ├── global-id.scalar.spec.ts │ │ ├── global-id.scalar.ts │ │ ├── global-id.type.ts │ │ ├── index.ts │ │ ├── resolved-global-id.class.spec.ts │ │ └── resolved-global-id.class.ts │ ├── index.ts │ └── node │ │ ├── index.ts │ │ ├── node-field.resolver.spec.ts │ │ ├── node-field.resolver.ts │ │ ├── node-type.decorator.ts │ │ ├── node.interface.spec.ts │ │ └── node.interface.ts ├── mutation │ ├── index.ts │ ├── input-arg.decorator.ts │ ├── input-arg │ │ ├── index.ts │ │ ├── input-arg.factory.ts │ │ └── input.mixin.ts │ ├── payload-type │ │ ├── index.ts │ │ ├── payload-type.factory.ts │ │ └── payload.mixin.ts │ ├── relay-mutation.decorator.ts │ └── utils │ │ ├── capitalise.util.spec.ts │ │ ├── capitalise.util.ts │ │ ├── ensure-promise.spec.ts │ │ ├── ensure-promise.ts │ │ ├── get-client-mutation-id.util.spec.ts │ │ ├── get-client-mutation-id.util.ts │ │ └── index.ts └── nestjs-relay.ts ├── test ├── connection.e2e-spec.ts ├── global-object-identification.e2e-spec.ts ├── mutation.e2e-spec.ts └── starwars-app │ ├── faction.resolver.ts │ ├── faction.service.ts │ ├── faction.type.ts │ ├── index.ts │ ├── introduce-ship.input.ts │ ├── introduce-ship.output.ts │ ├── node.resolver.ts │ ├── schema.gql │ ├── ship.resolver.ts │ ├── ship.service.ts │ ├── ship.type.ts │ └── starwars.module.ts └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | #root = true 2 | 3 | [*] 4 | indent_style = space 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | max_line_length = 100 10 | indent_size = 2 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | coverage 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "plugins": ["@typescript-eslint"], 5 | "extends": [ 6 | "eslint:recommended", 7 | "plugin:@typescript-eslint/recommended", 8 | "prettier", 9 | "prettier/@typescript-eslint" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/explicit-module-boundary-types": "off", 13 | "@typescript-eslint/no-explicit-any": "off" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Additional context** 24 | Add any other context about the problem here. 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/development.yml: -------------------------------------------------------------------------------- 1 | name: development 2 | 3 | on: 4 | push: 5 | branches: [ master, next ] 6 | pull_request: 7 | branches: [ master, next ] 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | strategy: 13 | matrix: 14 | node-version: [10.x, 12.x] 15 | steps: 16 | - name: Checkout Repository 17 | uses: actions/checkout@v2 18 | 19 | - name: Setup Node Environment 20 | uses: actions/setup-node@v2 21 | with: 22 | node-version: ${{ matrix.node-version }} 23 | 24 | - name: Install Dependencies 25 | run: npm ci 26 | 27 | - name: Build 28 | run: npm run build 29 | 30 | - name: Test 31 | run: npm run test 32 | 33 | - name: Report Coverage 34 | uses: coverallsapp/github-action@v1.1.2 35 | with: 36 | github-token: ${{ secrets.GITHUB_TOKEN }} 37 | 38 | deploy: 39 | needs: [test] 40 | runs-on: ubuntu-latest 41 | steps: 42 | - name: Checkout Repository 43 | uses: actions/checkout@v2 44 | 45 | - name: Install Dependencies 46 | run: npm ci 47 | 48 | - name: Build 49 | run: npm run build 50 | 51 | - name: Semantic Release 52 | uses: cycjimmy/semantic-release-action@v2 53 | env: 54 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 55 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 56 | with: 57 | semantic_version: 17 58 | extra_plugins: | 59 | @semantic-release/changelog@5 60 | @semantic-release/git@9 61 | 62 | 63 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .nyc_output 4 | .DS_Store 5 | *.log 6 | .vscode 7 | .idea 8 | dist 9 | compiled 10 | .awcache 11 | .rpt2_cache 12 | public 13 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } 5 | -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "@semantic-release/commit-analyzer", 4 | "@semantic-release/release-notes-generator", 5 | ["@semantic-release/changelog", { 6 | "changelogFile": "CHANGELOG.md", 7 | }], 8 | "@semantic-release/npm", 9 | "@semantic-release/github", 10 | ["@semantic-release/git", { 11 | "assets": ["package.json", "CHANGELOG.md"], 12 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 13 | }] 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /.renovaterc: -------------------------------------------------------------------------------- 1 | { 2 | "packageRules": [ 3 | { 4 | "matchUpdateTypes": ["minor", "patch", "pin", "digest"], 5 | "automerge": true 6 | }, 7 | { 8 | "matchDepTypes": ["devDependencies"], 9 | "automerge": true 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.snyk: -------------------------------------------------------------------------------- 1 | # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. 2 | version: v1.15.0 3 | ignore: {} 4 | # patches apply the minimum changes required to fix a vulnerability 5 | patch: 6 | SNYK-JS-LODASH-567746: 7 | - typedoc-neo-theme > typedoc > lodash: 8 | patched: '2020-06-21T11:05:27.313Z' 9 | -------------------------------------------------------------------------------- /.typedoc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // entryPoint: '"nestjs-relay"', 3 | exclude: '**/*+(index|.spec|.e2e).ts', 4 | excludeExternals: true, 5 | excludeNotExported: true, 6 | includeVersion: true, 7 | inputFiles: ['src'], 8 | mode: 'modules', 9 | name: 'NestJS Relay', 10 | out: 'public', 11 | plugin: 'typedoc-neo-theme', 12 | theme: './node_modules/typedoc-neo-theme/bin/default', 13 | }; 14 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [4.0.4](https://github.com/rogerballard/nestjs-relay/compare/v4.0.3...v4.0.4) (2021-02-01) 2 | 3 | 4 | ### Bug Fixes 5 | 6 | * upgrade graphql from 15.3.0 to 15.4.0 ([#171](https://github.com/rogerballard/nestjs-relay/issues/171)) ([9a3a750](https://github.com/rogerballard/nestjs-relay/commit/9a3a750b09f1886ddd140b96f622d5d65fc6a4b7)) 7 | 8 | ## [4.0.3](https://github.com/rogerballard/nestjs-relay/compare/v4.0.2...v4.0.3) (2020-10-04) 9 | 10 | 11 | ### Bug Fixes 12 | 13 | * package.json & package-lock.json to reduce vulnerabilities ([5c2bfc0](https://github.com/rogerballard/nestjs-relay/commit/5c2bfc009251c94a64d9cf8e60d1a610c10529ec)) 14 | 15 | ## [4.0.2](https://github.com/rogerballard/nestjs-relay/compare/v4.0.1...v4.0.2) (2020-10-04) 16 | 17 | 18 | ### Bug Fixes 19 | 20 | * package.json & package-lock.json to reduce vulnerabilities ([6f35ae2](https://github.com/rogerballard/nestjs-relay/commit/6f35ae2629ad4a0eb35cd40914a37156e2190a22)) 21 | 22 | ## [4.0.1](https://github.com/rogerballard/nestjs-relay/compare/v4.0.0...v4.0.1) (2020-09-02) 23 | 24 | 25 | ### Bug Fixes 26 | 27 | * upgrade multiple dependencies with Snyk ([9943d49](https://github.com/rogerballard/nestjs-relay/commit/9943d49ff930cdc7b4dc61e1278cd603ea19321f)) 28 | 29 | # [4.0.0](https://github.com/rogerballard/nestjs-relay/compare/v3.0.5...v4.0.0) (2020-09-02) 30 | 31 | 32 | ### Bug Fixes 33 | 34 | * set page info fields to non nullable ([6aac951](https://github.com/rogerballard/nestjs-relay/commit/6aac95147fb95145cac934c46d72009b24147af1)) 35 | 36 | 37 | ### Build System 38 | 39 | * **development workflow:** add build step to deploy phase ([4737a6e](https://github.com/rogerballard/nestjs-relay/commit/4737a6e545a8c28d854489a4c9f484233e1c2e5d)) 40 | 41 | 42 | ### Code Refactoring 43 | 44 | * **global object identification:** remove GlobalIdField and NodeResolver from exports ([3ac890a](https://github.com/rogerballard/nestjs-relay/commit/3ac890ae407638903663cbd97c5b4b6c6b248c44)) 45 | 46 | 47 | ### Features 48 | 49 | * **connection:** expose backward and forward connection args ([77a63a8](https://github.com/rogerballard/nestjs-relay/commit/77a63a8cf1df68f7fac75fe90e034b3725af9365)) 50 | 51 | 52 | ### BREAKING CHANGES 53 | 54 | * **development workflow:** Package contains built contents 55 | * **global object identification:** the GlobalIdField decorator and NodeResolver interface are no longer exported 56 | 57 | ## [3.0.5](https://github.com/rogerballard/nestjs-relay/compare/v3.0.4...v3.0.5) (2020-08-29) 58 | 59 | 60 | ### Bug Fixes 61 | 62 | * upgrade graphql from 15.2.0 to 15.3.0 ([270033b](https://github.com/rogerballard/nestjs-relay/commit/270033b804f5979364e1b6bc991b5dee5ad6be5c)) 63 | 64 | ## [3.0.4](https://github.com/rogerballard/nestjs-relay/compare/v3.0.3...v3.0.4) (2020-08-27) 65 | 66 | 67 | ### Bug Fixes 68 | 69 | * upgrade graphql-tools from 6.0.13 to 6.0.14 ([e12492e](https://github.com/rogerballard/nestjs-relay/commit/e12492e0e2a1a17502b6a32b307f8c6b3c115f82)) 70 | 71 | ## [3.0.3](https://github.com/rogerballard/nestjs-relay/compare/v3.0.2...v3.0.3) (2020-07-29) 72 | 73 | 74 | ### Bug Fixes 75 | 76 | * package.json & package-lock.json to reduce vulnerabilities ([6539eec](https://github.com/rogerballard/nestjs-relay/commit/6539eecbf55bdc9082b24bbc56c29ddd740bc882)) 77 | 78 | ## [3.0.2](https://github.com/rogerballard/nestjs-relay/compare/v3.0.1...v3.0.2) (2020-07-29) 79 | 80 | 81 | ### Bug Fixes 82 | 83 | * upgrade graphql from 15.1.0 to 15.2.0 ([aea774d](https://github.com/rogerballard/nestjs-relay/commit/aea774d7c7f9e1f9c3cc4e7113f80c08aa09360b)) 84 | 85 | ## [3.0.1](https://github.com/rogerballard/nestjs-relay/compare/v3.0.0...v3.0.1) (2020-07-05) 86 | 87 | 88 | ### Bug Fixes 89 | 90 | * enable releases ([36633db](https://github.com/rogerballard/nestjs-relay/commit/36633db40269c6b041963a8d0e354df02dd40c3e)) 91 | * release mismatch ([945748a](https://github.com/rogerballard/nestjs-relay/commit/945748affa88806d00fc8da74bee79d8f9b9daac)) 92 | 93 | # [3.0.0](https://github.com/rogerballard/nestjs-relay/compare/v2.1.1...v3.0.0) (2020-07-05) 94 | 95 | 96 | ### Bug Fixes 97 | 98 | * bump build ([fd940f9](https://github.com/rogerballard/nestjs-relay/commit/fd940f9786ae20ce5d72df92e43a38db5855a164)) 99 | * **pkg:** add description and keywords to pkg ([f5b8523](https://github.com/rogerballard/nestjs-relay/commit/f5b8523064fc64dd56884003e6d041b02beb07b2)) 100 | 101 | 102 | * Next (#67) ([dc4a9b0](https://github.com/rogerballard/nestjs-relay/commit/dc4a9b0cfa4079cfb7a9f5a2839ea3bf8c903d19)), closes [#67](https://github.com/rogerballard/nestjs-relay/issues/67) [#65](https://github.com/rogerballard/nestjs-relay/issues/65) [#68](https://github.com/rogerballard/nestjs-relay/issues/68) 103 | 104 | 105 | ### BREAKING CHANGES 106 | 107 | * the GlobalIdField decorator and NodeResolver interface are no longer exported 108 | 109 | * docs: fix typo in refecting data guide 110 | 111 | * chore(release): 3.0.0 [skip ci] 112 | 113 | # [3.0.0](https://github.com/rogerballard/nestjs-relay/compare/v2.2.2...v3.0.0) (2020-07-05) 114 | 115 | ### Code Refactoring 116 | 117 | * **global object identification:** remove GlobalIdField and NodeResolver from exports ([3ac890a](https://github.com/rogerballard/nestjs-relay/commit/3ac890ae407638903663cbd97c5b4b6c6b248c44)) 118 | 119 | ### BREAKING CHANGES 120 | 121 | * **global object identification:** the GlobalIdField decorator and NodeResolver interface are no longer exported 122 | 123 | * docs(mutations guide): add updated mutations guide 124 | 125 | * docs: remove old mutations guide 126 | 127 | * docs(connections guide): add connections guide 128 | 129 | * docs(readme): add prerequisites and peer dependencies 130 | 131 | * docs(readme): simplify features 132 | 133 | Co-authored-by: Roger Ballard 134 | Co-authored-by: semantic-release-bot 135 | 136 | # [3.0.0](https://github.com/rogerballard/nestjs-relay/compare/v2.1.1...v3.0.0) (2020-07-05) 137 | 138 | 139 | ### Bug Fixes 140 | 141 | * **pkg:** add description and keywords to pkg ([f5b8523](https://github.com/rogerballard/nestjs-relay/commit/f5b8523064fc64dd56884003e6d041b02beb07b2)) 142 | 143 | 144 | * Next (#67) ([dc4a9b0](https://github.com/rogerballard/nestjs-relay/commit/dc4a9b0cfa4079cfb7a9f5a2839ea3bf8c903d19)), closes [#67](https://github.com/rogerballard/nestjs-relay/issues/67) [#65](https://github.com/rogerballard/nestjs-relay/issues/65) [#68](https://github.com/rogerballard/nestjs-relay/issues/68) 145 | 146 | 147 | ### BREAKING CHANGES 148 | 149 | * the GlobalIdField decorator and NodeResolver interface are no longer exported 150 | 151 | * docs: fix typo in refecting data guide 152 | 153 | * chore(release): 3.0.0 [skip ci] 154 | 155 | # [3.0.0](https://github.com/rogerballard/nestjs-relay/compare/v2.2.2...v3.0.0) (2020-07-05) 156 | 157 | ### Code Refactoring 158 | 159 | * **global object identification:** remove GlobalIdField and NodeResolver from exports ([3ac890a](https://github.com/rogerballard/nestjs-relay/commit/3ac890ae407638903663cbd97c5b4b6c6b248c44)) 160 | 161 | ### BREAKING CHANGES 162 | 163 | * **global object identification:** the GlobalIdField decorator and NodeResolver interface are no longer exported 164 | 165 | * docs(mutations guide): add updated mutations guide 166 | 167 | * docs: remove old mutations guide 168 | 169 | * docs(connections guide): add connections guide 170 | 171 | * docs(readme): add prerequisites and peer dependencies 172 | 173 | * docs(readme): simplify features 174 | 175 | Co-authored-by: Roger Ballard 176 | Co-authored-by: semantic-release-bot 177 | 178 | # [3.0.0](https://github.com/rogerballard/nestjs-relay/compare/v2.1.1...v3.0.0) (2020-07-05) 179 | 180 | 181 | * Next (#67) ([dc4a9b0](https://github.com/rogerballard/nestjs-relay/commit/dc4a9b0cfa4079cfb7a9f5a2839ea3bf8c903d19)), closes [#67](https://github.com/rogerballard/nestjs-relay/issues/67) [#65](https://github.com/rogerballard/nestjs-relay/issues/65) [#68](https://github.com/rogerballard/nestjs-relay/issues/68) 182 | 183 | 184 | ### BREAKING CHANGES 185 | 186 | * the GlobalIdField decorator and NodeResolver interface are no longer exported 187 | 188 | * docs: fix typo in refecting data guide 189 | 190 | * chore(release): 3.0.0 [skip ci] 191 | 192 | # [3.0.0](https://github.com/rogerballard/nestjs-relay/compare/v2.2.2...v3.0.0) (2020-07-05) 193 | 194 | ### Code Refactoring 195 | 196 | * **global object identification:** remove GlobalIdField and NodeResolver from exports ([3ac890a](https://github.com/rogerballard/nestjs-relay/commit/3ac890ae407638903663cbd97c5b4b6c6b248c44)) 197 | 198 | ### BREAKING CHANGES 199 | 200 | * **global object identification:** the GlobalIdField decorator and NodeResolver interface are no longer exported 201 | 202 | * docs(mutations guide): add updated mutations guide 203 | 204 | * docs: remove old mutations guide 205 | 206 | * docs(connections guide): add connections guide 207 | 208 | * docs(readme): add prerequisites and peer dependencies 209 | 210 | * docs(readme): simplify features 211 | 212 | Co-authored-by: Roger Ballard 213 | Co-authored-by: semantic-release-bot 214 | 215 | # [3.0.0](https://github.com/rogerballard/nestjs-relay/compare/v2.2.2...v3.0.0) (2020-07-05) 216 | 217 | 218 | ### Code Refactoring 219 | 220 | * **global object identification:** remove GlobalIdField and NodeResolver from exports ([3ac890a](https://github.com/rogerballard/nestjs-relay/commit/3ac890ae407638903663cbd97c5b4b6c6b248c44)) 221 | 222 | 223 | ### BREAKING CHANGES 224 | 225 | * **global object identification:** the GlobalIdField decorator and NodeResolver interface are no longer exported 226 | 227 | ## [2.2.2](https://github.com/rogerballard/nestjs-relay/compare/v2.2.1...v2.2.2) (2020-07-05) 228 | 229 | 230 | ### Bug Fixes 231 | 232 | * upgrade graphql from 15.0.0 to 15.1.0 ([#68](https://github.com/rogerballard/nestjs-relay/issues/68)) ([b36d4c8](https://github.com/rogerballard/nestjs-relay/commit/b36d4c81c11333738d3d153f6a9d8d88e6c1cf98)) 233 | 234 | ## [2.2.1](https://github.com/rogerballard/nestjs-relay/compare/v2.2.0...v2.2.1) (2020-07-03) 235 | 236 | 237 | ### Bug Fixes 238 | 239 | * set page info fields to non nullable ([6aac951](https://github.com/rogerballard/nestjs-relay/commit/6aac95147fb95145cac934c46d72009b24147af1)) 240 | 241 | # [2.2.0](https://github.com/rogerballard/nestjs-relay/compare/v2.1.0...v2.2.0) (2020-06-28) 242 | 243 | 244 | ### Features 245 | 246 | * **connection:** expose backward and forward connection args ([77a63a8](https://github.com/rogerballard/nestjs-relay/commit/77a63a8cf1df68f7fac75fe90e034b3725af9365)) 247 | 248 | ## [2.1.1](https://github.com/rogerballard/nestjs-relay/compare/v2.1.0...v2.1.1) (2020-07-03) 249 | 250 | 251 | ### Bug Fixes 252 | 253 | * upgrade graphql from 15.0.0 to 15.1.0 ([#68](https://github.com/rogerballard/nestjs-relay/issues/68)) ([b36d4c8](https://github.com/rogerballard/nestjs-relay/commit/b36d4c81c11333738d3d153f6a9d8d88e6c1cf98)) 254 | 255 | # [2.1.0](https://github.com/rogerballard/nestjs-relay/compare/v2.0.0...v2.1.0) (2020-06-24) 256 | 257 | 258 | ### Features 259 | 260 | * **global id field resolver:** add optional id field options argument ([#55](https://github.com/rogerballard/nestjs-relay/issues/55)) ([0da626f](https://github.com/rogerballard/nestjs-relay/commit/0da626f776f8fb1d2fb0316bbbce902fd73bd19b)) 261 | 262 | # [2.0.0](https://github.com/rogerballard/nestjs-relay/compare/v1.1.0...v2.0.0) (2020-06-21) 263 | 264 | 265 | ### Code Refactoring 266 | 267 | * **relay arg decorator:** rename relay arg to input arg ([916525b](https://github.com/rogerballard/nestjs-relay/commit/916525bb492f9d757c8294e05c723e71a362fe57)) 268 | 269 | 270 | ### BREAKING CHANGES 271 | 272 | * **relay arg decorator:** the RelayArg decorator is now named InputArg 273 | 274 | # [1.1.0](https://github.com/rogerballard/nestjs-relay/compare/v1.0.2...v1.1.0) (2020-06-21) 275 | 276 | 277 | ### Features 278 | 279 | * **snyk:** add snyk scripts ([85dd706](https://github.com/rogerballard/nestjs-relay/commit/85dd7069505c76dac2e7a5d63d29fd93d57c06b6)) 280 | 281 | ## [1.0.2](https://github.com/rogerballard/nestjs-relay/compare/v1.0.1...v1.0.2) (2020-06-21) 282 | 283 | 284 | ### Bug Fixes 285 | 286 | * package.json, package-lock.json & .snyk to reduce vulnerabilities ([#41](https://github.com/rogerballard/nestjs-relay/issues/41)) ([f33419e](https://github.com/rogerballard/nestjs-relay/commit/f33419e3d8515a97dabdf038f8c6ec41455b7b7b)) 287 | 288 | ## [1.0.1](https://github.com/rogerballard/nestjs-relay/compare/v1.0.0...v1.0.1) (2020-06-21) 289 | 290 | 291 | ### Bug Fixes 292 | 293 | * **build:** export correct cjs and esm module files ([9f5f760](https://github.com/rogerballard/nestjs-relay/commit/9f5f7608708c39a839c2591b05cf0b5b13ff3e0c)) 294 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | [hello@rogerballard.dev](mailto:hello@rogerballard.dev). 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | :tada: :raised_hands: First off, thanks for taking the time to contribute! :raised_hands: :tada: 4 | 5 | The following is a set of guidelines for contributing to NestJS Relay. 6 | 7 | **Contents** 8 | - [Contributing](#contributing) 9 | - [Code of Conduct](#code-of-conduct) 10 | - [Reporting Bugs](#reporting-bugs) 11 | - [Requesting Enhancements](#requesting-enhancements) 12 | - [Submission Guidelines](#submission-guidelines) 13 | - [Submitting an Issue](#submitting-an-issue) 14 | - [Submitting a Pull Request](#submitting-a-pull-request) 15 | - [Commit Message Rules](#commit-message-rules) 16 | - [Commit Message Format](#commit-message-format) 17 | - [Examples](#examples) 18 | - [Type](#type) 19 | - [Subject](#subject) 20 | - [Body](#body) 21 | - [Revert](#revert) 22 | - [Footer](#footer) 23 | 24 | ## Code of Conduct 25 | 26 | This project and everyone participating it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behaviour to [hello@rogerballard.dev](mailto:hello@rogerballard.dev). 27 | 28 | ## Reporting Bugs 29 | 30 | If you find a bug in this project, you can help by [submitting an issue](#submitting-an-issue) to the GitHub repository. Even better, you can [submit a pull request](#submitting-a-pull-request) with a fix. 31 | 32 | ## Requesting Enhancements 33 | 34 | You can *request* a new feature by submitting an issue to the GitHub repository. If you would like to implement a new feature, please submit an issue with a proposal for your work *first*, so that we can be sure that we can use it. 35 | 36 | When requesting a feature, please consider the scope of the feature: 37 | 38 | - For **major features**, first submit an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate efforts, prevent duplication of work, and help you to build the change in a way that it can be successfully accepted into the project. For your issue name, please prefix your proposal with `[discussion]`, for example `'[discussion]: your feature idea'`. 39 | - **Small features** can be crafted and directly submitted as a pull request. 40 | 41 | ## Submission Guidelines 42 | 43 | ### Submitting an Issue 44 | 45 | Before you submit an issue, please search the [issue tracker](https://github.com/rogerballard/nestjs-relay/issues) for whether your problem or suggestion already exists, and the discussion might inform you of workarounds readily available. 46 | 47 | We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal preproduction scenario using a repository, Gist, or codesandbox. Having a live, reproducible scenario gives us a wealth of important information without going back and forth with you. 48 | 49 | Unfortunately, we are not able to investigate/fix bugs without a minimap reproduction, so if we don't hear back from you, your issue will eventually be closed. 50 | 51 | You can submit an issue using one of the following templates: 52 | - [Bug report](https://github.com/rogerballard/nestjs-relay/issues/new?assignees=&labels=&template=bug_report.md&title=) 53 | - [Feature request](https://github.com/rogerballard/nestjs-relay/issues/new?assignees=&labels=&template=feature_request.md&title=) 54 | 55 | ### Submitting a Pull Request 56 | 57 | Before you submit a pull request (PR), please search the [open and closed PRs](https://github.com/rogerballard/nestjs-relay/pulls?q=is%3Apr) that relate to your submission. This will help you to avoid duplicating effort which may be better applied to contributing to an ongoing pull request. 58 | 59 | 1. [Fork the repository](https://github.com/rogerballard/nestjs-relay/fork) 60 | 2. Create your patch, including appropriate test cases. 61 | 3. Commit your changes following the [commit message rules](#commit-message-rules). 62 | 4. Run the test suite by running the `test` script. 63 | 5. Push your branch to GitHub. 64 | 6. In GitHub, submit a pull request to the `master` branch. 65 | 7. Add a helpful description and link to a related issue (if applicable). 66 | 67 | ## Commit Message Rules 68 | 69 | This project has very precise rules on how our git commit messages can be formatted. These rules lead to more readable messages that are easy to follow when looking through the project history. The consistent message format allows us to generate the [changelog](CHANGELOG.md) and automatically handle releases. 70 | 71 | This project uses the [Commitizen CLI](http://commitizen.github.io/cz-cli/) to help maintainers and contributors to follow the commit message rules with a useful command-line prompt. The repository is configured to start the Commitizen prompt whenever the git `prepare-commit-msg` hook is triggered, such as from running `git commit` in your terminal. 72 | 73 | Please familiarise yourself with the format below. 74 | 75 | ### Commit Message Format 76 | 77 | Each commit message consists of a **header**, a **body** and a **footer**. The **header** has a special format that includes a **type**, a **scope** and a **subject**: 78 | 79 | ``` 80 | (): 81 | 82 | 83 | 84 |