├── .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.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: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.editorconfig -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | coverage 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.eslintrc -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.github/workflows/development.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.github/workflows/development.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.prettierrc -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.releaserc -------------------------------------------------------------------------------- /.renovaterc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.renovaterc -------------------------------------------------------------------------------- /.snyk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.snyk -------------------------------------------------------------------------------- /.typedoc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/.typedoc.js -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/README.md -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | token: 561c483a-718b-4601-b0be-e77e8fc0fb5c 3 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'] 3 | } 4 | -------------------------------------------------------------------------------- /docs/connections.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/docs/connections.md -------------------------------------------------------------------------------- /docs/mutations.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/docs/mutations.md -------------------------------------------------------------------------------- /docs/refetching-data.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/docs/refetching-data.md -------------------------------------------------------------------------------- /husky.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/husky.config.js -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/jest.config.js -------------------------------------------------------------------------------- /lint-staged.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/lint-staged.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/package.json -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/renovate.json -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/rollup.config.js -------------------------------------------------------------------------------- /src/common/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/common/index.ts -------------------------------------------------------------------------------- /src/common/metadata-storage.class.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/common/metadata-storage.class.spec.ts -------------------------------------------------------------------------------- /src/common/metadata-storage.class.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/common/metadata-storage.class.ts -------------------------------------------------------------------------------- /src/common/scalar.utils.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/common/scalar.utils.spec.ts -------------------------------------------------------------------------------- /src/common/scalar.utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/common/scalar.utils.ts -------------------------------------------------------------------------------- /src/common/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/common/types.ts -------------------------------------------------------------------------------- /src/connection/args/backward-connection-args.type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/connection/args/backward-connection-args.type.ts -------------------------------------------------------------------------------- /src/connection/args/connection-args.type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/connection/args/connection-args.type.ts -------------------------------------------------------------------------------- /src/connection/args/forward-connection-args.type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/connection/args/forward-connection-args.type.ts -------------------------------------------------------------------------------- /src/connection/args/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/connection/args/index.ts -------------------------------------------------------------------------------- /src/connection/connection-type.factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/connection/connection-type.factory.ts -------------------------------------------------------------------------------- /src/connection/connection.type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/connection/connection.type.ts -------------------------------------------------------------------------------- /src/connection/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/connection/index.ts -------------------------------------------------------------------------------- /src/connection/page-info.type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/connection/page-info.type.ts -------------------------------------------------------------------------------- /src/connection/resolve-connection-field.decorator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/connection/resolve-connection-field.decorator.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/global-id-field.decorator.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/global-id-field.decorator.spec.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/global-id-field.decorator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/global-id-field.decorator.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/global-id-field.resolver.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/global-id-field.resolver.spec.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/global-id-field.resolver.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/global-id-field.resolver.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/global-id.scalar.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/global-id.scalar.spec.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/global-id.scalar.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/global-id.scalar.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/global-id.type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/global-id.type.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/index.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/resolved-global-id.class.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/resolved-global-id.class.spec.ts -------------------------------------------------------------------------------- /src/global-object-identification/global-id/resolved-global-id.class.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/global-id/resolved-global-id.class.ts -------------------------------------------------------------------------------- /src/global-object-identification/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/index.ts -------------------------------------------------------------------------------- /src/global-object-identification/node/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/node/index.ts -------------------------------------------------------------------------------- /src/global-object-identification/node/node-field.resolver.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/node/node-field.resolver.spec.ts -------------------------------------------------------------------------------- /src/global-object-identification/node/node-field.resolver.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/node/node-field.resolver.ts -------------------------------------------------------------------------------- /src/global-object-identification/node/node-type.decorator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/node/node-type.decorator.ts -------------------------------------------------------------------------------- /src/global-object-identification/node/node.interface.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/node/node.interface.spec.ts -------------------------------------------------------------------------------- /src/global-object-identification/node/node.interface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/global-object-identification/node/node.interface.ts -------------------------------------------------------------------------------- /src/mutation/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/index.ts -------------------------------------------------------------------------------- /src/mutation/input-arg.decorator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/input-arg.decorator.ts -------------------------------------------------------------------------------- /src/mutation/input-arg/index.ts: -------------------------------------------------------------------------------- 1 | export * from './input-arg.factory'; 2 | -------------------------------------------------------------------------------- /src/mutation/input-arg/input-arg.factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/input-arg/input-arg.factory.ts -------------------------------------------------------------------------------- /src/mutation/input-arg/input.mixin.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/input-arg/input.mixin.ts -------------------------------------------------------------------------------- /src/mutation/payload-type/index.ts: -------------------------------------------------------------------------------- 1 | export * from './payload-type.factory'; 2 | -------------------------------------------------------------------------------- /src/mutation/payload-type/payload-type.factory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/payload-type/payload-type.factory.ts -------------------------------------------------------------------------------- /src/mutation/payload-type/payload.mixin.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/payload-type/payload.mixin.ts -------------------------------------------------------------------------------- /src/mutation/relay-mutation.decorator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/relay-mutation.decorator.ts -------------------------------------------------------------------------------- /src/mutation/utils/capitalise.util.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/utils/capitalise.util.spec.ts -------------------------------------------------------------------------------- /src/mutation/utils/capitalise.util.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/utils/capitalise.util.ts -------------------------------------------------------------------------------- /src/mutation/utils/ensure-promise.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/utils/ensure-promise.spec.ts -------------------------------------------------------------------------------- /src/mutation/utils/ensure-promise.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/utils/ensure-promise.ts -------------------------------------------------------------------------------- /src/mutation/utils/get-client-mutation-id.util.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/utils/get-client-mutation-id.util.spec.ts -------------------------------------------------------------------------------- /src/mutation/utils/get-client-mutation-id.util.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/utils/get-client-mutation-id.util.ts -------------------------------------------------------------------------------- /src/mutation/utils/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/mutation/utils/index.ts -------------------------------------------------------------------------------- /src/nestjs-relay.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/src/nestjs-relay.ts -------------------------------------------------------------------------------- /test/connection.e2e-spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/connection.e2e-spec.ts -------------------------------------------------------------------------------- /test/global-object-identification.e2e-spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/global-object-identification.e2e-spec.ts -------------------------------------------------------------------------------- /test/mutation.e2e-spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/mutation.e2e-spec.ts -------------------------------------------------------------------------------- /test/starwars-app/faction.resolver.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/faction.resolver.ts -------------------------------------------------------------------------------- /test/starwars-app/faction.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/faction.service.ts -------------------------------------------------------------------------------- /test/starwars-app/faction.type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/faction.type.ts -------------------------------------------------------------------------------- /test/starwars-app/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/index.ts -------------------------------------------------------------------------------- /test/starwars-app/introduce-ship.input.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/introduce-ship.input.ts -------------------------------------------------------------------------------- /test/starwars-app/introduce-ship.output.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/introduce-ship.output.ts -------------------------------------------------------------------------------- /test/starwars-app/node.resolver.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/node.resolver.ts -------------------------------------------------------------------------------- /test/starwars-app/schema.gql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/schema.gql -------------------------------------------------------------------------------- /test/starwars-app/ship.resolver.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/ship.resolver.ts -------------------------------------------------------------------------------- /test/starwars-app/ship.service.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/ship.service.ts -------------------------------------------------------------------------------- /test/starwars-app/ship.type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/ship.type.ts -------------------------------------------------------------------------------- /test/starwars-app/starwars.module.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/test/starwars-app/starwars.module.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rogerballard/nestjs-relay/HEAD/tsconfig.json --------------------------------------------------------------------------------