├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── .vscode └── settings.json ├── apollo.config.js ├── codegen.download.yml ├── codegen.yml ├── graphql.config.js ├── next-env.d.ts ├── next.config.js ├── package.json ├── schema.graphql ├── src ├── __generated__ │ └── types.ts ├── features │ ├── OrderList │ │ ├── OrderDeleteMutation.graphql │ │ ├── OrderDeleteSubscription.graphql │ │ ├── OrderEditMutation.graphql │ │ ├── OrderList.tsx │ │ ├── OrderListEditableFreight.tsx │ │ ├── OrderListItem.fragment.graphql │ │ ├── OrderListQuery.graphql │ │ ├── OrderUpdateSubscription.graphql │ │ └── __generated__ │ │ │ ├── OrderDeleteMutation.tsx │ │ │ ├── OrderDeleteSubscription.tsx │ │ │ ├── OrderEditMutation.tsx │ │ │ ├── OrderListItem.fragment.tsx │ │ │ ├── OrderListQuery.tsx │ │ │ └── OrderUpdateSubscription.tsx │ └── ProductList │ │ └── ProductList.tsx ├── pages │ ├── _app.tsx │ ├── _document.tsx │ ├── index.tsx │ ├── misc.tsx │ ├── mock │ │ ├── index.tsx │ │ └── standalone.tsx │ ├── orders.tsx │ ├── products.tsx │ └── raw-client.tsx ├── styles.scss └── utils │ ├── clientMockSchema.ts │ ├── extendApolloHooks.ts │ ├── getConfig.ts │ └── withApollo.tsx ├── tsconfig.eslint.json ├── tsconfig.json └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | APP_GRAPHQL_URL=https://graphql-compose.herokuapp.com/northwind 2 | APP_GRAPHQL_WS=wss://graphql-compose.herokuapp.com/northwind 3 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | lib 4 | __generated__ 5 | .eslintrc.js 6 | schema.graphql 7 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | parser: '@typescript-eslint/parser', 5 | plugins: ['@typescript-eslint', 'prettier', 'react', 'react-hooks'], 6 | extends: [ 7 | 'plugin:@typescript-eslint/recommended', 8 | 'plugin:prettier/recommended', 9 | 'plugin:react/recommended', 10 | ], 11 | parserOptions: { 12 | sourceType: 'module', 13 | useJSXTextNode: true, 14 | project: [path.resolve(__dirname, 'tsconfig.eslint.json')], 15 | ecmaVersion: 2018, 16 | ecmaFeatures: { 17 | jsx: true, 18 | }, 19 | }, 20 | settings: { 21 | react: { 22 | version: 'detect', 23 | }, 24 | }, 25 | rules: { 26 | 'no-underscore-dangle': 0, 27 | 'arrow-body-style': 0, 28 | 'no-unused-expressions': 0, 29 | 'no-plusplus': 0, 30 | 'no-console': 0, 31 | 'func-names': 0, 32 | 'comma-dangle': [ 33 | 'error', 34 | { 35 | arrays: 'always-multiline', 36 | objects: 'always-multiline', 37 | imports: 'always-multiline', 38 | exports: 'always-multiline', 39 | functions: 'ignore', 40 | }, 41 | ], 42 | 'no-prototype-builtins': 0, 43 | 'prefer-destructuring': 0, 44 | 'no-else-return': 0, 45 | 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }], 46 | '@typescript-eslint/explicit-member-accessibility': 0, 47 | '@typescript-eslint/explicit-module-boundary-types': 0, 48 | '@typescript-eslint/explicit-function-return-type': 0, 49 | '@typescript-eslint/no-explicit-any': 0, 50 | '@typescript-eslint/no-unused-vars': [ 51 | 'error', 52 | { 53 | vars: 'all', 54 | args: 'after-used', 55 | ignoreRestSiblings: true, 56 | caughtErrors: 'none', 57 | argsIgnorePattern: '^(_|doc$|req$|res$|next$|props$|params$|opts$|e$)', 58 | }, 59 | ], 60 | '@typescript-eslint/no-use-before-define': 0, 61 | '@typescript-eslint/no-empty-interface': 0, 62 | '@typescript-eslint/camelcase': 0, 63 | '@typescript-eslint/no-empty-function': 0, 64 | '@typescript-eslint/no-var-requires': 0, 65 | 'react/display-name': 0, 66 | 'react/react-in-jsx-scope': 0, 67 | 'react/no-children-prop': 0, 68 | 'react/prop-types': 0, 69 | 'react-hooks/rules-of-hooks': 'error', 70 | 'react-hooks/exhaustive-deps': 'warn', 71 | 'react-hooks/rules-of-hooks': 0, 72 | }, 73 | overrides: [ 74 | { 75 | files: ['*.graphql'], 76 | parser: '@graphql-eslint/eslint-plugin', 77 | plugins: ['@graphql-eslint'], 78 | rules: { 79 | 'prettier/prettier': [2, { parser: 'graphql' }], 80 | '@graphql-eslint/avoid-duplicate-fields': 'error', 81 | '@graphql-eslint/executable-definitions': 'error', 82 | '@graphql-eslint/fields-on-correct-type': 'error', 83 | '@graphql-eslint/fragments-on-composite-type': 'error', 84 | '@graphql-eslint/known-argument-names': 'error', 85 | '@graphql-eslint/known-directives': 'error', 86 | '@graphql-eslint/known-type-names': 'error', 87 | '@graphql-eslint/no-anonymous-operations': 'error', 88 | '@graphql-eslint/no-deprecated': 'warn', 89 | '@graphql-eslint/no-unused-variables': 'warn', 90 | '@graphql-eslint/provided-required-arguments': 'error', 91 | '@graphql-eslint/scalar-leafs': 'error', 92 | '@graphql-eslint/unique-argument-names': 'error', 93 | '@graphql-eslint/unique-input-field-names': 'error', 94 | '@graphql-eslint/unique-variable-names': 'error', 95 | '@graphql-eslint/value-literals-of-correct-type': 'error', 96 | '@graphql-eslint/variables-are-input-types': 'error', 97 | '@graphql-eslint/variables-in-allowed-position': 'error', 98 | '@graphql-eslint/match-document-filename': [ 99 | 'error', 100 | { 101 | fileExtension: '.graphql', 102 | query: 'PascalCase', 103 | mutation: 'PascalCase', 104 | subscription: 'PascalCase', 105 | fragment: { style: 'PascalCase', suffix: '.fragment' }, 106 | }, 107 | ], 108 | // TODO: try the following rules later (they didn't work in August 2021) 109 | // '@graphql-eslint/unique-fragment-name': 'error', 110 | // '@graphql-eslint/unique-operation-name': 'error', 111 | }, 112 | }, 113 | ], 114 | }; 115 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # __generated__ ☝️☝️☝️ for demo purposes we don't ignore generated files. Should be ignored in regular repos. 4 | 5 | # dependencies 6 | node_modules 7 | /.pnp 8 | .pnp.js 9 | 10 | # testing 11 | coverage 12 | 13 | # production 14 | build/ 15 | dist/ 16 | lib/ 17 | 18 | # misc 19 | .DS_Store 20 | .env.local 21 | .env.development.local 22 | .env.test.local 23 | .env.production.local 24 | 25 | npm-debug.log* 26 | yarn-debug.log* 27 | yarn-error.log* 28 | 29 | # ignore backup files, which generated by bin/calc-yarn-lock-hash.sh on MacOS 30 | .gitlab-ci.yml-* 31 | 32 | .next 33 | 34 | .yarn-cache 35 | 36 | tsconfig.build.tsbuildinfo 37 | release.txt 38 | DOCKER_APP_IMAGE -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "arrowParens": "always", 4 | "tabWidth": 2, 5 | "useTabs": false, 6 | "printWidth": 100, 7 | "trailingComma": "es5" 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "graphql"], 3 | "editor.formatOnSave": true, 4 | "cSpell.words": ["Popconfirm"] 5 | } 6 | -------------------------------------------------------------------------------- /apollo.config.js: -------------------------------------------------------------------------------- 1 | // DEPRECATED vscode plugin until end of 2021 2 | // use GraphQL.vscode-graphql instead 3 | // 4 | // For vscode extension: 5 | // https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo 6 | 7 | module.exports = { 8 | client: { 9 | service: { 10 | name: 'client', 11 | localSchemaFile: './schema.graphql', 12 | }, 13 | // tagName: 'gql', 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /codegen.download.yml: -------------------------------------------------------------------------------- 1 | schema: 2 | - 'https://graphql-compose.herokuapp.com/northwind' 3 | generates: 4 | ./schema.graphql: 5 | plugins: 6 | - schema-ast 7 | config: 8 | includeDirectives: false 9 | -------------------------------------------------------------------------------- /codegen.yml: -------------------------------------------------------------------------------- 1 | schema: 2 | - schema.graphql 3 | - './src/utils/clientMockSchema.ts' 4 | documents: 'src/**/*.graphql' 5 | generates: 6 | src/__generated__/types.ts: 7 | plugins: 8 | - typescript 9 | config: 10 | scalars: 11 | Date: "string" 12 | RegExpAsString: "string" 13 | MongoID: "string" 14 | BSONDecimal: "string" 15 | src/: 16 | preset: near-operation-file 17 | presetConfig: 18 | folder: __generated__ 19 | extension: .tsx 20 | baseTypesPath: __generated__/types.ts 21 | plugins: 22 | - add: 23 | content: 24 | - '// 🛑 NOTICE: __generated__ folders should be added to .gitignore' 25 | - '// 🛑 In this repo I keep generated files only for demo purposes!' 26 | - typescript-operations 27 | - typescript-react-apollo 28 | config: 29 | documentMode: 'documentNodeImportFragments' 30 | namingConvention: keep 31 | nonOptionalTypename: true 32 | dedupeOperationSuffix: true 33 | omitOperationSuffix: true 34 | withComponent: false 35 | withHooks: true 36 | withHOC: false 37 | reactApolloVersion: 3 38 | apolloReactHooksImportFrom: 'app/utils/extendApolloHooks' 39 | # documentMode: documentNode 40 | -------------------------------------------------------------------------------- /graphql.config.js: -------------------------------------------------------------------------------- 1 | // For vscode extension: 2 | // https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql 3 | 4 | module.exports = { 5 | projects: { 6 | app: { 7 | schema: ['schema.graphql'], 8 | documents: ['src/**/*.graphql'], 9 | extensions: { 10 | endpoints: { 11 | default: { 12 | url: 'https://graphql-compose.herokuapp.com/northwind', 13 | }, 14 | }, 15 | languageService: { 16 | // skip generated_schema.graphql file with GoTo definition 17 | useSchemaFileDefinitions: true, 18 | }, 19 | }, 20 | }, 21 | }, 22 | }; 23 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | 5 | // NOTE: This file should not be edited 6 | // see https://nextjs.org/docs/basic-features/typescript for more information. 7 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | /* config options here */ 5 | publicRuntimeConfig: { 6 | APP_GRAPHQL_URL: process.env.APP_GRAPHQL_URL, 7 | APP_GRAPHQL_WS: process.env.APP_GRAPHQL_WS, 8 | }, 9 | webpack(config) { 10 | config.resolve.alias['app'] = path.join(__dirname, 'src'); 11 | return config; 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "apollo3", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "🛠 Development": "", 8 | "dev": "npm run watch", 9 | "watch": "npm run clear && concurrently -k npm:watch-codegen npm:watch-nextjs", 10 | "watch-nextjs": "next", 11 | "watch-codegen": "graphql-codegen --watch", 12 | "🏗 Build": "", 13 | "build": "npm run build-codegen && npm run build-nextjs", 14 | "build-nextjs": "next build", 15 | "build-codegen": "graphql-codegen", 16 | "✨ Utilities": "", 17 | "lint": "eslint 'src/**/*.{js,ts,tsx,graphql}'", 18 | "update-schema": "graphql-codegen -c ./codegen.download.yml", 19 | "clear": "find ./src -name \"__generated__\" -exec rm -rf '{}' +", 20 | "🏎 Runtime": "", 21 | "start": "next start" 22 | }, 23 | "keywords": [], 24 | "author": "", 25 | "license": "ISC", 26 | "dependencies": { 27 | "@ant-design/icons": "4.7.0", 28 | "@apollo/client": "3.4.16", 29 | "@apollo/link-ws": "2.0.0-beta.3", 30 | "@apollo/react-ssr": "4.0.0", 31 | "antd": "4.16.13", 32 | "graphql": "16.0.0", 33 | "isomorphic-unfetch": "^3.0.0", 34 | "next": "12.0.1", 35 | "react": "17.0.2", 36 | "react-dom": "17.0.2", 37 | "subscriptions-transport-ws": "^0.9.16" 38 | }, 39 | "devDependencies": { 40 | "@graphql-codegen/add": "3.1.0", 41 | "@graphql-codegen/cli": "2.2.2", 42 | "@graphql-codegen/near-operation-file-preset": "2.2.0", 43 | "@graphql-codegen/schema-ast": "2.3.0", 44 | "@graphql-codegen/typescript": "2.3.0", 45 | "@graphql-codegen/typescript-operations": "2.2.0", 46 | "@graphql-codegen/typescript-react-apollo": "3.2.0", 47 | "@graphql-eslint/eslint-plugin": "2.3.1", 48 | "@types/node": "16.11.6", 49 | "@types/react": "17.0.33", 50 | "@types/react-dom": "17.0.10", 51 | "@typescript-eslint/eslint-plugin": "5.2.0", 52 | "@typescript-eslint/parser": "5.2.0", 53 | "concurrently": "6.3.0", 54 | "eslint": "8.1.0", 55 | "eslint-config-prettier": "8.3.0", 56 | "eslint-plugin-prettier": "4.0.0", 57 | "eslint-plugin-react": "7.26.1", 58 | "eslint-plugin-react-hooks": "4.2.0", 59 | "npm-check": "5.9.2", 60 | "prettier": "2.4.1", 61 | "sass": "1.43.4", 62 | "typescript": "4.4.4" 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /schema.graphql: -------------------------------------------------------------------------------- 1 | directive @connection(key: String!, filter: [String!]) on FIELD 2 | 3 | type Category { 4 | _id: MongoID! 5 | 6 | """Category unique ID""" 7 | categoryID: Float 8 | description: String 9 | name: String 10 | productConnection( 11 | """Forward pagination argument for returning at most first edges""" 12 | after: String 13 | 14 | """Backward pagination argument for returning at most last edges""" 15 | before: String 16 | 17 | """Forward pagination argument for returning at most first edges""" 18 | first: Int 19 | 20 | """Backward pagination argument for returning at most last edges""" 21 | last: Int 22 | 23 | """Sort argument for data ordering""" 24 | sort: SortConnectionProductEnum = _ID_DESC 25 | ): ProductConnection 26 | productList(limit: Int = 100, skip: Int, sort: SortFindManyProductInput): [Product!]! 27 | } 28 | 29 | input CreateOneOrderInput { 30 | customerID: String 31 | 32 | """List of ordered products""" 33 | details: [OrderDetailsInput] 34 | employeeID: Float 35 | freight: Float 36 | orderDate: Date 37 | 38 | """Order unique ID""" 39 | orderID: Float 40 | requiredDate: Date 41 | shipAddress: CustomerAddressInput 42 | shipName: String 43 | shipVia: Float 44 | shippedDate: Date 45 | } 46 | 47 | type CreateOneOrderPayload { 48 | """ 49 | Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. 50 | """ 51 | error: ErrorInterface 52 | query: Query 53 | 54 | """Created document""" 55 | record: Order 56 | 57 | """Document ID""" 58 | recordId: MongoID 59 | } 60 | 61 | input CreateOneProductInput { 62 | categoryID: Float 63 | discontinued: Boolean 64 | name: String 65 | 66 | """Unique product id""" 67 | productID: Float 68 | quantityPerUnit: String 69 | reorderLevel: Float 70 | supplierID: Float 71 | unitPrice: Float 72 | unitsInStock: Float 73 | unitsOnOrder: Float 74 | } 75 | 76 | type CreateOneProductPayload { 77 | """ 78 | Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. 79 | """ 80 | error: ErrorInterface 81 | query: Query 82 | 83 | """Created document""" 84 | record: Product 85 | 86 | """Document ID""" 87 | recordId: MongoID 88 | } 89 | 90 | type Customer { 91 | _id: MongoID! 92 | address: CustomerAddress 93 | companyName: String 94 | contactName: String 95 | contactTitle: String 96 | 97 | """Customer unique ID""" 98 | customerID: String 99 | orderConnection( 100 | """Forward pagination argument for returning at most first edges""" 101 | after: String 102 | 103 | """Backward pagination argument for returning at most last edges""" 104 | before: String 105 | 106 | """Forward pagination argument for returning at most first edges""" 107 | first: Int 108 | 109 | """Backward pagination argument for returning at most last edges""" 110 | last: Int 111 | 112 | """Sort argument for data ordering""" 113 | sort: SortConnectionOrderEnum = _ID_DESC 114 | ): OrderConnection 115 | orderList(limit: Int = 100, skip: Int, sort: SortFindManyOrderInput): [Order!]! 116 | } 117 | 118 | type CustomerAddress { 119 | city: String 120 | country: String 121 | phone: String 122 | postalCode: String 123 | region: String 124 | street: String 125 | } 126 | 127 | input CustomerAddressInput { 128 | city: String 129 | country: String 130 | phone: String 131 | postalCode: String 132 | region: String 133 | street: String 134 | } 135 | 136 | """A connection to a list of items.""" 137 | type CustomerConnection { 138 | """Total object count.""" 139 | count: Int! 140 | 141 | """Information to aid in pagination.""" 142 | edges: [CustomerEdge!]! 143 | 144 | """Information to aid in pagination.""" 145 | pageInfo: PageInfo! 146 | } 147 | 148 | """An edge in a connection.""" 149 | type CustomerEdge { 150 | """A cursor for use in pagination""" 151 | cursor: String! 152 | 153 | """The item at the end of the edge""" 154 | node: Customer! 155 | } 156 | 157 | """List of items with pagination.""" 158 | type CustomerPagination { 159 | """Total object count.""" 160 | count: Int 161 | 162 | """Array of objects.""" 163 | items: [Customer!] 164 | 165 | """Information to aid in pagination.""" 166 | pageInfo: PaginationInfo! 167 | } 168 | 169 | scalar Date 170 | 171 | type Employee { 172 | _id: MongoID! 173 | address: CustomerAddress 174 | birthDate: Date 175 | chief: Employee 176 | 177 | """Category unique ID""" 178 | employeeID: Float 179 | firstName: String 180 | hireDate: Date 181 | lastName: String 182 | notes: String 183 | orderConnection( 184 | """Forward pagination argument for returning at most first edges""" 185 | after: String 186 | 187 | """Backward pagination argument for returning at most last edges""" 188 | before: String 189 | 190 | """Forward pagination argument for returning at most first edges""" 191 | first: Int 192 | 193 | """Backward pagination argument for returning at most last edges""" 194 | last: Int 195 | 196 | """Sort argument for data ordering""" 197 | sort: SortConnectionOrderEnum = _ID_DESC 198 | ): OrderConnection 199 | 200 | """ID of chief""" 201 | reportsTo: Float 202 | subordinates(limit: Int = 100, skip: Int, sort: SortFindManyEmployeeInput): [Employee!]! 203 | 204 | """Attached territory ID from region collection""" 205 | territoryIDs: [Float] 206 | title: String 207 | titleOfCourtesy: String 208 | } 209 | 210 | """List of items with pagination.""" 211 | type EmployeePagination { 212 | """Total object count.""" 213 | count: Int 214 | 215 | """Array of objects.""" 216 | items: [Employee!] 217 | 218 | """Information to aid in pagination.""" 219 | pageInfo: PaginationInfo! 220 | } 221 | 222 | interface ErrorInterface { 223 | """Generic error message""" 224 | message: String 225 | } 226 | 227 | input FilterFindManyCategoryCategoryIDOperatorsInput { 228 | exists: Boolean 229 | gt: Float 230 | gte: Float 231 | in: [Float] 232 | lt: Float 233 | lte: Float 234 | ne: Float 235 | nin: [Float] 236 | } 237 | 238 | input FilterFindManyCategoryInput { 239 | AND: [FilterFindManyCategoryInput!] 240 | OR: [FilterFindManyCategoryInput!] 241 | _id: MongoID 242 | 243 | """List of *indexed* fields that can be filtered via operators.""" 244 | _operators: FilterFindManyCategoryOperatorsInput 245 | 246 | """Category unique ID""" 247 | categoryID: Float 248 | description: String 249 | name: String 250 | } 251 | 252 | input FilterFindManyCategoryNameOperatorsInput { 253 | exists: Boolean 254 | gt: String 255 | gte: String 256 | in: [String] 257 | lt: String 258 | lte: String 259 | ne: String 260 | nin: [String] 261 | regex: RegExpAsString 262 | } 263 | 264 | """For performance reason this type contains only *indexed* fields.""" 265 | input FilterFindManyCategoryOperatorsInput { 266 | _id: FilterFindManyCategory_idOperatorsInput 267 | categoryID: FilterFindManyCategoryCategoryIDOperatorsInput 268 | name: FilterFindManyCategoryNameOperatorsInput 269 | } 270 | 271 | input FilterFindManyCategory_idOperatorsInput { 272 | exists: Boolean 273 | gt: MongoID 274 | gte: MongoID 275 | in: [MongoID] 276 | lt: MongoID 277 | lte: MongoID 278 | ne: MongoID 279 | nin: [MongoID] 280 | } 281 | 282 | input FilterFindManyCustomerAddressInput { 283 | city: String 284 | country: String 285 | phone: String 286 | postalCode: String 287 | region: String 288 | street: String 289 | } 290 | 291 | input FilterFindManyCustomerCompanyNameOperatorsInput { 292 | exists: Boolean 293 | gt: String 294 | gte: String 295 | in: [String] 296 | lt: String 297 | lte: String 298 | ne: String 299 | nin: [String] 300 | regex: RegExpAsString 301 | } 302 | 303 | input FilterFindManyCustomerCustomerIDOperatorsInput { 304 | exists: Boolean 305 | gt: String 306 | gte: String 307 | in: [String] 308 | lt: String 309 | lte: String 310 | ne: String 311 | nin: [String] 312 | regex: RegExpAsString 313 | } 314 | 315 | input FilterFindManyCustomerInput { 316 | AND: [FilterFindManyCustomerInput!] 317 | OR: [FilterFindManyCustomerInput!] 318 | _id: MongoID 319 | 320 | """List of *indexed* fields that can be filtered via operators.""" 321 | _operators: FilterFindManyCustomerOperatorsInput 322 | address: FilterFindManyCustomerAddressInput 323 | companyName: String 324 | contactName: String 325 | contactTitle: String 326 | 327 | """Customer unique ID""" 328 | customerID: String 329 | } 330 | 331 | """For performance reason this type contains only *indexed* fields.""" 332 | input FilterFindManyCustomerOperatorsInput { 333 | _id: FilterFindManyCustomer_idOperatorsInput 334 | companyName: FilterFindManyCustomerCompanyNameOperatorsInput 335 | customerID: FilterFindManyCustomerCustomerIDOperatorsInput 336 | } 337 | 338 | input FilterFindManyCustomer_idOperatorsInput { 339 | exists: Boolean 340 | gt: MongoID 341 | gte: MongoID 342 | in: [MongoID] 343 | lt: MongoID 344 | lte: MongoID 345 | ne: MongoID 346 | nin: [MongoID] 347 | } 348 | 349 | input FilterFindManyEmployeeEmployeeIDOperatorsInput { 350 | exists: Boolean 351 | gt: Float 352 | gte: Float 353 | in: [Float] 354 | lt: Float 355 | lte: Float 356 | ne: Float 357 | nin: [Float] 358 | } 359 | 360 | input FilterFindManyEmployeeInput { 361 | AND: [FilterFindManyEmployeeInput!] 362 | OR: [FilterFindManyEmployeeInput!] 363 | _id: MongoID 364 | 365 | """List of *indexed* fields that can be filtered via operators.""" 366 | _operators: FilterFindManyEmployeeOperatorsInput 367 | address: FilterFindManyCustomerAddressInput 368 | birthDate: Date 369 | 370 | """Category unique ID""" 371 | employeeID: Float 372 | firstName: String 373 | 374 | """Fulltext search with mongodb stemming and weights""" 375 | fullTextSearch: String 376 | hireDate: Date 377 | lastName: String 378 | notes: String 379 | 380 | """ID of chief""" 381 | reportsTo: Float 382 | 383 | """Attached territory ID from region collection""" 384 | territoryIDs: [Float] 385 | title: String 386 | titleOfCourtesy: String 387 | } 388 | 389 | input FilterFindManyEmployeeLastNameOperatorsInput { 390 | exists: Boolean 391 | gt: String 392 | gte: String 393 | in: [String] 394 | lt: String 395 | lte: String 396 | ne: String 397 | nin: [String] 398 | regex: RegExpAsString 399 | } 400 | 401 | """For performance reason this type contains only *indexed* fields.""" 402 | input FilterFindManyEmployeeOperatorsInput { 403 | _id: FilterFindManyEmployee_idOperatorsInput 404 | employeeID: FilterFindManyEmployeeEmployeeIDOperatorsInput 405 | lastName: FilterFindManyEmployeeLastNameOperatorsInput 406 | territoryIDs: FilterFindManyEmployeeTerritoryIDsOperatorsInput 407 | } 408 | 409 | input FilterFindManyEmployeeTerritoryIDsOperatorsInput { 410 | exists: Boolean 411 | gt: Float 412 | gte: Float 413 | in: [Float] 414 | lt: Float 415 | lte: Float 416 | ne: Float 417 | nin: [Float] 418 | } 419 | 420 | input FilterFindManyEmployee_idOperatorsInput { 421 | exists: Boolean 422 | gt: MongoID 423 | gte: MongoID 424 | in: [MongoID] 425 | lt: MongoID 426 | lte: MongoID 427 | ne: MongoID 428 | nin: [MongoID] 429 | } 430 | 431 | input FilterFindManyOrderDetailsInput { 432 | discount: Float 433 | productID: Float 434 | quantity: Float 435 | unitPrice: Float 436 | } 437 | 438 | input FilterFindManyOrderInput { 439 | AND: [FilterFindManyOrderInput!] 440 | OR: [FilterFindManyOrderInput!] 441 | _id: MongoID 442 | 443 | """List of *indexed* fields that can be filtered via operators.""" 444 | _operators: FilterFindManyOrderOperatorsInput 445 | customerID: String 446 | 447 | """List of ordered products""" 448 | details: [FilterFindManyOrderDetailsInput] 449 | employeeID: Float 450 | freight: Float 451 | orderDate: Date 452 | 453 | """Order unique ID""" 454 | orderID: Float 455 | requiredDate: Date 456 | shipAddress: FilterFindManyCustomerAddressInput 457 | shipName: String 458 | shipVia: Float 459 | shippedDate: Date 460 | } 461 | 462 | """For performance reason this type contains only *indexed* fields.""" 463 | input FilterFindManyOrderOperatorsInput { 464 | _id: FilterFindManyOrder_idOperatorsInput 465 | orderID: FilterFindManyOrderOrderIDOperatorsInput 466 | } 467 | 468 | input FilterFindManyOrderOrderIDOperatorsInput { 469 | exists: Boolean 470 | gt: Float 471 | gte: Float 472 | in: [Float] 473 | lt: Float 474 | lte: Float 475 | ne: Float 476 | nin: [Float] 477 | } 478 | 479 | input FilterFindManyOrder_idOperatorsInput { 480 | exists: Boolean 481 | gt: MongoID 482 | gte: MongoID 483 | in: [MongoID] 484 | lt: MongoID 485 | lte: MongoID 486 | ne: MongoID 487 | nin: [MongoID] 488 | } 489 | 490 | input FilterFindManyProductInput { 491 | AND: [FilterFindManyProductInput!] 492 | OR: [FilterFindManyProductInput!] 493 | _id: MongoID 494 | 495 | """List of *indexed* fields that can be filtered via operators.""" 496 | _operators: FilterFindManyProductOperatorsInput 497 | categoryID: Float 498 | discontinued: Boolean 499 | name: String 500 | 501 | """Search by regExp""" 502 | nameRegexp: String 503 | 504 | """Unique product id""" 505 | productID: Float 506 | quantityPerUnit: String 507 | reorderLevel: Float 508 | supplierID: Float 509 | unitPrice: Float 510 | unitsInStock: Float 511 | unitsOnOrder: Float 512 | } 513 | 514 | input FilterFindManyProductNameOperatorsInput { 515 | exists: Boolean 516 | gt: String 517 | gte: String 518 | in: [String] 519 | lt: String 520 | lte: String 521 | ne: String 522 | nin: [String] 523 | regex: RegExpAsString 524 | } 525 | 526 | """For performance reason this type contains only *indexed* fields.""" 527 | input FilterFindManyProductOperatorsInput { 528 | _id: FilterFindManyProduct_idOperatorsInput 529 | name: FilterFindManyProductNameOperatorsInput 530 | productID: FilterFindManyProductProductIDOperatorsInput 531 | unitPrice: FilterFindManyProductUnitPriceOperatorsInput 532 | } 533 | 534 | input FilterFindManyProductProductIDOperatorsInput { 535 | exists: Boolean 536 | gt: Float 537 | gte: Float 538 | in: [Float] 539 | lt: Float 540 | lte: Float 541 | ne: Float 542 | nin: [Float] 543 | } 544 | 545 | input FilterFindManyProductUnitPriceOperatorsInput { 546 | exists: Boolean 547 | gt: Float 548 | gte: Float 549 | in: [Float] 550 | lt: Float 551 | lte: Float 552 | ne: Float 553 | nin: [Float] 554 | } 555 | 556 | input FilterFindManyProduct_idOperatorsInput { 557 | exists: Boolean 558 | gt: MongoID 559 | gte: MongoID 560 | in: [MongoID] 561 | lt: MongoID 562 | lte: MongoID 563 | ne: MongoID 564 | nin: [MongoID] 565 | } 566 | 567 | input FilterFindManyRegionInput { 568 | AND: [FilterFindManyRegionInput!] 569 | OR: [FilterFindManyRegionInput!] 570 | _id: MongoID 571 | 572 | """List of *indexed* fields that can be filtered via operators.""" 573 | _operators: FilterFindManyRegionOperatorsInput 574 | name: String 575 | 576 | """Region unique ID""" 577 | regionID: Float 578 | territories: [FilterFindManyRegionTerritoriesInput] 579 | } 580 | 581 | """For performance reason this type contains only *indexed* fields.""" 582 | input FilterFindManyRegionOperatorsInput { 583 | _id: FilterFindManyRegion_idOperatorsInput 584 | regionID: FilterFindManyRegionRegionIDOperatorsInput 585 | } 586 | 587 | input FilterFindManyRegionRegionIDOperatorsInput { 588 | exists: Boolean 589 | gt: Float 590 | gte: Float 591 | in: [Float] 592 | lt: Float 593 | lte: Float 594 | ne: Float 595 | nin: [Float] 596 | } 597 | 598 | input FilterFindManyRegionTerritoriesInput { 599 | name: String 600 | territoryID: Float 601 | } 602 | 603 | input FilterFindManyRegion_idOperatorsInput { 604 | exists: Boolean 605 | gt: MongoID 606 | gte: MongoID 607 | in: [MongoID] 608 | lt: MongoID 609 | lte: MongoID 610 | ne: MongoID 611 | nin: [MongoID] 612 | } 613 | 614 | input FilterFindManyShipperInput { 615 | AND: [FilterFindManyShipperInput!] 616 | OR: [FilterFindManyShipperInput!] 617 | _id: MongoID 618 | 619 | """List of *indexed* fields that can be filtered via operators.""" 620 | _operators: FilterFindManyShipperOperatorsInput 621 | companyName: String 622 | phone: String 623 | 624 | """Shipper unique ID""" 625 | shipperID: Float 626 | } 627 | 628 | """For performance reason this type contains only *indexed* fields.""" 629 | input FilterFindManyShipperOperatorsInput { 630 | _id: FilterFindManyShipper_idOperatorsInput 631 | shipperID: FilterFindManyShipperShipperIDOperatorsInput 632 | } 633 | 634 | input FilterFindManyShipperShipperIDOperatorsInput { 635 | exists: Boolean 636 | gt: Float 637 | gte: Float 638 | in: [Float] 639 | lt: Float 640 | lte: Float 641 | ne: Float 642 | nin: [Float] 643 | } 644 | 645 | input FilterFindManyShipper_idOperatorsInput { 646 | exists: Boolean 647 | gt: MongoID 648 | gte: MongoID 649 | in: [MongoID] 650 | lt: MongoID 651 | lte: MongoID 652 | ne: MongoID 653 | nin: [MongoID] 654 | } 655 | 656 | input FilterFindManySupplierCompanyNameOperatorsInput { 657 | exists: Boolean 658 | gt: String 659 | gte: String 660 | in: [String] 661 | lt: String 662 | lte: String 663 | ne: String 664 | nin: [String] 665 | regex: RegExpAsString 666 | } 667 | 668 | input FilterFindManySupplierInput { 669 | AND: [FilterFindManySupplierInput!] 670 | OR: [FilterFindManySupplierInput!] 671 | _id: MongoID 672 | 673 | """List of *indexed* fields that can be filtered via operators.""" 674 | _operators: FilterFindManySupplierOperatorsInput 675 | address: FilterFindManyCustomerAddressInput 676 | companyName: String 677 | contactName: String 678 | contactTitle: String 679 | 680 | """Supplier unique ID""" 681 | supplierID: Float 682 | } 683 | 684 | """For performance reason this type contains only *indexed* fields.""" 685 | input FilterFindManySupplierOperatorsInput { 686 | _id: FilterFindManySupplier_idOperatorsInput 687 | companyName: FilterFindManySupplierCompanyNameOperatorsInput 688 | supplierID: FilterFindManySupplierSupplierIDOperatorsInput 689 | } 690 | 691 | input FilterFindManySupplierSupplierIDOperatorsInput { 692 | exists: Boolean 693 | gt: Float 694 | gte: Float 695 | in: [Float] 696 | lt: Float 697 | lte: Float 698 | ne: Float 699 | nin: [Float] 700 | } 701 | 702 | input FilterFindManySupplier_idOperatorsInput { 703 | exists: Boolean 704 | gt: MongoID 705 | gte: MongoID 706 | in: [MongoID] 707 | lt: MongoID 708 | lte: MongoID 709 | ne: MongoID 710 | nin: [MongoID] 711 | } 712 | 713 | input FilterFindOneCategoryCategoryIDOperatorsInput { 714 | exists: Boolean 715 | gt: Float 716 | gte: Float 717 | in: [Float] 718 | lt: Float 719 | lte: Float 720 | ne: Float 721 | nin: [Float] 722 | } 723 | 724 | input FilterFindOneCategoryInput { 725 | AND: [FilterFindOneCategoryInput!] 726 | OR: [FilterFindOneCategoryInput!] 727 | _id: MongoID 728 | 729 | """List of *indexed* fields that can be filtered via operators.""" 730 | _operators: FilterFindOneCategoryOperatorsInput 731 | 732 | """Category unique ID""" 733 | categoryID: Float 734 | description: String 735 | name: String 736 | } 737 | 738 | input FilterFindOneCategoryNameOperatorsInput { 739 | exists: Boolean 740 | gt: String 741 | gte: String 742 | in: [String] 743 | lt: String 744 | lte: String 745 | ne: String 746 | nin: [String] 747 | regex: RegExpAsString 748 | } 749 | 750 | """For performance reason this type contains only *indexed* fields.""" 751 | input FilterFindOneCategoryOperatorsInput { 752 | _id: FilterFindOneCategory_idOperatorsInput 753 | categoryID: FilterFindOneCategoryCategoryIDOperatorsInput 754 | name: FilterFindOneCategoryNameOperatorsInput 755 | } 756 | 757 | input FilterFindOneCategory_idOperatorsInput { 758 | exists: Boolean 759 | gt: MongoID 760 | gte: MongoID 761 | in: [MongoID] 762 | lt: MongoID 763 | lte: MongoID 764 | ne: MongoID 765 | nin: [MongoID] 766 | } 767 | 768 | input FilterFindOneCustomerAddressInput { 769 | city: String 770 | country: String 771 | phone: String 772 | postalCode: String 773 | region: String 774 | street: String 775 | } 776 | 777 | input FilterFindOneCustomerCompanyNameOperatorsInput { 778 | exists: Boolean 779 | gt: String 780 | gte: String 781 | in: [String] 782 | lt: String 783 | lte: String 784 | ne: String 785 | nin: [String] 786 | regex: RegExpAsString 787 | } 788 | 789 | input FilterFindOneCustomerCustomerIDOperatorsInput { 790 | exists: Boolean 791 | gt: String 792 | gte: String 793 | in: [String] 794 | lt: String 795 | lte: String 796 | ne: String 797 | nin: [String] 798 | regex: RegExpAsString 799 | } 800 | 801 | input FilterFindOneCustomerInput { 802 | AND: [FilterFindOneCustomerInput!] 803 | OR: [FilterFindOneCustomerInput!] 804 | _id: MongoID 805 | 806 | """List of *indexed* fields that can be filtered via operators.""" 807 | _operators: FilterFindOneCustomerOperatorsInput 808 | address: FilterFindOneCustomerAddressInput 809 | companyName: String 810 | contactName: String 811 | contactTitle: String 812 | 813 | """Customer unique ID""" 814 | customerID: String 815 | } 816 | 817 | """For performance reason this type contains only *indexed* fields.""" 818 | input FilterFindOneCustomerOperatorsInput { 819 | _id: FilterFindOneCustomer_idOperatorsInput 820 | companyName: FilterFindOneCustomerCompanyNameOperatorsInput 821 | customerID: FilterFindOneCustomerCustomerIDOperatorsInput 822 | } 823 | 824 | input FilterFindOneCustomer_idOperatorsInput { 825 | exists: Boolean 826 | gt: MongoID 827 | gte: MongoID 828 | in: [MongoID] 829 | lt: MongoID 830 | lte: MongoID 831 | ne: MongoID 832 | nin: [MongoID] 833 | } 834 | 835 | input FilterFindOneEmployeeEmployeeIDOperatorsInput { 836 | exists: Boolean 837 | gt: Float 838 | gte: Float 839 | in: [Float] 840 | lt: Float 841 | lte: Float 842 | ne: Float 843 | nin: [Float] 844 | } 845 | 846 | input FilterFindOneEmployeeInput { 847 | AND: [FilterFindOneEmployeeInput!] 848 | OR: [FilterFindOneEmployeeInput!] 849 | _id: MongoID 850 | 851 | """List of *indexed* fields that can be filtered via operators.""" 852 | _operators: FilterFindOneEmployeeOperatorsInput 853 | address: FilterFindOneCustomerAddressInput 854 | birthDate: Date 855 | 856 | """Category unique ID""" 857 | employeeID: Float 858 | firstName: String 859 | hireDate: Date 860 | lastName: String 861 | notes: String 862 | 863 | """ID of chief""" 864 | reportsTo: Float 865 | 866 | """Attached territory ID from region collection""" 867 | territoryIDs: [Float] 868 | title: String 869 | titleOfCourtesy: String 870 | } 871 | 872 | input FilterFindOneEmployeeLastNameOperatorsInput { 873 | exists: Boolean 874 | gt: String 875 | gte: String 876 | in: [String] 877 | lt: String 878 | lte: String 879 | ne: String 880 | nin: [String] 881 | regex: RegExpAsString 882 | } 883 | 884 | """For performance reason this type contains only *indexed* fields.""" 885 | input FilterFindOneEmployeeOperatorsInput { 886 | _id: FilterFindOneEmployee_idOperatorsInput 887 | employeeID: FilterFindOneEmployeeEmployeeIDOperatorsInput 888 | lastName: FilterFindOneEmployeeLastNameOperatorsInput 889 | territoryIDs: FilterFindOneEmployeeTerritoryIDsOperatorsInput 890 | } 891 | 892 | input FilterFindOneEmployeeTerritoryIDsOperatorsInput { 893 | exists: Boolean 894 | gt: Float 895 | gte: Float 896 | in: [Float] 897 | lt: Float 898 | lte: Float 899 | ne: Float 900 | nin: [Float] 901 | } 902 | 903 | input FilterFindOneEmployee_idOperatorsInput { 904 | exists: Boolean 905 | gt: MongoID 906 | gte: MongoID 907 | in: [MongoID] 908 | lt: MongoID 909 | lte: MongoID 910 | ne: MongoID 911 | nin: [MongoID] 912 | } 913 | 914 | input FilterFindOneOrderDetailsInput { 915 | discount: Float 916 | productID: Float 917 | quantity: Float 918 | unitPrice: Float 919 | } 920 | 921 | input FilterFindOneOrderInput { 922 | AND: [FilterFindOneOrderInput!] 923 | OR: [FilterFindOneOrderInput!] 924 | _id: MongoID 925 | 926 | """List of *indexed* fields that can be filtered via operators.""" 927 | _operators: FilterFindOneOrderOperatorsInput 928 | customerID: String 929 | 930 | """List of ordered products""" 931 | details: [FilterFindOneOrderDetailsInput] 932 | employeeID: Float 933 | freight: Float 934 | orderDate: Date 935 | 936 | """Order unique ID""" 937 | orderID: Float 938 | requiredDate: Date 939 | shipAddress: FilterFindOneCustomerAddressInput 940 | shipName: String 941 | shipVia: Float 942 | shippedDate: Date 943 | } 944 | 945 | """For performance reason this type contains only *indexed* fields.""" 946 | input FilterFindOneOrderOperatorsInput { 947 | _id: FilterFindOneOrder_idOperatorsInput 948 | orderID: FilterFindOneOrderOrderIDOperatorsInput 949 | } 950 | 951 | input FilterFindOneOrderOrderIDOperatorsInput { 952 | exists: Boolean 953 | gt: Float 954 | gte: Float 955 | in: [Float] 956 | lt: Float 957 | lte: Float 958 | ne: Float 959 | nin: [Float] 960 | } 961 | 962 | input FilterFindOneOrder_idOperatorsInput { 963 | exists: Boolean 964 | gt: MongoID 965 | gte: MongoID 966 | in: [MongoID] 967 | lt: MongoID 968 | lte: MongoID 969 | ne: MongoID 970 | nin: [MongoID] 971 | } 972 | 973 | input FilterFindOneProductInput { 974 | AND: [FilterFindOneProductInput!] 975 | OR: [FilterFindOneProductInput!] 976 | _id: MongoID 977 | 978 | """List of *indexed* fields that can be filtered via operators.""" 979 | _operators: FilterFindOneProductOperatorsInput 980 | categoryID: Float 981 | discontinued: Boolean 982 | name: String 983 | 984 | """Unique product id""" 985 | productID: Float 986 | quantityPerUnit: String 987 | reorderLevel: Float 988 | supplierID: Float 989 | unitPrice: Float 990 | unitsInStock: Float 991 | unitsOnOrder: Float 992 | } 993 | 994 | input FilterFindOneProductNameOperatorsInput { 995 | exists: Boolean 996 | gt: String 997 | gte: String 998 | in: [String] 999 | lt: String 1000 | lte: String 1001 | ne: String 1002 | nin: [String] 1003 | regex: RegExpAsString 1004 | } 1005 | 1006 | """For performance reason this type contains only *indexed* fields.""" 1007 | input FilterFindOneProductOperatorsInput { 1008 | _id: FilterFindOneProduct_idOperatorsInput 1009 | name: FilterFindOneProductNameOperatorsInput 1010 | productID: FilterFindOneProductProductIDOperatorsInput 1011 | unitPrice: FilterFindOneProductUnitPriceOperatorsInput 1012 | } 1013 | 1014 | input FilterFindOneProductProductIDOperatorsInput { 1015 | exists: Boolean 1016 | gt: Float 1017 | gte: Float 1018 | in: [Float] 1019 | lt: Float 1020 | lte: Float 1021 | ne: Float 1022 | nin: [Float] 1023 | } 1024 | 1025 | input FilterFindOneProductUnitPriceOperatorsInput { 1026 | exists: Boolean 1027 | gt: Float 1028 | gte: Float 1029 | in: [Float] 1030 | lt: Float 1031 | lte: Float 1032 | ne: Float 1033 | nin: [Float] 1034 | } 1035 | 1036 | input FilterFindOneProduct_idOperatorsInput { 1037 | exists: Boolean 1038 | gt: MongoID 1039 | gte: MongoID 1040 | in: [MongoID] 1041 | lt: MongoID 1042 | lte: MongoID 1043 | ne: MongoID 1044 | nin: [MongoID] 1045 | } 1046 | 1047 | input FilterFindOneRegionInput { 1048 | AND: [FilterFindOneRegionInput!] 1049 | OR: [FilterFindOneRegionInput!] 1050 | _id: MongoID 1051 | 1052 | """List of *indexed* fields that can be filtered via operators.""" 1053 | _operators: FilterFindOneRegionOperatorsInput 1054 | name: String 1055 | 1056 | """Region unique ID""" 1057 | regionID: Float 1058 | territories: [FilterFindOneRegionTerritoriesInput] 1059 | } 1060 | 1061 | """For performance reason this type contains only *indexed* fields.""" 1062 | input FilterFindOneRegionOperatorsInput { 1063 | _id: FilterFindOneRegion_idOperatorsInput 1064 | regionID: FilterFindOneRegionRegionIDOperatorsInput 1065 | } 1066 | 1067 | input FilterFindOneRegionRegionIDOperatorsInput { 1068 | exists: Boolean 1069 | gt: Float 1070 | gte: Float 1071 | in: [Float] 1072 | lt: Float 1073 | lte: Float 1074 | ne: Float 1075 | nin: [Float] 1076 | } 1077 | 1078 | input FilterFindOneRegionTerritoriesInput { 1079 | name: String 1080 | territoryID: Float 1081 | } 1082 | 1083 | input FilterFindOneRegion_idOperatorsInput { 1084 | exists: Boolean 1085 | gt: MongoID 1086 | gte: MongoID 1087 | in: [MongoID] 1088 | lt: MongoID 1089 | lte: MongoID 1090 | ne: MongoID 1091 | nin: [MongoID] 1092 | } 1093 | 1094 | input FilterFindOneShipperInput { 1095 | AND: [FilterFindOneShipperInput!] 1096 | OR: [FilterFindOneShipperInput!] 1097 | _id: MongoID 1098 | 1099 | """List of *indexed* fields that can be filtered via operators.""" 1100 | _operators: FilterFindOneShipperOperatorsInput 1101 | companyName: String 1102 | phone: String 1103 | 1104 | """Shipper unique ID""" 1105 | shipperID: Float 1106 | } 1107 | 1108 | """For performance reason this type contains only *indexed* fields.""" 1109 | input FilterFindOneShipperOperatorsInput { 1110 | _id: FilterFindOneShipper_idOperatorsInput 1111 | shipperID: FilterFindOneShipperShipperIDOperatorsInput 1112 | } 1113 | 1114 | input FilterFindOneShipperShipperIDOperatorsInput { 1115 | exists: Boolean 1116 | gt: Float 1117 | gte: Float 1118 | in: [Float] 1119 | lt: Float 1120 | lte: Float 1121 | ne: Float 1122 | nin: [Float] 1123 | } 1124 | 1125 | input FilterFindOneShipper_idOperatorsInput { 1126 | exists: Boolean 1127 | gt: MongoID 1128 | gte: MongoID 1129 | in: [MongoID] 1130 | lt: MongoID 1131 | lte: MongoID 1132 | ne: MongoID 1133 | nin: [MongoID] 1134 | } 1135 | 1136 | input FilterFindOneSupplierCompanyNameOperatorsInput { 1137 | exists: Boolean 1138 | gt: String 1139 | gte: String 1140 | in: [String] 1141 | lt: String 1142 | lte: String 1143 | ne: String 1144 | nin: [String] 1145 | regex: RegExpAsString 1146 | } 1147 | 1148 | input FilterFindOneSupplierInput { 1149 | AND: [FilterFindOneSupplierInput!] 1150 | OR: [FilterFindOneSupplierInput!] 1151 | _id: MongoID 1152 | 1153 | """List of *indexed* fields that can be filtered via operators.""" 1154 | _operators: FilterFindOneSupplierOperatorsInput 1155 | address: FilterFindOneCustomerAddressInput 1156 | companyName: String 1157 | contactName: String 1158 | contactTitle: String 1159 | 1160 | """Supplier unique ID""" 1161 | supplierID: Float 1162 | } 1163 | 1164 | """For performance reason this type contains only *indexed* fields.""" 1165 | input FilterFindOneSupplierOperatorsInput { 1166 | _id: FilterFindOneSupplier_idOperatorsInput 1167 | companyName: FilterFindOneSupplierCompanyNameOperatorsInput 1168 | supplierID: FilterFindOneSupplierSupplierIDOperatorsInput 1169 | } 1170 | 1171 | input FilterFindOneSupplierSupplierIDOperatorsInput { 1172 | exists: Boolean 1173 | gt: Float 1174 | gte: Float 1175 | in: [Float] 1176 | lt: Float 1177 | lte: Float 1178 | ne: Float 1179 | nin: [Float] 1180 | } 1181 | 1182 | input FilterFindOneSupplier_idOperatorsInput { 1183 | exists: Boolean 1184 | gt: MongoID 1185 | gte: MongoID 1186 | in: [MongoID] 1187 | lt: MongoID 1188 | lte: MongoID 1189 | ne: MongoID 1190 | nin: [MongoID] 1191 | } 1192 | 1193 | input FilterRemoveOneCustomerAddressInput { 1194 | city: String 1195 | country: String 1196 | phone: String 1197 | postalCode: String 1198 | region: String 1199 | street: String 1200 | } 1201 | 1202 | input FilterRemoveOneOrderDetailsInput { 1203 | discount: Float 1204 | productID: Float 1205 | quantity: Float 1206 | unitPrice: Float 1207 | } 1208 | 1209 | input FilterRemoveOneOrderInput { 1210 | AND: [FilterRemoveOneOrderInput!] 1211 | OR: [FilterRemoveOneOrderInput!] 1212 | _id: MongoID 1213 | 1214 | """List of *indexed* fields that can be filtered via operators.""" 1215 | _operators: FilterRemoveOneOrderOperatorsInput 1216 | customerID: String 1217 | 1218 | """List of ordered products""" 1219 | details: [FilterRemoveOneOrderDetailsInput] 1220 | employeeID: Float 1221 | freight: Float 1222 | orderDate: Date 1223 | 1224 | """Order unique ID""" 1225 | orderID: Float 1226 | requiredDate: Date 1227 | shipAddress: FilterRemoveOneCustomerAddressInput 1228 | shipName: String 1229 | shipVia: Float 1230 | shippedDate: Date 1231 | } 1232 | 1233 | """For performance reason this type contains only *indexed* fields.""" 1234 | input FilterRemoveOneOrderOperatorsInput { 1235 | _id: FilterRemoveOneOrder_idOperatorsInput 1236 | orderID: FilterRemoveOneOrderOrderIDOperatorsInput 1237 | } 1238 | 1239 | input FilterRemoveOneOrderOrderIDOperatorsInput { 1240 | exists: Boolean 1241 | gt: Float 1242 | gte: Float 1243 | in: [Float] 1244 | lt: Float 1245 | lte: Float 1246 | ne: Float 1247 | nin: [Float] 1248 | } 1249 | 1250 | input FilterRemoveOneOrder_idOperatorsInput { 1251 | exists: Boolean 1252 | gt: MongoID 1253 | gte: MongoID 1254 | in: [MongoID] 1255 | lt: MongoID 1256 | lte: MongoID 1257 | ne: MongoID 1258 | nin: [MongoID] 1259 | } 1260 | 1261 | input FilterRemoveOneProductInput { 1262 | AND: [FilterRemoveOneProductInput!] 1263 | OR: [FilterRemoveOneProductInput!] 1264 | _id: MongoID 1265 | 1266 | """List of *indexed* fields that can be filtered via operators.""" 1267 | _operators: FilterRemoveOneProductOperatorsInput 1268 | categoryID: Float 1269 | discontinued: Boolean 1270 | name: String 1271 | 1272 | """Unique product id""" 1273 | productID: Float 1274 | quantityPerUnit: String 1275 | reorderLevel: Float 1276 | supplierID: Float 1277 | unitPrice: Float 1278 | unitsInStock: Float 1279 | unitsOnOrder: Float 1280 | } 1281 | 1282 | input FilterRemoveOneProductNameOperatorsInput { 1283 | exists: Boolean 1284 | gt: String 1285 | gte: String 1286 | in: [String] 1287 | lt: String 1288 | lte: String 1289 | ne: String 1290 | nin: [String] 1291 | regex: RegExpAsString 1292 | } 1293 | 1294 | """For performance reason this type contains only *indexed* fields.""" 1295 | input FilterRemoveOneProductOperatorsInput { 1296 | _id: FilterRemoveOneProduct_idOperatorsInput 1297 | name: FilterRemoveOneProductNameOperatorsInput 1298 | productID: FilterRemoveOneProductProductIDOperatorsInput 1299 | unitPrice: FilterRemoveOneProductUnitPriceOperatorsInput 1300 | } 1301 | 1302 | input FilterRemoveOneProductProductIDOperatorsInput { 1303 | exists: Boolean 1304 | gt: Float 1305 | gte: Float 1306 | in: [Float] 1307 | lt: Float 1308 | lte: Float 1309 | ne: Float 1310 | nin: [Float] 1311 | } 1312 | 1313 | input FilterRemoveOneProductUnitPriceOperatorsInput { 1314 | exists: Boolean 1315 | gt: Float 1316 | gte: Float 1317 | in: [Float] 1318 | lt: Float 1319 | lte: Float 1320 | ne: Float 1321 | nin: [Float] 1322 | } 1323 | 1324 | input FilterRemoveOneProduct_idOperatorsInput { 1325 | exists: Boolean 1326 | gt: MongoID 1327 | gte: MongoID 1328 | in: [MongoID] 1329 | lt: MongoID 1330 | lte: MongoID 1331 | ne: MongoID 1332 | nin: [MongoID] 1333 | } 1334 | 1335 | """ 1336 | The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). 1337 | """ 1338 | scalar JSON 1339 | 1340 | type MongoError implements ErrorInterface { 1341 | """MongoDB error code""" 1342 | code: Int 1343 | 1344 | """MongoDB error message""" 1345 | message: String 1346 | } 1347 | 1348 | """ 1349 | The `ID` scalar type represents a unique MongoDB identifier in collection. MongoDB by default use 12-byte ObjectId value (https://docs.mongodb.com/manual/reference/bson-types/#objectid). But MongoDB also may accepts string or integer as correct values for _id field. 1350 | """ 1351 | scalar MongoID 1352 | 1353 | type Mutation { 1354 | """ 1355 | Create one document with mongoose defaults, setters, hooks and validation 1356 | """ 1357 | createOrder(record: CreateOneOrderInput!): CreateOneOrderPayload 1358 | 1359 | """ 1360 | Create one document with mongoose defaults, setters, hooks and validation 1361 | """ 1362 | createProduct(record: CreateOneProductInput!): CreateOneProductPayload 1363 | 1364 | """ 1365 | Remove one document: 1) Remove with hooks via findOneAndRemove. 2) Return removed document. 1366 | """ 1367 | removeOrder( 1368 | """Filter by fields""" 1369 | filter: FilterRemoveOneOrderInput 1370 | sort: SortRemoveOneOrderInput 1371 | ): RemoveOneOrderPayload 1372 | 1373 | """ 1374 | Remove one document: 1) Remove with hooks via findOneAndRemove. 2) Return removed document. 1375 | """ 1376 | removeProduct( 1377 | """Filter by fields""" 1378 | filter: FilterRemoveOneProductInput 1379 | sort: SortRemoveOneProductInput 1380 | ): RemoveOneProductPayload 1381 | 1382 | """ 1383 | Remove all data and seed DB from scratch. Anyway data automatically reloaded every 30 minutes. 1384 | """ 1385 | resetData: String 1386 | 1387 | """ 1388 | Update one document: 1) Retrieve one document by findById. 2) Apply updates to mongoose document. 3) Mongoose applies defaults, setters, hooks and validation. 4) And save it. 1389 | """ 1390 | updateEmployee(_id: MongoID!, record: UpdateByIdEmployeeInput!): UpdateByIdEmployeePayload 1391 | 1392 | """ 1393 | Update one document: 1) Retrieve one document by findById. 2) Apply updates to mongoose document. 3) Mongoose applies defaults, setters, hooks and validation. 4) And save it. 1394 | """ 1395 | updateOrder(_id: MongoID!, record: UpdateByIdOrderInput!): UpdateByIdOrderPayload 1396 | 1397 | """ 1398 | Update one document: 1) Retrieve one document by findById. 2) Apply updates to mongoose document. 3) Mongoose applies defaults, setters, hooks and validation. 4) And save it. 1399 | """ 1400 | updateProduct(_id: MongoID!, record: UpdateByIdProductInput!): UpdateByIdProductPayload 1401 | } 1402 | 1403 | type Order { 1404 | _id: MongoID! 1405 | customer: Customer 1406 | customerID: String 1407 | 1408 | """List of ordered products""" 1409 | details: [OrderDetails] 1410 | employee: Employee 1411 | employeeID: Float 1412 | freight: Float 1413 | orderDate: Date 1414 | 1415 | """Order unique ID""" 1416 | orderID: Float 1417 | requiredDate: Date 1418 | shipAddress: CustomerAddress 1419 | shipName: String 1420 | shipVia: Float 1421 | shippedDate: Date 1422 | shipper: Shipper 1423 | } 1424 | 1425 | """A connection to a list of items.""" 1426 | type OrderConnection { 1427 | """Total object count.""" 1428 | count: Int! 1429 | 1430 | """Information to aid in pagination.""" 1431 | edges: [OrderEdge!]! 1432 | 1433 | """Information to aid in pagination.""" 1434 | pageInfo: PageInfo! 1435 | } 1436 | 1437 | type OrderDetails { 1438 | discount: Float 1439 | product: Product 1440 | productID: Float 1441 | quantity: Float 1442 | unitPrice: Float 1443 | } 1444 | 1445 | input OrderDetailsInput { 1446 | discount: Float 1447 | productID: Float 1448 | quantity: Float 1449 | unitPrice: Float 1450 | } 1451 | 1452 | """An edge in a connection.""" 1453 | type OrderEdge { 1454 | """A cursor for use in pagination""" 1455 | cursor: String! 1456 | 1457 | """The item at the end of the edge""" 1458 | node: Order! 1459 | } 1460 | 1461 | """List of items with pagination.""" 1462 | type OrderPagination { 1463 | """Total object count.""" 1464 | count: Int 1465 | 1466 | """Array of objects.""" 1467 | items: [Order!] 1468 | 1469 | """Information to aid in pagination.""" 1470 | pageInfo: PaginationInfo! 1471 | } 1472 | 1473 | """Information about pagination in a connection.""" 1474 | type PageInfo { 1475 | """When paginating forwards, the cursor to continue.""" 1476 | endCursor: String 1477 | 1478 | """When paginating forwards, are there more items?""" 1479 | hasNextPage: Boolean! 1480 | 1481 | """When paginating backwards, are there more items?""" 1482 | hasPreviousPage: Boolean! 1483 | 1484 | """When paginating backwards, the cursor to continue.""" 1485 | startCursor: String 1486 | } 1487 | 1488 | type PaginationInfo { 1489 | currentPage: Int! 1490 | hasNextPage: Boolean 1491 | hasPreviousPage: Boolean 1492 | itemCount: Int 1493 | pageCount: Int 1494 | perPage: Int! 1495 | } 1496 | 1497 | type Product { 1498 | _id: MongoID! 1499 | category: Category 1500 | categoryID: Float 1501 | discontinued: Boolean 1502 | name: String 1503 | orderConnection( 1504 | """Forward pagination argument for returning at most first edges""" 1505 | after: String 1506 | 1507 | """Backward pagination argument for returning at most last edges""" 1508 | before: String 1509 | 1510 | """Forward pagination argument for returning at most first edges""" 1511 | first: Int 1512 | 1513 | """Backward pagination argument for returning at most last edges""" 1514 | last: Int 1515 | 1516 | """Sort argument for data ordering""" 1517 | sort: SortConnectionOrderEnum = _ID_DESC 1518 | ): OrderConnection 1519 | orderList(limit: Int = 100, skip: Int, sort: SortFindManyOrderInput): [Order!]! 1520 | 1521 | """Unique product id""" 1522 | productID: Float 1523 | quantityPerUnit: String 1524 | reorderLevel: Float 1525 | supplier: Supplier 1526 | supplierID: Float 1527 | unitPrice: Float 1528 | unitsInStock: Float 1529 | unitsOnOrder: Float 1530 | } 1531 | 1532 | """A connection to a list of items.""" 1533 | type ProductConnection { 1534 | """Total object count.""" 1535 | count: Int! 1536 | 1537 | """Information to aid in pagination.""" 1538 | edges: [ProductEdge!]! 1539 | 1540 | """Information to aid in pagination.""" 1541 | pageInfo: PageInfo! 1542 | } 1543 | 1544 | """An edge in a connection.""" 1545 | type ProductEdge { 1546 | """A cursor for use in pagination""" 1547 | cursor: String! 1548 | 1549 | """The item at the end of the edge""" 1550 | node: Product! 1551 | } 1552 | 1553 | """List of items with pagination.""" 1554 | type ProductPagination { 1555 | """Total object count.""" 1556 | count: Int 1557 | 1558 | """Array of objects.""" 1559 | items: [Product!] 1560 | 1561 | """Information to aid in pagination.""" 1562 | pageInfo: PaginationInfo! 1563 | } 1564 | 1565 | type Query { 1566 | """Data under client context""" 1567 | viewer: Viewer 1568 | } 1569 | 1570 | """ 1571 | The string representation of JavaScript regexp. You may provide it with flags "/^abc.*/i" or without flags like "^abc.*". More info about RegExp characters and flags: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions 1572 | """ 1573 | scalar RegExpAsString 1574 | 1575 | type Region { 1576 | _id: MongoID! 1577 | employees(limit: Int = 100, skip: Int, sort: SortFindManyEmployeeInput): [Employee!]! 1578 | name: String 1579 | 1580 | """Region unique ID""" 1581 | regionID: Float 1582 | territories: [RegionTerritories] 1583 | } 1584 | 1585 | type RegionTerritories { 1586 | name: String 1587 | territoryID: Float 1588 | } 1589 | 1590 | type RemoveOneOrderPayload { 1591 | """ 1592 | Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. 1593 | """ 1594 | error: ErrorInterface 1595 | query: Query 1596 | 1597 | """Removed document""" 1598 | record: Order 1599 | 1600 | """Document ID""" 1601 | recordId: MongoID 1602 | } 1603 | 1604 | type RemoveOneProductPayload { 1605 | """ 1606 | Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. 1607 | """ 1608 | error: ErrorInterface 1609 | query: Query 1610 | 1611 | """Removed document""" 1612 | record: Product 1613 | 1614 | """Document ID""" 1615 | recordId: MongoID 1616 | } 1617 | 1618 | type RuntimeError implements ErrorInterface { 1619 | """Runtime error message""" 1620 | message: String 1621 | } 1622 | 1623 | type Shipper { 1624 | _id: MongoID! 1625 | companyName: String 1626 | orderConnection( 1627 | """Forward pagination argument for returning at most first edges""" 1628 | after: String 1629 | 1630 | """Backward pagination argument for returning at most last edges""" 1631 | before: String 1632 | 1633 | """Forward pagination argument for returning at most first edges""" 1634 | first: Int 1635 | 1636 | """Backward pagination argument for returning at most last edges""" 1637 | last: Int 1638 | 1639 | """Sort argument for data ordering""" 1640 | sort: SortConnectionOrderEnum = _ID_DESC 1641 | ): OrderConnection 1642 | phone: String 1643 | 1644 | """Shipper unique ID""" 1645 | shipperID: Float 1646 | } 1647 | 1648 | enum SortConnectionCustomerEnum { 1649 | COMPANYNAME_ASC 1650 | COMPANYNAME_DESC 1651 | CUSTOMERID_ASC 1652 | CUSTOMERID_DESC 1653 | _ID_ASC 1654 | _ID_DESC 1655 | } 1656 | 1657 | enum SortConnectionOrderEnum { 1658 | ORDERID_ASC 1659 | ORDERID_DESC 1660 | _ID_ASC 1661 | _ID_DESC 1662 | } 1663 | 1664 | enum SortConnectionProductEnum { 1665 | NAME__SUPPLIERID_ASC 1666 | NAME__SUPPLIERID_DESC 1667 | PRODUCTID_ASC 1668 | PRODUCTID_DESC 1669 | _ID_ASC 1670 | _ID_DESC 1671 | } 1672 | 1673 | enum SortConnectionSupplierEnum { 1674 | COMPANYNAME_ASC 1675 | COMPANYNAME_DESC 1676 | SUPPLIERID_ASC 1677 | SUPPLIERID_DESC 1678 | _ID_ASC 1679 | _ID_DESC 1680 | } 1681 | 1682 | enum SortFindManyCategoryInput { 1683 | CATEGORYID_ASC 1684 | CATEGORYID_DESC 1685 | NAME_ASC 1686 | NAME_DESC 1687 | _ID_ASC 1688 | _ID_DESC 1689 | } 1690 | 1691 | enum SortFindManyCustomerInput { 1692 | COMPANYNAME_ASC 1693 | COMPANYNAME_DESC 1694 | CUSTOMERID_ASC 1695 | CUSTOMERID_DESC 1696 | _ID_ASC 1697 | _ID_DESC 1698 | } 1699 | 1700 | enum SortFindManyEmployeeInput { 1701 | EMPLOYEEID_ASC 1702 | EMPLOYEEID_DESC 1703 | LASTNAME_ASC 1704 | LASTNAME_DESC 1705 | LASTNAME__FIRSTNAME_ASC 1706 | LASTNAME__FIRSTNAME_DESC 1707 | TERRITORYIDS_ASC 1708 | TERRITORYIDS_DESC 1709 | _ID_ASC 1710 | _ID_DESC 1711 | } 1712 | 1713 | enum SortFindManyOrderInput { 1714 | ORDERID_ASC 1715 | ORDERID_DESC 1716 | _ID_ASC 1717 | _ID_DESC 1718 | } 1719 | 1720 | enum SortFindManyProductInput { 1721 | NAME_ASC 1722 | NAME_DESC 1723 | NAME__SUPPLIERID_ASC 1724 | NAME__SUPPLIERID_DESC 1725 | PRODUCTID_ASC 1726 | PRODUCTID_DESC 1727 | UNITPRICE_ASC 1728 | UNITPRICE_DESC 1729 | _ID_ASC 1730 | _ID_DESC 1731 | } 1732 | 1733 | enum SortFindManyRegionInput { 1734 | REGIONID_ASC 1735 | REGIONID_DESC 1736 | _ID_ASC 1737 | _ID_DESC 1738 | } 1739 | 1740 | enum SortFindManyShipperInput { 1741 | SHIPPERID_ASC 1742 | SHIPPERID_DESC 1743 | _ID_ASC 1744 | _ID_DESC 1745 | } 1746 | 1747 | enum SortFindOneCategoryInput { 1748 | CATEGORYID_ASC 1749 | CATEGORYID_DESC 1750 | NAME_ASC 1751 | NAME_DESC 1752 | _ID_ASC 1753 | _ID_DESC 1754 | } 1755 | 1756 | enum SortFindOneCustomerInput { 1757 | COMPANYNAME_ASC 1758 | COMPANYNAME_DESC 1759 | CUSTOMERID_ASC 1760 | CUSTOMERID_DESC 1761 | _ID_ASC 1762 | _ID_DESC 1763 | } 1764 | 1765 | enum SortFindOneEmployeeInput { 1766 | EMPLOYEEID_ASC 1767 | EMPLOYEEID_DESC 1768 | LASTNAME_ASC 1769 | LASTNAME_DESC 1770 | LASTNAME__FIRSTNAME_ASC 1771 | LASTNAME__FIRSTNAME_DESC 1772 | TERRITORYIDS_ASC 1773 | TERRITORYIDS_DESC 1774 | _ID_ASC 1775 | _ID_DESC 1776 | } 1777 | 1778 | enum SortFindOneOrderInput { 1779 | ORDERID_ASC 1780 | ORDERID_DESC 1781 | _ID_ASC 1782 | _ID_DESC 1783 | } 1784 | 1785 | enum SortFindOneProductInput { 1786 | NAME_ASC 1787 | NAME_DESC 1788 | NAME__SUPPLIERID_ASC 1789 | NAME__SUPPLIERID_DESC 1790 | PRODUCTID_ASC 1791 | PRODUCTID_DESC 1792 | UNITPRICE_ASC 1793 | UNITPRICE_DESC 1794 | _ID_ASC 1795 | _ID_DESC 1796 | } 1797 | 1798 | enum SortFindOneRegionInput { 1799 | REGIONID_ASC 1800 | REGIONID_DESC 1801 | _ID_ASC 1802 | _ID_DESC 1803 | } 1804 | 1805 | enum SortFindOneShipperInput { 1806 | SHIPPERID_ASC 1807 | SHIPPERID_DESC 1808 | _ID_ASC 1809 | _ID_DESC 1810 | } 1811 | 1812 | enum SortFindOneSupplierInput { 1813 | COMPANYNAME_ASC 1814 | COMPANYNAME_DESC 1815 | SUPPLIERID_ASC 1816 | SUPPLIERID_DESC 1817 | _ID_ASC 1818 | _ID_DESC 1819 | } 1820 | 1821 | enum SortRemoveOneOrderInput { 1822 | ORDERID_ASC 1823 | ORDERID_DESC 1824 | _ID_ASC 1825 | _ID_DESC 1826 | } 1827 | 1828 | enum SortRemoveOneProductInput { 1829 | NAME_ASC 1830 | NAME_DESC 1831 | NAME__SUPPLIERID_ASC 1832 | NAME__SUPPLIERID_DESC 1833 | PRODUCTID_ASC 1834 | PRODUCTID_DESC 1835 | UNITPRICE_ASC 1836 | UNITPRICE_DESC 1837 | _ID_ASC 1838 | _ID_DESC 1839 | } 1840 | 1841 | type Subscription { 1842 | orderCreated: Order 1843 | orderRemoved: MongoID 1844 | orderUpdated: Order 1845 | } 1846 | 1847 | type Supplier { 1848 | _id: MongoID! 1849 | address: CustomerAddress 1850 | companyName: String 1851 | contactName: String 1852 | contactTitle: String 1853 | productConnection( 1854 | """Forward pagination argument for returning at most first edges""" 1855 | after: String 1856 | 1857 | """Backward pagination argument for returning at most last edges""" 1858 | before: String 1859 | 1860 | """Forward pagination argument for returning at most first edges""" 1861 | first: Int 1862 | 1863 | """Backward pagination argument for returning at most last edges""" 1864 | last: Int 1865 | 1866 | """Sort argument for data ordering""" 1867 | sort: SortConnectionProductEnum = _ID_DESC 1868 | ): ProductConnection 1869 | 1870 | """Supplier unique ID""" 1871 | supplierID: Float 1872 | } 1873 | 1874 | """A connection to a list of items.""" 1875 | type SupplierConnection { 1876 | """Total object count.""" 1877 | count: Int! 1878 | 1879 | """Information to aid in pagination.""" 1880 | edges: [SupplierEdge!]! 1881 | 1882 | """Information to aid in pagination.""" 1883 | pageInfo: PageInfo! 1884 | } 1885 | 1886 | """An edge in a connection.""" 1887 | type SupplierEdge { 1888 | """A cursor for use in pagination""" 1889 | cursor: String! 1890 | 1891 | """The item at the end of the edge""" 1892 | node: Supplier! 1893 | } 1894 | 1895 | input UpdateByIdCustomerAddressInput { 1896 | city: String 1897 | country: String 1898 | phone: String 1899 | postalCode: String 1900 | region: String 1901 | street: String 1902 | } 1903 | 1904 | input UpdateByIdEmployeeInput { 1905 | address: UpdateByIdCustomerAddressInput 1906 | birthDate: Date 1907 | 1908 | """Category unique ID""" 1909 | employeeID: Float 1910 | firstName: String 1911 | hireDate: Date 1912 | lastName: String 1913 | notes: String 1914 | 1915 | """ID of chief""" 1916 | reportsTo: Float 1917 | 1918 | """Attached territory ID from region collection""" 1919 | territoryIDs: [Float] 1920 | title: String 1921 | titleOfCourtesy: String 1922 | } 1923 | 1924 | type UpdateByIdEmployeePayload { 1925 | """ 1926 | Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. 1927 | """ 1928 | error: ErrorInterface 1929 | query: Query 1930 | 1931 | """Updated document""" 1932 | record: Employee 1933 | 1934 | """Document ID""" 1935 | recordId: MongoID 1936 | } 1937 | 1938 | input UpdateByIdOrderDetailsInput { 1939 | discount: Float 1940 | productID: Float 1941 | quantity: Float 1942 | unitPrice: Float 1943 | } 1944 | 1945 | input UpdateByIdOrderInput { 1946 | customerID: String 1947 | 1948 | """List of ordered products""" 1949 | details: [UpdateByIdOrderDetailsInput] 1950 | employeeID: Float 1951 | freight: Float 1952 | orderDate: Date 1953 | 1954 | """Order unique ID""" 1955 | orderID: Float 1956 | requiredDate: Date 1957 | shipAddress: UpdateByIdCustomerAddressInput 1958 | shipName: String 1959 | shipVia: Float 1960 | shippedDate: Date 1961 | } 1962 | 1963 | type UpdateByIdOrderPayload { 1964 | """ 1965 | Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. 1966 | """ 1967 | error: ErrorInterface 1968 | query: Query 1969 | 1970 | """Updated document""" 1971 | record: Order 1972 | 1973 | """Document ID""" 1974 | recordId: MongoID 1975 | } 1976 | 1977 | input UpdateByIdProductInput { 1978 | categoryID: Float 1979 | discontinued: Boolean 1980 | name: String 1981 | 1982 | """Unique product id""" 1983 | productID: Float 1984 | quantityPerUnit: String 1985 | reorderLevel: Float 1986 | supplierID: Float 1987 | unitPrice: Float 1988 | unitsInStock: Float 1989 | unitsOnOrder: Float 1990 | } 1991 | 1992 | type UpdateByIdProductPayload { 1993 | """ 1994 | Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. 1995 | """ 1996 | error: ErrorInterface 1997 | query: Query 1998 | 1999 | """Updated document""" 2000 | record: Product 2001 | 2002 | """Document ID""" 2003 | recordId: MongoID 2004 | } 2005 | 2006 | type ValidationError implements ErrorInterface { 2007 | """List of validator errors""" 2008 | errors: [ValidatorError!] 2009 | 2010 | """Combined error message from all validators""" 2011 | message: String 2012 | } 2013 | 2014 | type ValidatorError { 2015 | """ 2016 | Input record idx in array which occurs the validation error. This `idx` is useful for createMany operation. For singular operations it always be 0. For *Many operations `idx` represents record index in array received from user. 2017 | """ 2018 | idx: Int! 2019 | 2020 | """Validation error message""" 2021 | message: String 2022 | 2023 | """Source of the validation error from the model path""" 2024 | path: String 2025 | 2026 | """Field value which occurs the validation error""" 2027 | value: JSON 2028 | } 2029 | 2030 | type Viewer { 2031 | category( 2032 | """Filter by fields""" 2033 | filter: FilterFindOneCategoryInput 2034 | skip: Int 2035 | sort: SortFindOneCategoryInput 2036 | ): Category 2037 | categoryList( 2038 | """Filter by fields""" 2039 | filter: FilterFindManyCategoryInput 2040 | limit: Int = 100 2041 | skip: Int 2042 | sort: SortFindManyCategoryInput 2043 | ): [Category!]! 2044 | customer( 2045 | """Filter by fields""" 2046 | filter: FilterFindOneCustomerInput 2047 | skip: Int 2048 | sort: SortFindOneCustomerInput 2049 | ): Customer 2050 | customerConnection( 2051 | """Forward pagination argument for returning at most first edges""" 2052 | after: String 2053 | 2054 | """Backward pagination argument for returning at most last edges""" 2055 | before: String 2056 | 2057 | """Filter by fields""" 2058 | filter: FilterFindManyCustomerInput 2059 | 2060 | """Forward pagination argument for returning at most first edges""" 2061 | first: Int 2062 | 2063 | """Backward pagination argument for returning at most last edges""" 2064 | last: Int 2065 | 2066 | """Sort argument for data ordering""" 2067 | sort: SortConnectionCustomerEnum = _ID_DESC 2068 | ): CustomerConnection 2069 | customerPagination( 2070 | """Filter by fields""" 2071 | filter: FilterFindManyCustomerInput 2072 | 2073 | """Page number for displaying""" 2074 | page: Int 2075 | perPage: Int = 20 2076 | sort: SortFindManyCustomerInput 2077 | ): CustomerPagination 2078 | employee( 2079 | """Filter by fields""" 2080 | filter: FilterFindOneEmployeeInput 2081 | skip: Int 2082 | sort: SortFindOneEmployeeInput 2083 | ): Employee 2084 | employeeList( 2085 | """Filter by fields""" 2086 | filter: FilterFindManyEmployeeInput 2087 | limit: Int = 100 2088 | skip: Int 2089 | sort: SortFindManyEmployeeInput 2090 | ): [Employee!]! 2091 | employeePagination( 2092 | """Filter by fields""" 2093 | filter: FilterFindManyEmployeeInput 2094 | 2095 | """Page number for displaying""" 2096 | page: Int 2097 | perPage: Int = 20 2098 | sort: SortFindManyEmployeeInput 2099 | ): EmployeePagination 2100 | order( 2101 | """Filter by fields""" 2102 | filter: FilterFindOneOrderInput 2103 | skip: Int 2104 | sort: SortFindOneOrderInput 2105 | ): Order 2106 | orderConnection( 2107 | """Forward pagination argument for returning at most first edges""" 2108 | after: String 2109 | 2110 | """Backward pagination argument for returning at most last edges""" 2111 | before: String 2112 | 2113 | """Filter by fields""" 2114 | filter: FilterFindManyOrderInput 2115 | 2116 | """Forward pagination argument for returning at most first edges""" 2117 | first: Int 2118 | 2119 | """Backward pagination argument for returning at most last edges""" 2120 | last: Int 2121 | 2122 | """Sort argument for data ordering""" 2123 | sort: SortConnectionOrderEnum = _ID_DESC 2124 | ): OrderConnection 2125 | orderPagination( 2126 | """Filter by fields""" 2127 | filter: FilterFindManyOrderInput 2128 | 2129 | """Page number for displaying""" 2130 | page: Int 2131 | perPage: Int = 20 2132 | sort: SortFindManyOrderInput 2133 | ): OrderPagination 2134 | product( 2135 | """Filter by fields""" 2136 | filter: FilterFindOneProductInput 2137 | skip: Int 2138 | sort: SortFindOneProductInput 2139 | ): Product 2140 | productConnection( 2141 | """Forward pagination argument for returning at most first edges""" 2142 | after: String 2143 | 2144 | """Backward pagination argument for returning at most last edges""" 2145 | before: String 2146 | 2147 | """Filter by fields""" 2148 | filter: FilterFindManyProductInput 2149 | 2150 | """Forward pagination argument for returning at most first edges""" 2151 | first: Int 2152 | 2153 | """Backward pagination argument for returning at most last edges""" 2154 | last: Int 2155 | 2156 | """Sort argument for data ordering""" 2157 | sort: SortConnectionProductEnum = _ID_DESC 2158 | ): ProductConnection 2159 | productList( 2160 | """Filter by fields""" 2161 | filter: FilterFindManyProductInput 2162 | limit: Int = 100 2163 | skip: Int 2164 | sort: SortFindManyProductInput 2165 | ): [Product!]! 2166 | productPagination( 2167 | """Filter by fields""" 2168 | filter: FilterFindManyProductInput 2169 | 2170 | """Page number for displaying""" 2171 | page: Int 2172 | perPage: Int = 20 2173 | sort: SortFindManyProductInput 2174 | ): ProductPagination 2175 | region( 2176 | """Filter by fields""" 2177 | filter: FilterFindOneRegionInput 2178 | skip: Int 2179 | sort: SortFindOneRegionInput 2180 | ): Region 2181 | regionList( 2182 | """Filter by fields""" 2183 | filter: FilterFindManyRegionInput 2184 | limit: Int = 100 2185 | skip: Int 2186 | sort: SortFindManyRegionInput 2187 | ): [Region!]! 2188 | shipper( 2189 | """Filter by fields""" 2190 | filter: FilterFindOneShipperInput 2191 | skip: Int 2192 | sort: SortFindOneShipperInput 2193 | ): Shipper 2194 | shipperList( 2195 | """Filter by fields""" 2196 | filter: FilterFindManyShipperInput 2197 | limit: Int = 100 2198 | skip: Int 2199 | sort: SortFindManyShipperInput 2200 | ): [Shipper!]! 2201 | supplier( 2202 | """Filter by fields""" 2203 | filter: FilterFindOneSupplierInput 2204 | skip: Int 2205 | sort: SortFindOneSupplierInput 2206 | ): Supplier 2207 | supplierConnection( 2208 | """Forward pagination argument for returning at most first edges""" 2209 | after: String 2210 | 2211 | """Backward pagination argument for returning at most last edges""" 2212 | before: String 2213 | 2214 | """Filter by fields""" 2215 | filter: FilterFindManySupplierInput 2216 | 2217 | """Forward pagination argument for returning at most first edges""" 2218 | first: Int 2219 | 2220 | """Backward pagination argument for returning at most last edges""" 2221 | last: Int 2222 | 2223 | """Sort argument for data ordering""" 2224 | sort: SortConnectionSupplierEnum = _ID_DESC 2225 | ): SupplierConnection 2226 | } 2227 | -------------------------------------------------------------------------------- /src/__generated__/types.ts: -------------------------------------------------------------------------------- 1 | export type Maybe = T | null; 2 | export type Exact = { [K in keyof T]: T[K] }; 3 | export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; 4 | export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; 5 | /** All built-in and custom scalars, mapped to their actual values */ 6 | export type Scalars = { 7 | ID: string; 8 | String: string; 9 | Boolean: boolean; 10 | Int: number; 11 | Float: number; 12 | Date: string; 13 | /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ 14 | JSON: any; 15 | /** The `ID` scalar type represents a unique MongoDB identifier in collection. MongoDB by default use 12-byte ObjectId value (https://docs.mongodb.com/manual/reference/bson-types/#objectid). But MongoDB also may accepts string or integer as correct values for _id field. */ 16 | MongoID: string; 17 | /** The string representation of JavaScript regexp. You may provide it with flags "/^abc.*\/i" or without flags like "^abc.*". More info about RegExp characters and flags: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions */ 18 | RegExpAsString: string; 19 | }; 20 | 21 | export type Category = { 22 | __typename?: 'Category'; 23 | _id: Scalars['MongoID']; 24 | /** Category unique ID */ 25 | categoryID?: Maybe; 26 | description?: Maybe; 27 | name?: Maybe; 28 | productConnection?: Maybe; 29 | productList: Array; 30 | }; 31 | 32 | 33 | export type CategoryProductConnectionArgs = { 34 | after?: Maybe; 35 | before?: Maybe; 36 | first?: Maybe; 37 | last?: Maybe; 38 | sort?: Maybe; 39 | }; 40 | 41 | 42 | export type CategoryProductListArgs = { 43 | limit?: Maybe; 44 | skip?: Maybe; 45 | sort?: Maybe; 46 | }; 47 | 48 | export type CreateOneOrderInput = { 49 | customerID?: Maybe; 50 | /** List of ordered products */ 51 | details?: Maybe>>; 52 | employeeID?: Maybe; 53 | freight?: Maybe; 54 | orderDate?: Maybe; 55 | /** Order unique ID */ 56 | orderID?: Maybe; 57 | requiredDate?: Maybe; 58 | shipAddress?: Maybe; 59 | shipName?: Maybe; 60 | shipVia?: Maybe; 61 | shippedDate?: Maybe; 62 | }; 63 | 64 | export type CreateOneOrderPayload = { 65 | __typename?: 'CreateOneOrderPayload'; 66 | /** Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. */ 67 | error?: Maybe; 68 | query?: Maybe; 69 | /** Created document */ 70 | record?: Maybe; 71 | /** Document ID */ 72 | recordId?: Maybe; 73 | }; 74 | 75 | export type CreateOneProductInput = { 76 | categoryID?: Maybe; 77 | discontinued?: Maybe; 78 | name?: Maybe; 79 | /** Unique product id */ 80 | productID?: Maybe; 81 | quantityPerUnit?: Maybe; 82 | reorderLevel?: Maybe; 83 | supplierID?: Maybe; 84 | unitPrice?: Maybe; 85 | unitsInStock?: Maybe; 86 | unitsOnOrder?: Maybe; 87 | }; 88 | 89 | export type CreateOneProductPayload = { 90 | __typename?: 'CreateOneProductPayload'; 91 | /** Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. */ 92 | error?: Maybe; 93 | query?: Maybe; 94 | /** Created document */ 95 | record?: Maybe; 96 | /** Document ID */ 97 | recordId?: Maybe; 98 | }; 99 | 100 | export type Customer = { 101 | __typename?: 'Customer'; 102 | _id: Scalars['MongoID']; 103 | address?: Maybe; 104 | companyName?: Maybe; 105 | contactName?: Maybe; 106 | contactTitle?: Maybe; 107 | /** Customer unique ID */ 108 | customerID?: Maybe; 109 | orderConnection?: Maybe; 110 | orderList: Array; 111 | }; 112 | 113 | 114 | export type CustomerOrderConnectionArgs = { 115 | after?: Maybe; 116 | before?: Maybe; 117 | first?: Maybe; 118 | last?: Maybe; 119 | sort?: Maybe; 120 | }; 121 | 122 | 123 | export type CustomerOrderListArgs = { 124 | limit?: Maybe; 125 | skip?: Maybe; 126 | sort?: Maybe; 127 | }; 128 | 129 | export type CustomerAddress = { 130 | __typename?: 'CustomerAddress'; 131 | city?: Maybe; 132 | country?: Maybe; 133 | phone?: Maybe; 134 | postalCode?: Maybe; 135 | region?: Maybe; 136 | street?: Maybe; 137 | }; 138 | 139 | export type CustomerAddressInput = { 140 | city?: Maybe; 141 | country?: Maybe; 142 | phone?: Maybe; 143 | postalCode?: Maybe; 144 | region?: Maybe; 145 | street?: Maybe; 146 | }; 147 | 148 | /** A connection to a list of items. */ 149 | export type CustomerConnection = { 150 | __typename?: 'CustomerConnection'; 151 | /** Total object count. */ 152 | count: Scalars['Int']; 153 | /** Information to aid in pagination. */ 154 | edges: Array; 155 | /** Information to aid in pagination. */ 156 | pageInfo: PageInfo; 157 | }; 158 | 159 | /** An edge in a connection. */ 160 | export type CustomerEdge = { 161 | __typename?: 'CustomerEdge'; 162 | /** A cursor for use in pagination */ 163 | cursor: Scalars['String']; 164 | /** The item at the end of the edge */ 165 | node: Customer; 166 | }; 167 | 168 | /** List of items with pagination. */ 169 | export type CustomerPagination = { 170 | __typename?: 'CustomerPagination'; 171 | /** Total object count. */ 172 | count?: Maybe; 173 | /** Array of objects. */ 174 | items?: Maybe>; 175 | /** Information to aid in pagination. */ 176 | pageInfo: PaginationInfo; 177 | }; 178 | 179 | export type Employee = { 180 | __typename?: 'Employee'; 181 | _id: Scalars['MongoID']; 182 | address?: Maybe; 183 | birthDate?: Maybe; 184 | chief?: Maybe; 185 | /** Category unique ID */ 186 | employeeID?: Maybe; 187 | firstName?: Maybe; 188 | hireDate?: Maybe; 189 | lastName?: Maybe; 190 | notes?: Maybe; 191 | orderConnection?: Maybe; 192 | /** ID of chief */ 193 | reportsTo?: Maybe; 194 | subordinates: Array; 195 | /** Attached territory ID from region collection */ 196 | territoryIDs?: Maybe>>; 197 | title?: Maybe; 198 | titleOfCourtesy?: Maybe; 199 | }; 200 | 201 | 202 | export type EmployeeOrderConnectionArgs = { 203 | after?: Maybe; 204 | before?: Maybe; 205 | first?: Maybe; 206 | last?: Maybe; 207 | sort?: Maybe; 208 | }; 209 | 210 | 211 | export type EmployeeSubordinatesArgs = { 212 | limit?: Maybe; 213 | skip?: Maybe; 214 | sort?: Maybe; 215 | }; 216 | 217 | /** List of items with pagination. */ 218 | export type EmployeePagination = { 219 | __typename?: 'EmployeePagination'; 220 | /** Total object count. */ 221 | count?: Maybe; 222 | /** Array of objects. */ 223 | items?: Maybe>; 224 | /** Information to aid in pagination. */ 225 | pageInfo: PaginationInfo; 226 | }; 227 | 228 | export type ErrorInterface = { 229 | /** Generic error message */ 230 | message?: Maybe; 231 | }; 232 | 233 | export type FilterFindManyCategoryCategoryIdOperatorsInput = { 234 | exists?: Maybe; 235 | gt?: Maybe; 236 | gte?: Maybe; 237 | in?: Maybe>>; 238 | lt?: Maybe; 239 | lte?: Maybe; 240 | ne?: Maybe; 241 | nin?: Maybe>>; 242 | }; 243 | 244 | export type FilterFindManyCategoryInput = { 245 | AND?: Maybe>; 246 | OR?: Maybe>; 247 | _id?: Maybe; 248 | /** List of *indexed* fields that can be filtered via operators. */ 249 | _operators?: Maybe; 250 | /** Category unique ID */ 251 | categoryID?: Maybe; 252 | description?: Maybe; 253 | name?: Maybe; 254 | }; 255 | 256 | export type FilterFindManyCategoryNameOperatorsInput = { 257 | exists?: Maybe; 258 | gt?: Maybe; 259 | gte?: Maybe; 260 | in?: Maybe>>; 261 | lt?: Maybe; 262 | lte?: Maybe; 263 | ne?: Maybe; 264 | nin?: Maybe>>; 265 | regex?: Maybe; 266 | }; 267 | 268 | /** For performance reason this type contains only *indexed* fields. */ 269 | export type FilterFindManyCategoryOperatorsInput = { 270 | _id?: Maybe; 271 | categoryID?: Maybe; 272 | name?: Maybe; 273 | }; 274 | 275 | export type FilterFindManyCategory_IdOperatorsInput = { 276 | exists?: Maybe; 277 | gt?: Maybe; 278 | gte?: Maybe; 279 | in?: Maybe>>; 280 | lt?: Maybe; 281 | lte?: Maybe; 282 | ne?: Maybe; 283 | nin?: Maybe>>; 284 | }; 285 | 286 | export type FilterFindManyCustomerAddressInput = { 287 | city?: Maybe; 288 | country?: Maybe; 289 | phone?: Maybe; 290 | postalCode?: Maybe; 291 | region?: Maybe; 292 | street?: Maybe; 293 | }; 294 | 295 | export type FilterFindManyCustomerCompanyNameOperatorsInput = { 296 | exists?: Maybe; 297 | gt?: Maybe; 298 | gte?: Maybe; 299 | in?: Maybe>>; 300 | lt?: Maybe; 301 | lte?: Maybe; 302 | ne?: Maybe; 303 | nin?: Maybe>>; 304 | regex?: Maybe; 305 | }; 306 | 307 | export type FilterFindManyCustomerCustomerIdOperatorsInput = { 308 | exists?: Maybe; 309 | gt?: Maybe; 310 | gte?: Maybe; 311 | in?: Maybe>>; 312 | lt?: Maybe; 313 | lte?: Maybe; 314 | ne?: Maybe; 315 | nin?: Maybe>>; 316 | regex?: Maybe; 317 | }; 318 | 319 | export type FilterFindManyCustomerInput = { 320 | AND?: Maybe>; 321 | OR?: Maybe>; 322 | _id?: Maybe; 323 | /** List of *indexed* fields that can be filtered via operators. */ 324 | _operators?: Maybe; 325 | address?: Maybe; 326 | companyName?: Maybe; 327 | contactName?: Maybe; 328 | contactTitle?: Maybe; 329 | /** Customer unique ID */ 330 | customerID?: Maybe; 331 | }; 332 | 333 | /** For performance reason this type contains only *indexed* fields. */ 334 | export type FilterFindManyCustomerOperatorsInput = { 335 | _id?: Maybe; 336 | companyName?: Maybe; 337 | customerID?: Maybe; 338 | }; 339 | 340 | export type FilterFindManyCustomer_IdOperatorsInput = { 341 | exists?: Maybe; 342 | gt?: Maybe; 343 | gte?: Maybe; 344 | in?: Maybe>>; 345 | lt?: Maybe; 346 | lte?: Maybe; 347 | ne?: Maybe; 348 | nin?: Maybe>>; 349 | }; 350 | 351 | export type FilterFindManyEmployeeEmployeeIdOperatorsInput = { 352 | exists?: Maybe; 353 | gt?: Maybe; 354 | gte?: Maybe; 355 | in?: Maybe>>; 356 | lt?: Maybe; 357 | lte?: Maybe; 358 | ne?: Maybe; 359 | nin?: Maybe>>; 360 | }; 361 | 362 | export type FilterFindManyEmployeeInput = { 363 | AND?: Maybe>; 364 | OR?: Maybe>; 365 | _id?: Maybe; 366 | /** List of *indexed* fields that can be filtered via operators. */ 367 | _operators?: Maybe; 368 | address?: Maybe; 369 | birthDate?: Maybe; 370 | /** Category unique ID */ 371 | employeeID?: Maybe; 372 | firstName?: Maybe; 373 | /** Fulltext search with mongodb stemming and weights */ 374 | fullTextSearch?: Maybe; 375 | hireDate?: Maybe; 376 | lastName?: Maybe; 377 | notes?: Maybe; 378 | /** ID of chief */ 379 | reportsTo?: Maybe; 380 | /** Attached territory ID from region collection */ 381 | territoryIDs?: Maybe>>; 382 | title?: Maybe; 383 | titleOfCourtesy?: Maybe; 384 | }; 385 | 386 | export type FilterFindManyEmployeeLastNameOperatorsInput = { 387 | exists?: Maybe; 388 | gt?: Maybe; 389 | gte?: Maybe; 390 | in?: Maybe>>; 391 | lt?: Maybe; 392 | lte?: Maybe; 393 | ne?: Maybe; 394 | nin?: Maybe>>; 395 | regex?: Maybe; 396 | }; 397 | 398 | /** For performance reason this type contains only *indexed* fields. */ 399 | export type FilterFindManyEmployeeOperatorsInput = { 400 | _id?: Maybe; 401 | employeeID?: Maybe; 402 | lastName?: Maybe; 403 | territoryIDs?: Maybe; 404 | }; 405 | 406 | export type FilterFindManyEmployeeTerritoryIDsOperatorsInput = { 407 | exists?: Maybe; 408 | gt?: Maybe; 409 | gte?: Maybe; 410 | in?: Maybe>>; 411 | lt?: Maybe; 412 | lte?: Maybe; 413 | ne?: Maybe; 414 | nin?: Maybe>>; 415 | }; 416 | 417 | export type FilterFindManyEmployee_IdOperatorsInput = { 418 | exists?: Maybe; 419 | gt?: Maybe; 420 | gte?: Maybe; 421 | in?: Maybe>>; 422 | lt?: Maybe; 423 | lte?: Maybe; 424 | ne?: Maybe; 425 | nin?: Maybe>>; 426 | }; 427 | 428 | export type FilterFindManyOrderDetailsInput = { 429 | discount?: Maybe; 430 | productID?: Maybe; 431 | quantity?: Maybe; 432 | unitPrice?: Maybe; 433 | }; 434 | 435 | export type FilterFindManyOrderInput = { 436 | AND?: Maybe>; 437 | OR?: Maybe>; 438 | _id?: Maybe; 439 | /** List of *indexed* fields that can be filtered via operators. */ 440 | _operators?: Maybe; 441 | customerID?: Maybe; 442 | /** List of ordered products */ 443 | details?: Maybe>>; 444 | employeeID?: Maybe; 445 | freight?: Maybe; 446 | orderDate?: Maybe; 447 | /** Order unique ID */ 448 | orderID?: Maybe; 449 | requiredDate?: Maybe; 450 | shipAddress?: Maybe; 451 | shipName?: Maybe; 452 | shipVia?: Maybe; 453 | shippedDate?: Maybe; 454 | }; 455 | 456 | /** For performance reason this type contains only *indexed* fields. */ 457 | export type FilterFindManyOrderOperatorsInput = { 458 | _id?: Maybe; 459 | orderID?: Maybe; 460 | }; 461 | 462 | export type FilterFindManyOrderOrderIdOperatorsInput = { 463 | exists?: Maybe; 464 | gt?: Maybe; 465 | gte?: Maybe; 466 | in?: Maybe>>; 467 | lt?: Maybe; 468 | lte?: Maybe; 469 | ne?: Maybe; 470 | nin?: Maybe>>; 471 | }; 472 | 473 | export type FilterFindManyOrder_IdOperatorsInput = { 474 | exists?: Maybe; 475 | gt?: Maybe; 476 | gte?: Maybe; 477 | in?: Maybe>>; 478 | lt?: Maybe; 479 | lte?: Maybe; 480 | ne?: Maybe; 481 | nin?: Maybe>>; 482 | }; 483 | 484 | export type FilterFindManyProductInput = { 485 | AND?: Maybe>; 486 | OR?: Maybe>; 487 | _id?: Maybe; 488 | /** List of *indexed* fields that can be filtered via operators. */ 489 | _operators?: Maybe; 490 | categoryID?: Maybe; 491 | discontinued?: Maybe; 492 | name?: Maybe; 493 | /** Search by regExp */ 494 | nameRegexp?: Maybe; 495 | /** Unique product id */ 496 | productID?: Maybe; 497 | quantityPerUnit?: Maybe; 498 | reorderLevel?: Maybe; 499 | supplierID?: Maybe; 500 | unitPrice?: Maybe; 501 | unitsInStock?: Maybe; 502 | unitsOnOrder?: Maybe; 503 | }; 504 | 505 | export type FilterFindManyProductNameOperatorsInput = { 506 | exists?: Maybe; 507 | gt?: Maybe; 508 | gte?: Maybe; 509 | in?: Maybe>>; 510 | lt?: Maybe; 511 | lte?: Maybe; 512 | ne?: Maybe; 513 | nin?: Maybe>>; 514 | regex?: Maybe; 515 | }; 516 | 517 | /** For performance reason this type contains only *indexed* fields. */ 518 | export type FilterFindManyProductOperatorsInput = { 519 | _id?: Maybe; 520 | name?: Maybe; 521 | productID?: Maybe; 522 | unitPrice?: Maybe; 523 | }; 524 | 525 | export type FilterFindManyProductProductIdOperatorsInput = { 526 | exists?: Maybe; 527 | gt?: Maybe; 528 | gte?: Maybe; 529 | in?: Maybe>>; 530 | lt?: Maybe; 531 | lte?: Maybe; 532 | ne?: Maybe; 533 | nin?: Maybe>>; 534 | }; 535 | 536 | export type FilterFindManyProductUnitPriceOperatorsInput = { 537 | exists?: Maybe; 538 | gt?: Maybe; 539 | gte?: Maybe; 540 | in?: Maybe>>; 541 | lt?: Maybe; 542 | lte?: Maybe; 543 | ne?: Maybe; 544 | nin?: Maybe>>; 545 | }; 546 | 547 | export type FilterFindManyProduct_IdOperatorsInput = { 548 | exists?: Maybe; 549 | gt?: Maybe; 550 | gte?: Maybe; 551 | in?: Maybe>>; 552 | lt?: Maybe; 553 | lte?: Maybe; 554 | ne?: Maybe; 555 | nin?: Maybe>>; 556 | }; 557 | 558 | export type FilterFindManyRegionInput = { 559 | AND?: Maybe>; 560 | OR?: Maybe>; 561 | _id?: Maybe; 562 | /** List of *indexed* fields that can be filtered via operators. */ 563 | _operators?: Maybe; 564 | name?: Maybe; 565 | /** Region unique ID */ 566 | regionID?: Maybe; 567 | territories?: Maybe>>; 568 | }; 569 | 570 | /** For performance reason this type contains only *indexed* fields. */ 571 | export type FilterFindManyRegionOperatorsInput = { 572 | _id?: Maybe; 573 | regionID?: Maybe; 574 | }; 575 | 576 | export type FilterFindManyRegionRegionIdOperatorsInput = { 577 | exists?: Maybe; 578 | gt?: Maybe; 579 | gte?: Maybe; 580 | in?: Maybe>>; 581 | lt?: Maybe; 582 | lte?: Maybe; 583 | ne?: Maybe; 584 | nin?: Maybe>>; 585 | }; 586 | 587 | export type FilterFindManyRegionTerritoriesInput = { 588 | name?: Maybe; 589 | territoryID?: Maybe; 590 | }; 591 | 592 | export type FilterFindManyRegion_IdOperatorsInput = { 593 | exists?: Maybe; 594 | gt?: Maybe; 595 | gte?: Maybe; 596 | in?: Maybe>>; 597 | lt?: Maybe; 598 | lte?: Maybe; 599 | ne?: Maybe; 600 | nin?: Maybe>>; 601 | }; 602 | 603 | export type FilterFindManyShipperInput = { 604 | AND?: Maybe>; 605 | OR?: Maybe>; 606 | _id?: Maybe; 607 | /** List of *indexed* fields that can be filtered via operators. */ 608 | _operators?: Maybe; 609 | companyName?: Maybe; 610 | phone?: Maybe; 611 | /** Shipper unique ID */ 612 | shipperID?: Maybe; 613 | }; 614 | 615 | /** For performance reason this type contains only *indexed* fields. */ 616 | export type FilterFindManyShipperOperatorsInput = { 617 | _id?: Maybe; 618 | shipperID?: Maybe; 619 | }; 620 | 621 | export type FilterFindManyShipperShipperIdOperatorsInput = { 622 | exists?: Maybe; 623 | gt?: Maybe; 624 | gte?: Maybe; 625 | in?: Maybe>>; 626 | lt?: Maybe; 627 | lte?: Maybe; 628 | ne?: Maybe; 629 | nin?: Maybe>>; 630 | }; 631 | 632 | export type FilterFindManyShipper_IdOperatorsInput = { 633 | exists?: Maybe; 634 | gt?: Maybe; 635 | gte?: Maybe; 636 | in?: Maybe>>; 637 | lt?: Maybe; 638 | lte?: Maybe; 639 | ne?: Maybe; 640 | nin?: Maybe>>; 641 | }; 642 | 643 | export type FilterFindManySupplierCompanyNameOperatorsInput = { 644 | exists?: Maybe; 645 | gt?: Maybe; 646 | gte?: Maybe; 647 | in?: Maybe>>; 648 | lt?: Maybe; 649 | lte?: Maybe; 650 | ne?: Maybe; 651 | nin?: Maybe>>; 652 | regex?: Maybe; 653 | }; 654 | 655 | export type FilterFindManySupplierInput = { 656 | AND?: Maybe>; 657 | OR?: Maybe>; 658 | _id?: Maybe; 659 | /** List of *indexed* fields that can be filtered via operators. */ 660 | _operators?: Maybe; 661 | address?: Maybe; 662 | companyName?: Maybe; 663 | contactName?: Maybe; 664 | contactTitle?: Maybe; 665 | /** Supplier unique ID */ 666 | supplierID?: Maybe; 667 | }; 668 | 669 | /** For performance reason this type contains only *indexed* fields. */ 670 | export type FilterFindManySupplierOperatorsInput = { 671 | _id?: Maybe; 672 | companyName?: Maybe; 673 | supplierID?: Maybe; 674 | }; 675 | 676 | export type FilterFindManySupplierSupplierIdOperatorsInput = { 677 | exists?: Maybe; 678 | gt?: Maybe; 679 | gte?: Maybe; 680 | in?: Maybe>>; 681 | lt?: Maybe; 682 | lte?: Maybe; 683 | ne?: Maybe; 684 | nin?: Maybe>>; 685 | }; 686 | 687 | export type FilterFindManySupplier_IdOperatorsInput = { 688 | exists?: Maybe; 689 | gt?: Maybe; 690 | gte?: Maybe; 691 | in?: Maybe>>; 692 | lt?: Maybe; 693 | lte?: Maybe; 694 | ne?: Maybe; 695 | nin?: Maybe>>; 696 | }; 697 | 698 | export type FilterFindOneCategoryCategoryIdOperatorsInput = { 699 | exists?: Maybe; 700 | gt?: Maybe; 701 | gte?: Maybe; 702 | in?: Maybe>>; 703 | lt?: Maybe; 704 | lte?: Maybe; 705 | ne?: Maybe; 706 | nin?: Maybe>>; 707 | }; 708 | 709 | export type FilterFindOneCategoryInput = { 710 | AND?: Maybe>; 711 | OR?: Maybe>; 712 | _id?: Maybe; 713 | /** List of *indexed* fields that can be filtered via operators. */ 714 | _operators?: Maybe; 715 | /** Category unique ID */ 716 | categoryID?: Maybe; 717 | description?: Maybe; 718 | name?: Maybe; 719 | }; 720 | 721 | export type FilterFindOneCategoryNameOperatorsInput = { 722 | exists?: Maybe; 723 | gt?: Maybe; 724 | gte?: Maybe; 725 | in?: Maybe>>; 726 | lt?: Maybe; 727 | lte?: Maybe; 728 | ne?: Maybe; 729 | nin?: Maybe>>; 730 | regex?: Maybe; 731 | }; 732 | 733 | /** For performance reason this type contains only *indexed* fields. */ 734 | export type FilterFindOneCategoryOperatorsInput = { 735 | _id?: Maybe; 736 | categoryID?: Maybe; 737 | name?: Maybe; 738 | }; 739 | 740 | export type FilterFindOneCategory_IdOperatorsInput = { 741 | exists?: Maybe; 742 | gt?: Maybe; 743 | gte?: Maybe; 744 | in?: Maybe>>; 745 | lt?: Maybe; 746 | lte?: Maybe; 747 | ne?: Maybe; 748 | nin?: Maybe>>; 749 | }; 750 | 751 | export type FilterFindOneCustomerAddressInput = { 752 | city?: Maybe; 753 | country?: Maybe; 754 | phone?: Maybe; 755 | postalCode?: Maybe; 756 | region?: Maybe; 757 | street?: Maybe; 758 | }; 759 | 760 | export type FilterFindOneCustomerCompanyNameOperatorsInput = { 761 | exists?: Maybe; 762 | gt?: Maybe; 763 | gte?: Maybe; 764 | in?: Maybe>>; 765 | lt?: Maybe; 766 | lte?: Maybe; 767 | ne?: Maybe; 768 | nin?: Maybe>>; 769 | regex?: Maybe; 770 | }; 771 | 772 | export type FilterFindOneCustomerCustomerIdOperatorsInput = { 773 | exists?: Maybe; 774 | gt?: Maybe; 775 | gte?: Maybe; 776 | in?: Maybe>>; 777 | lt?: Maybe; 778 | lte?: Maybe; 779 | ne?: Maybe; 780 | nin?: Maybe>>; 781 | regex?: Maybe; 782 | }; 783 | 784 | export type FilterFindOneCustomerInput = { 785 | AND?: Maybe>; 786 | OR?: Maybe>; 787 | _id?: Maybe; 788 | /** List of *indexed* fields that can be filtered via operators. */ 789 | _operators?: Maybe; 790 | address?: Maybe; 791 | companyName?: Maybe; 792 | contactName?: Maybe; 793 | contactTitle?: Maybe; 794 | /** Customer unique ID */ 795 | customerID?: Maybe; 796 | }; 797 | 798 | /** For performance reason this type contains only *indexed* fields. */ 799 | export type FilterFindOneCustomerOperatorsInput = { 800 | _id?: Maybe; 801 | companyName?: Maybe; 802 | customerID?: Maybe; 803 | }; 804 | 805 | export type FilterFindOneCustomer_IdOperatorsInput = { 806 | exists?: Maybe; 807 | gt?: Maybe; 808 | gte?: Maybe; 809 | in?: Maybe>>; 810 | lt?: Maybe; 811 | lte?: Maybe; 812 | ne?: Maybe; 813 | nin?: Maybe>>; 814 | }; 815 | 816 | export type FilterFindOneEmployeeEmployeeIdOperatorsInput = { 817 | exists?: Maybe; 818 | gt?: Maybe; 819 | gte?: Maybe; 820 | in?: Maybe>>; 821 | lt?: Maybe; 822 | lte?: Maybe; 823 | ne?: Maybe; 824 | nin?: Maybe>>; 825 | }; 826 | 827 | export type FilterFindOneEmployeeInput = { 828 | AND?: Maybe>; 829 | OR?: Maybe>; 830 | _id?: Maybe; 831 | /** List of *indexed* fields that can be filtered via operators. */ 832 | _operators?: Maybe; 833 | address?: Maybe; 834 | birthDate?: Maybe; 835 | /** Category unique ID */ 836 | employeeID?: Maybe; 837 | firstName?: Maybe; 838 | hireDate?: Maybe; 839 | lastName?: Maybe; 840 | notes?: Maybe; 841 | /** ID of chief */ 842 | reportsTo?: Maybe; 843 | /** Attached territory ID from region collection */ 844 | territoryIDs?: Maybe>>; 845 | title?: Maybe; 846 | titleOfCourtesy?: Maybe; 847 | }; 848 | 849 | export type FilterFindOneEmployeeLastNameOperatorsInput = { 850 | exists?: Maybe; 851 | gt?: Maybe; 852 | gte?: Maybe; 853 | in?: Maybe>>; 854 | lt?: Maybe; 855 | lte?: Maybe; 856 | ne?: Maybe; 857 | nin?: Maybe>>; 858 | regex?: Maybe; 859 | }; 860 | 861 | /** For performance reason this type contains only *indexed* fields. */ 862 | export type FilterFindOneEmployeeOperatorsInput = { 863 | _id?: Maybe; 864 | employeeID?: Maybe; 865 | lastName?: Maybe; 866 | territoryIDs?: Maybe; 867 | }; 868 | 869 | export type FilterFindOneEmployeeTerritoryIDsOperatorsInput = { 870 | exists?: Maybe; 871 | gt?: Maybe; 872 | gte?: Maybe; 873 | in?: Maybe>>; 874 | lt?: Maybe; 875 | lte?: Maybe; 876 | ne?: Maybe; 877 | nin?: Maybe>>; 878 | }; 879 | 880 | export type FilterFindOneEmployee_IdOperatorsInput = { 881 | exists?: Maybe; 882 | gt?: Maybe; 883 | gte?: Maybe; 884 | in?: Maybe>>; 885 | lt?: Maybe; 886 | lte?: Maybe; 887 | ne?: Maybe; 888 | nin?: Maybe>>; 889 | }; 890 | 891 | export type FilterFindOneOrderDetailsInput = { 892 | discount?: Maybe; 893 | productID?: Maybe; 894 | quantity?: Maybe; 895 | unitPrice?: Maybe; 896 | }; 897 | 898 | export type FilterFindOneOrderInput = { 899 | AND?: Maybe>; 900 | OR?: Maybe>; 901 | _id?: Maybe; 902 | /** List of *indexed* fields that can be filtered via operators. */ 903 | _operators?: Maybe; 904 | customerID?: Maybe; 905 | /** List of ordered products */ 906 | details?: Maybe>>; 907 | employeeID?: Maybe; 908 | freight?: Maybe; 909 | orderDate?: Maybe; 910 | /** Order unique ID */ 911 | orderID?: Maybe; 912 | requiredDate?: Maybe; 913 | shipAddress?: Maybe; 914 | shipName?: Maybe; 915 | shipVia?: Maybe; 916 | shippedDate?: Maybe; 917 | }; 918 | 919 | /** For performance reason this type contains only *indexed* fields. */ 920 | export type FilterFindOneOrderOperatorsInput = { 921 | _id?: Maybe; 922 | orderID?: Maybe; 923 | }; 924 | 925 | export type FilterFindOneOrderOrderIdOperatorsInput = { 926 | exists?: Maybe; 927 | gt?: Maybe; 928 | gte?: Maybe; 929 | in?: Maybe>>; 930 | lt?: Maybe; 931 | lte?: Maybe; 932 | ne?: Maybe; 933 | nin?: Maybe>>; 934 | }; 935 | 936 | export type FilterFindOneOrder_IdOperatorsInput = { 937 | exists?: Maybe; 938 | gt?: Maybe; 939 | gte?: Maybe; 940 | in?: Maybe>>; 941 | lt?: Maybe; 942 | lte?: Maybe; 943 | ne?: Maybe; 944 | nin?: Maybe>>; 945 | }; 946 | 947 | export type FilterFindOneProductInput = { 948 | AND?: Maybe>; 949 | OR?: Maybe>; 950 | _id?: Maybe; 951 | /** List of *indexed* fields that can be filtered via operators. */ 952 | _operators?: Maybe; 953 | categoryID?: Maybe; 954 | discontinued?: Maybe; 955 | name?: Maybe; 956 | /** Unique product id */ 957 | productID?: Maybe; 958 | quantityPerUnit?: Maybe; 959 | reorderLevel?: Maybe; 960 | supplierID?: Maybe; 961 | unitPrice?: Maybe; 962 | unitsInStock?: Maybe; 963 | unitsOnOrder?: Maybe; 964 | }; 965 | 966 | export type FilterFindOneProductNameOperatorsInput = { 967 | exists?: Maybe; 968 | gt?: Maybe; 969 | gte?: Maybe; 970 | in?: Maybe>>; 971 | lt?: Maybe; 972 | lte?: Maybe; 973 | ne?: Maybe; 974 | nin?: Maybe>>; 975 | regex?: Maybe; 976 | }; 977 | 978 | /** For performance reason this type contains only *indexed* fields. */ 979 | export type FilterFindOneProductOperatorsInput = { 980 | _id?: Maybe; 981 | name?: Maybe; 982 | productID?: Maybe; 983 | unitPrice?: Maybe; 984 | }; 985 | 986 | export type FilterFindOneProductProductIdOperatorsInput = { 987 | exists?: Maybe; 988 | gt?: Maybe; 989 | gte?: Maybe; 990 | in?: Maybe>>; 991 | lt?: Maybe; 992 | lte?: Maybe; 993 | ne?: Maybe; 994 | nin?: Maybe>>; 995 | }; 996 | 997 | export type FilterFindOneProductUnitPriceOperatorsInput = { 998 | exists?: Maybe; 999 | gt?: Maybe; 1000 | gte?: Maybe; 1001 | in?: Maybe>>; 1002 | lt?: Maybe; 1003 | lte?: Maybe; 1004 | ne?: Maybe; 1005 | nin?: Maybe>>; 1006 | }; 1007 | 1008 | export type FilterFindOneProduct_IdOperatorsInput = { 1009 | exists?: Maybe; 1010 | gt?: Maybe; 1011 | gte?: Maybe; 1012 | in?: Maybe>>; 1013 | lt?: Maybe; 1014 | lte?: Maybe; 1015 | ne?: Maybe; 1016 | nin?: Maybe>>; 1017 | }; 1018 | 1019 | export type FilterFindOneRegionInput = { 1020 | AND?: Maybe>; 1021 | OR?: Maybe>; 1022 | _id?: Maybe; 1023 | /** List of *indexed* fields that can be filtered via operators. */ 1024 | _operators?: Maybe; 1025 | name?: Maybe; 1026 | /** Region unique ID */ 1027 | regionID?: Maybe; 1028 | territories?: Maybe>>; 1029 | }; 1030 | 1031 | /** For performance reason this type contains only *indexed* fields. */ 1032 | export type FilterFindOneRegionOperatorsInput = { 1033 | _id?: Maybe; 1034 | regionID?: Maybe; 1035 | }; 1036 | 1037 | export type FilterFindOneRegionRegionIdOperatorsInput = { 1038 | exists?: Maybe; 1039 | gt?: Maybe; 1040 | gte?: Maybe; 1041 | in?: Maybe>>; 1042 | lt?: Maybe; 1043 | lte?: Maybe; 1044 | ne?: Maybe; 1045 | nin?: Maybe>>; 1046 | }; 1047 | 1048 | export type FilterFindOneRegionTerritoriesInput = { 1049 | name?: Maybe; 1050 | territoryID?: Maybe; 1051 | }; 1052 | 1053 | export type FilterFindOneRegion_IdOperatorsInput = { 1054 | exists?: Maybe; 1055 | gt?: Maybe; 1056 | gte?: Maybe; 1057 | in?: Maybe>>; 1058 | lt?: Maybe; 1059 | lte?: Maybe; 1060 | ne?: Maybe; 1061 | nin?: Maybe>>; 1062 | }; 1063 | 1064 | export type FilterFindOneShipperInput = { 1065 | AND?: Maybe>; 1066 | OR?: Maybe>; 1067 | _id?: Maybe; 1068 | /** List of *indexed* fields that can be filtered via operators. */ 1069 | _operators?: Maybe; 1070 | companyName?: Maybe; 1071 | phone?: Maybe; 1072 | /** Shipper unique ID */ 1073 | shipperID?: Maybe; 1074 | }; 1075 | 1076 | /** For performance reason this type contains only *indexed* fields. */ 1077 | export type FilterFindOneShipperOperatorsInput = { 1078 | _id?: Maybe; 1079 | shipperID?: Maybe; 1080 | }; 1081 | 1082 | export type FilterFindOneShipperShipperIdOperatorsInput = { 1083 | exists?: Maybe; 1084 | gt?: Maybe; 1085 | gte?: Maybe; 1086 | in?: Maybe>>; 1087 | lt?: Maybe; 1088 | lte?: Maybe; 1089 | ne?: Maybe; 1090 | nin?: Maybe>>; 1091 | }; 1092 | 1093 | export type FilterFindOneShipper_IdOperatorsInput = { 1094 | exists?: Maybe; 1095 | gt?: Maybe; 1096 | gte?: Maybe; 1097 | in?: Maybe>>; 1098 | lt?: Maybe; 1099 | lte?: Maybe; 1100 | ne?: Maybe; 1101 | nin?: Maybe>>; 1102 | }; 1103 | 1104 | export type FilterFindOneSupplierCompanyNameOperatorsInput = { 1105 | exists?: Maybe; 1106 | gt?: Maybe; 1107 | gte?: Maybe; 1108 | in?: Maybe>>; 1109 | lt?: Maybe; 1110 | lte?: Maybe; 1111 | ne?: Maybe; 1112 | nin?: Maybe>>; 1113 | regex?: Maybe; 1114 | }; 1115 | 1116 | export type FilterFindOneSupplierInput = { 1117 | AND?: Maybe>; 1118 | OR?: Maybe>; 1119 | _id?: Maybe; 1120 | /** List of *indexed* fields that can be filtered via operators. */ 1121 | _operators?: Maybe; 1122 | address?: Maybe; 1123 | companyName?: Maybe; 1124 | contactName?: Maybe; 1125 | contactTitle?: Maybe; 1126 | /** Supplier unique ID */ 1127 | supplierID?: Maybe; 1128 | }; 1129 | 1130 | /** For performance reason this type contains only *indexed* fields. */ 1131 | export type FilterFindOneSupplierOperatorsInput = { 1132 | _id?: Maybe; 1133 | companyName?: Maybe; 1134 | supplierID?: Maybe; 1135 | }; 1136 | 1137 | export type FilterFindOneSupplierSupplierIdOperatorsInput = { 1138 | exists?: Maybe; 1139 | gt?: Maybe; 1140 | gte?: Maybe; 1141 | in?: Maybe>>; 1142 | lt?: Maybe; 1143 | lte?: Maybe; 1144 | ne?: Maybe; 1145 | nin?: Maybe>>; 1146 | }; 1147 | 1148 | export type FilterFindOneSupplier_IdOperatorsInput = { 1149 | exists?: Maybe; 1150 | gt?: Maybe; 1151 | gte?: Maybe; 1152 | in?: Maybe>>; 1153 | lt?: Maybe; 1154 | lte?: Maybe; 1155 | ne?: Maybe; 1156 | nin?: Maybe>>; 1157 | }; 1158 | 1159 | export type FilterRemoveOneCustomerAddressInput = { 1160 | city?: Maybe; 1161 | country?: Maybe; 1162 | phone?: Maybe; 1163 | postalCode?: Maybe; 1164 | region?: Maybe; 1165 | street?: Maybe; 1166 | }; 1167 | 1168 | export type FilterRemoveOneOrderDetailsInput = { 1169 | discount?: Maybe; 1170 | productID?: Maybe; 1171 | quantity?: Maybe; 1172 | unitPrice?: Maybe; 1173 | }; 1174 | 1175 | export type FilterRemoveOneOrderInput = { 1176 | AND?: Maybe>; 1177 | OR?: Maybe>; 1178 | _id?: Maybe; 1179 | /** List of *indexed* fields that can be filtered via operators. */ 1180 | _operators?: Maybe; 1181 | customerID?: Maybe; 1182 | /** List of ordered products */ 1183 | details?: Maybe>>; 1184 | employeeID?: Maybe; 1185 | freight?: Maybe; 1186 | orderDate?: Maybe; 1187 | /** Order unique ID */ 1188 | orderID?: Maybe; 1189 | requiredDate?: Maybe; 1190 | shipAddress?: Maybe; 1191 | shipName?: Maybe; 1192 | shipVia?: Maybe; 1193 | shippedDate?: Maybe; 1194 | }; 1195 | 1196 | /** For performance reason this type contains only *indexed* fields. */ 1197 | export type FilterRemoveOneOrderOperatorsInput = { 1198 | _id?: Maybe; 1199 | orderID?: Maybe; 1200 | }; 1201 | 1202 | export type FilterRemoveOneOrderOrderIdOperatorsInput = { 1203 | exists?: Maybe; 1204 | gt?: Maybe; 1205 | gte?: Maybe; 1206 | in?: Maybe>>; 1207 | lt?: Maybe; 1208 | lte?: Maybe; 1209 | ne?: Maybe; 1210 | nin?: Maybe>>; 1211 | }; 1212 | 1213 | export type FilterRemoveOneOrder_IdOperatorsInput = { 1214 | exists?: Maybe; 1215 | gt?: Maybe; 1216 | gte?: Maybe; 1217 | in?: Maybe>>; 1218 | lt?: Maybe; 1219 | lte?: Maybe; 1220 | ne?: Maybe; 1221 | nin?: Maybe>>; 1222 | }; 1223 | 1224 | export type FilterRemoveOneProductInput = { 1225 | AND?: Maybe>; 1226 | OR?: Maybe>; 1227 | _id?: Maybe; 1228 | /** List of *indexed* fields that can be filtered via operators. */ 1229 | _operators?: Maybe; 1230 | categoryID?: Maybe; 1231 | discontinued?: Maybe; 1232 | name?: Maybe; 1233 | /** Unique product id */ 1234 | productID?: Maybe; 1235 | quantityPerUnit?: Maybe; 1236 | reorderLevel?: Maybe; 1237 | supplierID?: Maybe; 1238 | unitPrice?: Maybe; 1239 | unitsInStock?: Maybe; 1240 | unitsOnOrder?: Maybe; 1241 | }; 1242 | 1243 | export type FilterRemoveOneProductNameOperatorsInput = { 1244 | exists?: Maybe; 1245 | gt?: Maybe; 1246 | gte?: Maybe; 1247 | in?: Maybe>>; 1248 | lt?: Maybe; 1249 | lte?: Maybe; 1250 | ne?: Maybe; 1251 | nin?: Maybe>>; 1252 | regex?: Maybe; 1253 | }; 1254 | 1255 | /** For performance reason this type contains only *indexed* fields. */ 1256 | export type FilterRemoveOneProductOperatorsInput = { 1257 | _id?: Maybe; 1258 | name?: Maybe; 1259 | productID?: Maybe; 1260 | unitPrice?: Maybe; 1261 | }; 1262 | 1263 | export type FilterRemoveOneProductProductIdOperatorsInput = { 1264 | exists?: Maybe; 1265 | gt?: Maybe; 1266 | gte?: Maybe; 1267 | in?: Maybe>>; 1268 | lt?: Maybe; 1269 | lte?: Maybe; 1270 | ne?: Maybe; 1271 | nin?: Maybe>>; 1272 | }; 1273 | 1274 | export type FilterRemoveOneProductUnitPriceOperatorsInput = { 1275 | exists?: Maybe; 1276 | gt?: Maybe; 1277 | gte?: Maybe; 1278 | in?: Maybe>>; 1279 | lt?: Maybe; 1280 | lte?: Maybe; 1281 | ne?: Maybe; 1282 | nin?: Maybe>>; 1283 | }; 1284 | 1285 | export type FilterRemoveOneProduct_IdOperatorsInput = { 1286 | exists?: Maybe; 1287 | gt?: Maybe; 1288 | gte?: Maybe; 1289 | in?: Maybe>>; 1290 | lt?: Maybe; 1291 | lte?: Maybe; 1292 | ne?: Maybe; 1293 | nin?: Maybe>>; 1294 | }; 1295 | 1296 | export type MongoError = ErrorInterface & { 1297 | __typename?: 'MongoError'; 1298 | /** MongoDB error code */ 1299 | code?: Maybe; 1300 | /** MongoDB error message */ 1301 | message?: Maybe; 1302 | }; 1303 | 1304 | export type Mutation = { 1305 | __typename?: 'Mutation'; 1306 | /** Create one document with mongoose defaults, setters, hooks and validation */ 1307 | createOrder?: Maybe; 1308 | /** Create one document with mongoose defaults, setters, hooks and validation */ 1309 | createProduct?: Maybe; 1310 | /** Remove one document: 1) Remove with hooks via findOneAndRemove. 2) Return removed document. */ 1311 | removeOrder?: Maybe; 1312 | /** Remove one document: 1) Remove with hooks via findOneAndRemove. 2) Return removed document. */ 1313 | removeProduct?: Maybe; 1314 | /** Remove all data and seed DB from scratch. Anyway data automatically reloaded every 30 minutes. */ 1315 | resetData?: Maybe; 1316 | /** Update one document: 1) Retrieve one document by findById. 2) Apply updates to mongoose document. 3) Mongoose applies defaults, setters, hooks and validation. 4) And save it. */ 1317 | updateEmployee?: Maybe; 1318 | /** Update one document: 1) Retrieve one document by findById. 2) Apply updates to mongoose document. 3) Mongoose applies defaults, setters, hooks and validation. 4) And save it. */ 1319 | updateOrder?: Maybe; 1320 | /** Update one document: 1) Retrieve one document by findById. 2) Apply updates to mongoose document. 3) Mongoose applies defaults, setters, hooks and validation. 4) And save it. */ 1321 | updateProduct?: Maybe; 1322 | }; 1323 | 1324 | 1325 | export type MutationCreateOrderArgs = { 1326 | record: CreateOneOrderInput; 1327 | }; 1328 | 1329 | 1330 | export type MutationCreateProductArgs = { 1331 | record: CreateOneProductInput; 1332 | }; 1333 | 1334 | 1335 | export type MutationRemoveOrderArgs = { 1336 | filter?: Maybe; 1337 | sort?: Maybe; 1338 | }; 1339 | 1340 | 1341 | export type MutationRemoveProductArgs = { 1342 | filter?: Maybe; 1343 | sort?: Maybe; 1344 | }; 1345 | 1346 | 1347 | export type MutationUpdateEmployeeArgs = { 1348 | _id: Scalars['MongoID']; 1349 | record: UpdateByIdEmployeeInput; 1350 | }; 1351 | 1352 | 1353 | export type MutationUpdateOrderArgs = { 1354 | _id: Scalars['MongoID']; 1355 | record: UpdateByIdOrderInput; 1356 | }; 1357 | 1358 | 1359 | export type MutationUpdateProductArgs = { 1360 | _id: Scalars['MongoID']; 1361 | record: UpdateByIdProductInput; 1362 | }; 1363 | 1364 | export type Order = { 1365 | __typename?: 'Order'; 1366 | _id: Scalars['MongoID']; 1367 | customer?: Maybe; 1368 | customerID?: Maybe; 1369 | /** List of ordered products */ 1370 | details?: Maybe>>; 1371 | employee?: Maybe; 1372 | employeeID?: Maybe; 1373 | freight?: Maybe; 1374 | orderDate?: Maybe; 1375 | /** Order unique ID */ 1376 | orderID?: Maybe; 1377 | requiredDate?: Maybe; 1378 | shipAddress?: Maybe; 1379 | shipName?: Maybe; 1380 | shipName1234?: Maybe; 1381 | shipVia?: Maybe; 1382 | shippedDate?: Maybe; 1383 | shipper?: Maybe; 1384 | time?: Maybe; 1385 | }; 1386 | 1387 | /** A connection to a list of items. */ 1388 | export type OrderConnection = { 1389 | __typename?: 'OrderConnection'; 1390 | /** Total object count. */ 1391 | count: Scalars['Int']; 1392 | /** Information to aid in pagination. */ 1393 | edges: Array; 1394 | /** Information to aid in pagination. */ 1395 | pageInfo: PageInfo; 1396 | }; 1397 | 1398 | export type OrderDetails = { 1399 | __typename?: 'OrderDetails'; 1400 | discount?: Maybe; 1401 | product?: Maybe; 1402 | productID?: Maybe; 1403 | quantity?: Maybe; 1404 | unitPrice?: Maybe; 1405 | }; 1406 | 1407 | export type OrderDetailsInput = { 1408 | discount?: Maybe; 1409 | productID?: Maybe; 1410 | quantity?: Maybe; 1411 | unitPrice?: Maybe; 1412 | }; 1413 | 1414 | /** An edge in a connection. */ 1415 | export type OrderEdge = { 1416 | __typename?: 'OrderEdge'; 1417 | /** A cursor for use in pagination */ 1418 | cursor: Scalars['String']; 1419 | /** The item at the end of the edge */ 1420 | node: Order; 1421 | }; 1422 | 1423 | /** List of items with pagination. */ 1424 | export type OrderPagination = { 1425 | __typename?: 'OrderPagination'; 1426 | /** Total object count. */ 1427 | count?: Maybe; 1428 | /** Array of objects. */ 1429 | items?: Maybe>; 1430 | /** Information to aid in pagination. */ 1431 | pageInfo: PaginationInfo; 1432 | }; 1433 | 1434 | /** Information about pagination in a connection. */ 1435 | export type PageInfo = { 1436 | __typename?: 'PageInfo'; 1437 | /** When paginating forwards, the cursor to continue. */ 1438 | endCursor?: Maybe; 1439 | /** When paginating forwards, are there more items? */ 1440 | hasNextPage: Scalars['Boolean']; 1441 | /** When paginating backwards, are there more items? */ 1442 | hasPreviousPage: Scalars['Boolean']; 1443 | /** When paginating backwards, the cursor to continue. */ 1444 | startCursor?: Maybe; 1445 | }; 1446 | 1447 | export type PaginationInfo = { 1448 | __typename?: 'PaginationInfo'; 1449 | currentPage: Scalars['Int']; 1450 | hasNextPage?: Maybe; 1451 | hasPreviousPage?: Maybe; 1452 | itemCount?: Maybe; 1453 | pageCount?: Maybe; 1454 | perPage: Scalars['Int']; 1455 | }; 1456 | 1457 | export type Product = { 1458 | __typename?: 'Product'; 1459 | _id: Scalars['MongoID']; 1460 | category?: Maybe; 1461 | categoryID?: Maybe; 1462 | discontinued?: Maybe; 1463 | name?: Maybe; 1464 | orderConnection?: Maybe; 1465 | orderList: Array; 1466 | /** Unique product id */ 1467 | productID?: Maybe; 1468 | quantityPerUnit?: Maybe; 1469 | reorderLevel?: Maybe; 1470 | supplier?: Maybe; 1471 | supplierID?: Maybe; 1472 | unitPrice?: Maybe; 1473 | unitsInStock?: Maybe; 1474 | unitsOnOrder?: Maybe; 1475 | }; 1476 | 1477 | 1478 | export type ProductOrderConnectionArgs = { 1479 | after?: Maybe; 1480 | before?: Maybe; 1481 | first?: Maybe; 1482 | last?: Maybe; 1483 | sort?: Maybe; 1484 | }; 1485 | 1486 | 1487 | export type ProductOrderListArgs = { 1488 | limit?: Maybe; 1489 | skip?: Maybe; 1490 | sort?: Maybe; 1491 | }; 1492 | 1493 | /** A connection to a list of items. */ 1494 | export type ProductConnection = { 1495 | __typename?: 'ProductConnection'; 1496 | /** Total object count. */ 1497 | count: Scalars['Int']; 1498 | /** Information to aid in pagination. */ 1499 | edges: Array; 1500 | /** Information to aid in pagination. */ 1501 | pageInfo: PageInfo; 1502 | }; 1503 | 1504 | /** An edge in a connection. */ 1505 | export type ProductEdge = { 1506 | __typename?: 'ProductEdge'; 1507 | /** A cursor for use in pagination */ 1508 | cursor: Scalars['String']; 1509 | /** The item at the end of the edge */ 1510 | node: Product; 1511 | }; 1512 | 1513 | /** List of items with pagination. */ 1514 | export type ProductPagination = { 1515 | __typename?: 'ProductPagination'; 1516 | /** Total object count. */ 1517 | count?: Maybe; 1518 | /** Array of objects. */ 1519 | items?: Maybe>; 1520 | /** Information to aid in pagination. */ 1521 | pageInfo: PaginationInfo; 1522 | }; 1523 | 1524 | export type Query = { 1525 | __typename?: 'Query'; 1526 | /** Data under client context */ 1527 | viewer?: Maybe; 1528 | }; 1529 | 1530 | export type Region = { 1531 | __typename?: 'Region'; 1532 | _id: Scalars['MongoID']; 1533 | employees: Array; 1534 | name?: Maybe; 1535 | /** Region unique ID */ 1536 | regionID?: Maybe; 1537 | territories?: Maybe>>; 1538 | }; 1539 | 1540 | 1541 | export type RegionEmployeesArgs = { 1542 | limit?: Maybe; 1543 | skip?: Maybe; 1544 | sort?: Maybe; 1545 | }; 1546 | 1547 | export type RegionTerritories = { 1548 | __typename?: 'RegionTerritories'; 1549 | name?: Maybe; 1550 | territoryID?: Maybe; 1551 | }; 1552 | 1553 | export type RemoveOneOrderPayload = { 1554 | __typename?: 'RemoveOneOrderPayload'; 1555 | /** Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. */ 1556 | error?: Maybe; 1557 | query?: Maybe; 1558 | /** Removed document */ 1559 | record?: Maybe; 1560 | /** Document ID */ 1561 | recordId?: Maybe; 1562 | }; 1563 | 1564 | export type RemoveOneProductPayload = { 1565 | __typename?: 'RemoveOneProductPayload'; 1566 | /** Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. */ 1567 | error?: Maybe; 1568 | query?: Maybe; 1569 | /** Removed document */ 1570 | record?: Maybe; 1571 | /** Document ID */ 1572 | recordId?: Maybe; 1573 | }; 1574 | 1575 | export type RuntimeError = ErrorInterface & { 1576 | __typename?: 'RuntimeError'; 1577 | /** Runtime error message */ 1578 | message?: Maybe; 1579 | }; 1580 | 1581 | export type Shipper = { 1582 | __typename?: 'Shipper'; 1583 | _id: Scalars['MongoID']; 1584 | companyName?: Maybe; 1585 | orderConnection?: Maybe; 1586 | phone?: Maybe; 1587 | /** Shipper unique ID */ 1588 | shipperID?: Maybe; 1589 | }; 1590 | 1591 | 1592 | export type ShipperOrderConnectionArgs = { 1593 | after?: Maybe; 1594 | before?: Maybe; 1595 | first?: Maybe; 1596 | last?: Maybe; 1597 | sort?: Maybe; 1598 | }; 1599 | 1600 | export enum SortConnectionCustomerEnum { 1601 | CompanynameAsc = 'COMPANYNAME_ASC', 1602 | CompanynameDesc = 'COMPANYNAME_DESC', 1603 | CustomeridAsc = 'CUSTOMERID_ASC', 1604 | CustomeridDesc = 'CUSTOMERID_DESC', 1605 | IdAsc = '_ID_ASC', 1606 | IdDesc = '_ID_DESC' 1607 | } 1608 | 1609 | export enum SortConnectionOrderEnum { 1610 | OrderidAsc = 'ORDERID_ASC', 1611 | OrderidDesc = 'ORDERID_DESC', 1612 | IdAsc = '_ID_ASC', 1613 | IdDesc = '_ID_DESC' 1614 | } 1615 | 1616 | export enum SortConnectionProductEnum { 1617 | NameSupplieridAsc = 'NAME__SUPPLIERID_ASC', 1618 | NameSupplieridDesc = 'NAME__SUPPLIERID_DESC', 1619 | ProductidAsc = 'PRODUCTID_ASC', 1620 | ProductidDesc = 'PRODUCTID_DESC', 1621 | IdAsc = '_ID_ASC', 1622 | IdDesc = '_ID_DESC' 1623 | } 1624 | 1625 | export enum SortConnectionSupplierEnum { 1626 | CompanynameAsc = 'COMPANYNAME_ASC', 1627 | CompanynameDesc = 'COMPANYNAME_DESC', 1628 | SupplieridAsc = 'SUPPLIERID_ASC', 1629 | SupplieridDesc = 'SUPPLIERID_DESC', 1630 | IdAsc = '_ID_ASC', 1631 | IdDesc = '_ID_DESC' 1632 | } 1633 | 1634 | export enum SortFindManyCategoryInput { 1635 | CategoryidAsc = 'CATEGORYID_ASC', 1636 | CategoryidDesc = 'CATEGORYID_DESC', 1637 | NameAsc = 'NAME_ASC', 1638 | NameDesc = 'NAME_DESC', 1639 | IdAsc = '_ID_ASC', 1640 | IdDesc = '_ID_DESC' 1641 | } 1642 | 1643 | export enum SortFindManyCustomerInput { 1644 | CompanynameAsc = 'COMPANYNAME_ASC', 1645 | CompanynameDesc = 'COMPANYNAME_DESC', 1646 | CustomeridAsc = 'CUSTOMERID_ASC', 1647 | CustomeridDesc = 'CUSTOMERID_DESC', 1648 | IdAsc = '_ID_ASC', 1649 | IdDesc = '_ID_DESC' 1650 | } 1651 | 1652 | export enum SortFindManyEmployeeInput { 1653 | EmployeeidAsc = 'EMPLOYEEID_ASC', 1654 | EmployeeidDesc = 'EMPLOYEEID_DESC', 1655 | LastnameAsc = 'LASTNAME_ASC', 1656 | LastnameDesc = 'LASTNAME_DESC', 1657 | LastnameFirstnameAsc = 'LASTNAME__FIRSTNAME_ASC', 1658 | LastnameFirstnameDesc = 'LASTNAME__FIRSTNAME_DESC', 1659 | TerritoryidsAsc = 'TERRITORYIDS_ASC', 1660 | TerritoryidsDesc = 'TERRITORYIDS_DESC', 1661 | IdAsc = '_ID_ASC', 1662 | IdDesc = '_ID_DESC' 1663 | } 1664 | 1665 | export enum SortFindManyOrderInput { 1666 | OrderidAsc = 'ORDERID_ASC', 1667 | OrderidDesc = 'ORDERID_DESC', 1668 | IdAsc = '_ID_ASC', 1669 | IdDesc = '_ID_DESC' 1670 | } 1671 | 1672 | export enum SortFindManyProductInput { 1673 | NameAsc = 'NAME_ASC', 1674 | NameDesc = 'NAME_DESC', 1675 | NameSupplieridAsc = 'NAME__SUPPLIERID_ASC', 1676 | NameSupplieridDesc = 'NAME__SUPPLIERID_DESC', 1677 | ProductidAsc = 'PRODUCTID_ASC', 1678 | ProductidDesc = 'PRODUCTID_DESC', 1679 | UnitpriceAsc = 'UNITPRICE_ASC', 1680 | UnitpriceDesc = 'UNITPRICE_DESC', 1681 | IdAsc = '_ID_ASC', 1682 | IdDesc = '_ID_DESC' 1683 | } 1684 | 1685 | export enum SortFindManyRegionInput { 1686 | RegionidAsc = 'REGIONID_ASC', 1687 | RegionidDesc = 'REGIONID_DESC', 1688 | IdAsc = '_ID_ASC', 1689 | IdDesc = '_ID_DESC' 1690 | } 1691 | 1692 | export enum SortFindManyShipperInput { 1693 | ShipperidAsc = 'SHIPPERID_ASC', 1694 | ShipperidDesc = 'SHIPPERID_DESC', 1695 | IdAsc = '_ID_ASC', 1696 | IdDesc = '_ID_DESC' 1697 | } 1698 | 1699 | export enum SortFindOneCategoryInput { 1700 | CategoryidAsc = 'CATEGORYID_ASC', 1701 | CategoryidDesc = 'CATEGORYID_DESC', 1702 | NameAsc = 'NAME_ASC', 1703 | NameDesc = 'NAME_DESC', 1704 | IdAsc = '_ID_ASC', 1705 | IdDesc = '_ID_DESC' 1706 | } 1707 | 1708 | export enum SortFindOneCustomerInput { 1709 | CompanynameAsc = 'COMPANYNAME_ASC', 1710 | CompanynameDesc = 'COMPANYNAME_DESC', 1711 | CustomeridAsc = 'CUSTOMERID_ASC', 1712 | CustomeridDesc = 'CUSTOMERID_DESC', 1713 | IdAsc = '_ID_ASC', 1714 | IdDesc = '_ID_DESC' 1715 | } 1716 | 1717 | export enum SortFindOneEmployeeInput { 1718 | EmployeeidAsc = 'EMPLOYEEID_ASC', 1719 | EmployeeidDesc = 'EMPLOYEEID_DESC', 1720 | LastnameAsc = 'LASTNAME_ASC', 1721 | LastnameDesc = 'LASTNAME_DESC', 1722 | LastnameFirstnameAsc = 'LASTNAME__FIRSTNAME_ASC', 1723 | LastnameFirstnameDesc = 'LASTNAME__FIRSTNAME_DESC', 1724 | TerritoryidsAsc = 'TERRITORYIDS_ASC', 1725 | TerritoryidsDesc = 'TERRITORYIDS_DESC', 1726 | IdAsc = '_ID_ASC', 1727 | IdDesc = '_ID_DESC' 1728 | } 1729 | 1730 | export enum SortFindOneOrderInput { 1731 | OrderidAsc = 'ORDERID_ASC', 1732 | OrderidDesc = 'ORDERID_DESC', 1733 | IdAsc = '_ID_ASC', 1734 | IdDesc = '_ID_DESC' 1735 | } 1736 | 1737 | export enum SortFindOneProductInput { 1738 | NameAsc = 'NAME_ASC', 1739 | NameDesc = 'NAME_DESC', 1740 | NameSupplieridAsc = 'NAME__SUPPLIERID_ASC', 1741 | NameSupplieridDesc = 'NAME__SUPPLIERID_DESC', 1742 | ProductidAsc = 'PRODUCTID_ASC', 1743 | ProductidDesc = 'PRODUCTID_DESC', 1744 | UnitpriceAsc = 'UNITPRICE_ASC', 1745 | UnitpriceDesc = 'UNITPRICE_DESC', 1746 | IdAsc = '_ID_ASC', 1747 | IdDesc = '_ID_DESC' 1748 | } 1749 | 1750 | export enum SortFindOneRegionInput { 1751 | RegionidAsc = 'REGIONID_ASC', 1752 | RegionidDesc = 'REGIONID_DESC', 1753 | IdAsc = '_ID_ASC', 1754 | IdDesc = '_ID_DESC' 1755 | } 1756 | 1757 | export enum SortFindOneShipperInput { 1758 | ShipperidAsc = 'SHIPPERID_ASC', 1759 | ShipperidDesc = 'SHIPPERID_DESC', 1760 | IdAsc = '_ID_ASC', 1761 | IdDesc = '_ID_DESC' 1762 | } 1763 | 1764 | export enum SortFindOneSupplierInput { 1765 | CompanynameAsc = 'COMPANYNAME_ASC', 1766 | CompanynameDesc = 'COMPANYNAME_DESC', 1767 | SupplieridAsc = 'SUPPLIERID_ASC', 1768 | SupplieridDesc = 'SUPPLIERID_DESC', 1769 | IdAsc = '_ID_ASC', 1770 | IdDesc = '_ID_DESC' 1771 | } 1772 | 1773 | export enum SortRemoveOneOrderInput { 1774 | OrderidAsc = 'ORDERID_ASC', 1775 | OrderidDesc = 'ORDERID_DESC', 1776 | IdAsc = '_ID_ASC', 1777 | IdDesc = '_ID_DESC' 1778 | } 1779 | 1780 | export enum SortRemoveOneProductInput { 1781 | NameAsc = 'NAME_ASC', 1782 | NameDesc = 'NAME_DESC', 1783 | NameSupplieridAsc = 'NAME__SUPPLIERID_ASC', 1784 | NameSupplieridDesc = 'NAME__SUPPLIERID_DESC', 1785 | ProductidAsc = 'PRODUCTID_ASC', 1786 | ProductidDesc = 'PRODUCTID_DESC', 1787 | UnitpriceAsc = 'UNITPRICE_ASC', 1788 | UnitpriceDesc = 'UNITPRICE_DESC', 1789 | IdAsc = '_ID_ASC', 1790 | IdDesc = '_ID_DESC' 1791 | } 1792 | 1793 | export type Subscription = { 1794 | __typename?: 'Subscription'; 1795 | orderCreated?: Maybe; 1796 | orderRemoved?: Maybe; 1797 | orderUpdated?: Maybe; 1798 | }; 1799 | 1800 | export type Supplier = { 1801 | __typename?: 'Supplier'; 1802 | _id: Scalars['MongoID']; 1803 | address?: Maybe; 1804 | companyName?: Maybe; 1805 | contactName?: Maybe; 1806 | contactTitle?: Maybe; 1807 | productConnection?: Maybe; 1808 | /** Supplier unique ID */ 1809 | supplierID?: Maybe; 1810 | }; 1811 | 1812 | 1813 | export type SupplierProductConnectionArgs = { 1814 | after?: Maybe; 1815 | before?: Maybe; 1816 | first?: Maybe; 1817 | last?: Maybe; 1818 | sort?: Maybe; 1819 | }; 1820 | 1821 | /** A connection to a list of items. */ 1822 | export type SupplierConnection = { 1823 | __typename?: 'SupplierConnection'; 1824 | /** Total object count. */ 1825 | count: Scalars['Int']; 1826 | /** Information to aid in pagination. */ 1827 | edges: Array; 1828 | /** Information to aid in pagination. */ 1829 | pageInfo: PageInfo; 1830 | }; 1831 | 1832 | /** An edge in a connection. */ 1833 | export type SupplierEdge = { 1834 | __typename?: 'SupplierEdge'; 1835 | /** A cursor for use in pagination */ 1836 | cursor: Scalars['String']; 1837 | /** The item at the end of the edge */ 1838 | node: Supplier; 1839 | }; 1840 | 1841 | export type UpdateByIdCustomerAddressInput = { 1842 | city?: Maybe; 1843 | country?: Maybe; 1844 | phone?: Maybe; 1845 | postalCode?: Maybe; 1846 | region?: Maybe; 1847 | street?: Maybe; 1848 | }; 1849 | 1850 | export type UpdateByIdEmployeeInput = { 1851 | address?: Maybe; 1852 | birthDate?: Maybe; 1853 | /** Category unique ID */ 1854 | employeeID?: Maybe; 1855 | firstName?: Maybe; 1856 | hireDate?: Maybe; 1857 | lastName?: Maybe; 1858 | notes?: Maybe; 1859 | /** ID of chief */ 1860 | reportsTo?: Maybe; 1861 | /** Attached territory ID from region collection */ 1862 | territoryIDs?: Maybe>>; 1863 | title?: Maybe; 1864 | titleOfCourtesy?: Maybe; 1865 | }; 1866 | 1867 | export type UpdateByIdEmployeePayload = { 1868 | __typename?: 'UpdateByIdEmployeePayload'; 1869 | /** Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. */ 1870 | error?: Maybe; 1871 | query?: Maybe; 1872 | /** Updated document */ 1873 | record?: Maybe; 1874 | /** Document ID */ 1875 | recordId?: Maybe; 1876 | }; 1877 | 1878 | export type UpdateByIdOrderDetailsInput = { 1879 | discount?: Maybe; 1880 | productID?: Maybe; 1881 | quantity?: Maybe; 1882 | unitPrice?: Maybe; 1883 | }; 1884 | 1885 | export type UpdateByIdOrderInput = { 1886 | customerID?: Maybe; 1887 | /** List of ordered products */ 1888 | details?: Maybe>>; 1889 | employeeID?: Maybe; 1890 | freight?: Maybe; 1891 | orderDate?: Maybe; 1892 | /** Order unique ID */ 1893 | orderID?: Maybe; 1894 | requiredDate?: Maybe; 1895 | shipAddress?: Maybe; 1896 | shipName?: Maybe; 1897 | shipVia?: Maybe; 1898 | shippedDate?: Maybe; 1899 | }; 1900 | 1901 | export type UpdateByIdOrderPayload = { 1902 | __typename?: 'UpdateByIdOrderPayload'; 1903 | /** Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. */ 1904 | error?: Maybe; 1905 | query?: Maybe; 1906 | /** Updated document */ 1907 | record?: Maybe; 1908 | /** Document ID */ 1909 | recordId?: Maybe; 1910 | }; 1911 | 1912 | export type UpdateByIdProductInput = { 1913 | categoryID?: Maybe; 1914 | discontinued?: Maybe; 1915 | name?: Maybe; 1916 | /** Unique product id */ 1917 | productID?: Maybe; 1918 | quantityPerUnit?: Maybe; 1919 | reorderLevel?: Maybe; 1920 | supplierID?: Maybe; 1921 | unitPrice?: Maybe; 1922 | unitsInStock?: Maybe; 1923 | unitsOnOrder?: Maybe; 1924 | }; 1925 | 1926 | export type UpdateByIdProductPayload = { 1927 | __typename?: 'UpdateByIdProductPayload'; 1928 | /** Error that may occur during operation. If you request this field in GraphQL query, you will receive typed error in payload; otherwise error will be provided in root `errors` field of GraphQL response. */ 1929 | error?: Maybe; 1930 | query?: Maybe; 1931 | /** Updated document */ 1932 | record?: Maybe; 1933 | /** Document ID */ 1934 | recordId?: Maybe; 1935 | }; 1936 | 1937 | export type ValidationError = ErrorInterface & { 1938 | __typename?: 'ValidationError'; 1939 | /** List of validator errors */ 1940 | errors?: Maybe>; 1941 | /** Combined error message from all validators */ 1942 | message?: Maybe; 1943 | }; 1944 | 1945 | export type ValidatorError = { 1946 | __typename?: 'ValidatorError'; 1947 | /** Input record idx in array which occurs the validation error. This `idx` is useful for createMany operation. For singular operations it always be 0. For *Many operations `idx` represents record index in array received from user. */ 1948 | idx: Scalars['Int']; 1949 | /** Validation error message */ 1950 | message?: Maybe; 1951 | /** Source of the validation error from the model path */ 1952 | path?: Maybe; 1953 | /** Field value which occurs the validation error */ 1954 | value?: Maybe; 1955 | }; 1956 | 1957 | export type Viewer = { 1958 | __typename?: 'Viewer'; 1959 | category?: Maybe; 1960 | categoryList: Array; 1961 | customer?: Maybe; 1962 | customerConnection?: Maybe; 1963 | customerPagination?: Maybe; 1964 | employee?: Maybe; 1965 | employeeList: Array; 1966 | employeePagination?: Maybe; 1967 | order?: Maybe; 1968 | orderConnection?: Maybe; 1969 | orderPagination?: Maybe; 1970 | product?: Maybe; 1971 | productConnection?: Maybe; 1972 | productList: Array; 1973 | productPagination?: Maybe; 1974 | region?: Maybe; 1975 | regionList: Array; 1976 | shipper?: Maybe; 1977 | shipperList: Array; 1978 | supplier?: Maybe; 1979 | supplierConnection?: Maybe; 1980 | }; 1981 | 1982 | 1983 | export type ViewerCategoryArgs = { 1984 | filter?: Maybe; 1985 | skip?: Maybe; 1986 | sort?: Maybe; 1987 | }; 1988 | 1989 | 1990 | export type ViewerCategoryListArgs = { 1991 | filter?: Maybe; 1992 | limit?: Maybe; 1993 | skip?: Maybe; 1994 | sort?: Maybe; 1995 | }; 1996 | 1997 | 1998 | export type ViewerCustomerArgs = { 1999 | filter?: Maybe; 2000 | skip?: Maybe; 2001 | sort?: Maybe; 2002 | }; 2003 | 2004 | 2005 | export type ViewerCustomerConnectionArgs = { 2006 | after?: Maybe; 2007 | before?: Maybe; 2008 | filter?: Maybe; 2009 | first?: Maybe; 2010 | last?: Maybe; 2011 | sort?: Maybe; 2012 | }; 2013 | 2014 | 2015 | export type ViewerCustomerPaginationArgs = { 2016 | filter?: Maybe; 2017 | page?: Maybe; 2018 | perPage?: Maybe; 2019 | sort?: Maybe; 2020 | }; 2021 | 2022 | 2023 | export type ViewerEmployeeArgs = { 2024 | filter?: Maybe; 2025 | skip?: Maybe; 2026 | sort?: Maybe; 2027 | }; 2028 | 2029 | 2030 | export type ViewerEmployeeListArgs = { 2031 | filter?: Maybe; 2032 | limit?: Maybe; 2033 | skip?: Maybe; 2034 | sort?: Maybe; 2035 | }; 2036 | 2037 | 2038 | export type ViewerEmployeePaginationArgs = { 2039 | filter?: Maybe; 2040 | page?: Maybe; 2041 | perPage?: Maybe; 2042 | sort?: Maybe; 2043 | }; 2044 | 2045 | 2046 | export type ViewerOrderArgs = { 2047 | filter?: Maybe; 2048 | skip?: Maybe; 2049 | sort?: Maybe; 2050 | }; 2051 | 2052 | 2053 | export type ViewerOrderConnectionArgs = { 2054 | after?: Maybe; 2055 | before?: Maybe; 2056 | filter?: Maybe; 2057 | first?: Maybe; 2058 | last?: Maybe; 2059 | sort?: Maybe; 2060 | }; 2061 | 2062 | 2063 | export type ViewerOrderPaginationArgs = { 2064 | filter?: Maybe; 2065 | page?: Maybe; 2066 | perPage?: Maybe; 2067 | sort?: Maybe; 2068 | }; 2069 | 2070 | 2071 | export type ViewerProductArgs = { 2072 | filter?: Maybe; 2073 | skip?: Maybe; 2074 | sort?: Maybe; 2075 | }; 2076 | 2077 | 2078 | export type ViewerProductConnectionArgs = { 2079 | after?: Maybe; 2080 | before?: Maybe; 2081 | filter?: Maybe; 2082 | first?: Maybe; 2083 | last?: Maybe; 2084 | sort?: Maybe; 2085 | }; 2086 | 2087 | 2088 | export type ViewerProductListArgs = { 2089 | filter?: Maybe; 2090 | limit?: Maybe; 2091 | skip?: Maybe; 2092 | sort?: Maybe; 2093 | }; 2094 | 2095 | 2096 | export type ViewerProductPaginationArgs = { 2097 | filter?: Maybe; 2098 | page?: Maybe; 2099 | perPage?: Maybe; 2100 | sort?: Maybe; 2101 | }; 2102 | 2103 | 2104 | export type ViewerRegionArgs = { 2105 | filter?: Maybe; 2106 | skip?: Maybe; 2107 | sort?: Maybe; 2108 | }; 2109 | 2110 | 2111 | export type ViewerRegionListArgs = { 2112 | filter?: Maybe; 2113 | limit?: Maybe; 2114 | skip?: Maybe; 2115 | sort?: Maybe; 2116 | }; 2117 | 2118 | 2119 | export type ViewerShipperArgs = { 2120 | filter?: Maybe; 2121 | skip?: Maybe; 2122 | sort?: Maybe; 2123 | }; 2124 | 2125 | 2126 | export type ViewerShipperListArgs = { 2127 | filter?: Maybe; 2128 | limit?: Maybe; 2129 | skip?: Maybe; 2130 | sort?: Maybe; 2131 | }; 2132 | 2133 | 2134 | export type ViewerSupplierArgs = { 2135 | filter?: Maybe; 2136 | skip?: Maybe; 2137 | sort?: Maybe; 2138 | }; 2139 | 2140 | 2141 | export type ViewerSupplierConnectionArgs = { 2142 | after?: Maybe; 2143 | before?: Maybe; 2144 | filter?: Maybe; 2145 | first?: Maybe; 2146 | last?: Maybe; 2147 | sort?: Maybe; 2148 | }; 2149 | -------------------------------------------------------------------------------- /src/features/OrderList/OrderDeleteMutation.graphql: -------------------------------------------------------------------------------- 1 | mutation OrderDeleteMutation($filter: FilterRemoveOneOrderInput!) { 2 | removeOrder(filter: $filter) { 3 | record { 4 | _id 5 | orderID 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/features/OrderList/OrderDeleteSubscription.graphql: -------------------------------------------------------------------------------- 1 | # Not realized yet 2 | # Awaiting https://github.com/apollographql/apollo-client/pull/5909 3 | 4 | subscription OrderDeleteSubscription { 5 | orderRemoved 6 | } 7 | -------------------------------------------------------------------------------- /src/features/OrderList/OrderEditMutation.graphql: -------------------------------------------------------------------------------- 1 | mutation OrderEditMutation($_id: MongoID!, $record: UpdateByIdOrderInput!) { 2 | updateOrder(_id: $_id, record: $record) { 3 | record { 4 | orderID 5 | freight 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/features/OrderList/OrderList.tsx: -------------------------------------------------------------------------------- 1 | import { useRouter } from 'next/router'; 2 | import { Table, Popconfirm } from 'antd'; 3 | import { TablePaginationConfig } from 'antd/lib/table'; 4 | import { OrderListEditableFreight } from './OrderListEditableFreight'; 5 | import { useOrderListQuery, OrderListQueryDocument } from './__generated__/OrderListQuery'; 6 | import { useOrderDeleteMutation } from './__generated__/OrderDeleteMutation'; 7 | import { useOrderUpdateSubscription } from './__generated__/OrderUpdateSubscription'; 8 | import { useOrderDeleteSubscription } from './__generated__/OrderDeleteSubscription'; 9 | import { OrderListItem } from './__generated__/OrderListItem.fragment'; 10 | 11 | export function OrderList() { 12 | const router = useRouter(); 13 | const variables = { 14 | page: parseInt(router.query?.page as any) || 1, 15 | perPage: parseInt(router.query?.perPage as any) || 10, 16 | }; 17 | const { loading, data } = useOrderListQuery({ 18 | variables, 19 | // fetchPolicy: 'cache-first', // used for first execution 20 | // nextFetchPolicy: 'cache-only', // is used for all other rerenders 21 | }); 22 | 23 | const [orderDelete] = useOrderDeleteMutation({ 24 | notifications: { 25 | onCompleted: 'Запись успешно удалена!', 26 | }, 27 | 28 | // ----- 3 ways of updating Queries 29 | refetchQueries: [OrderListQueryDocument], // <-- Better, because may avoid multiple rerender if you use `update` property 30 | // onCompleted: () => refetch(), // const { refetch } = useOrderListQuery(); 31 | // update(cache, { data }) { 32 | // // See https://www.apollographql.com/docs/react/data/mutations/#the-update-function 33 | // cache.modify({ 34 | // fields: { 35 | // viewer(viewerData) { 36 | // // ... 37 | // return viewerData; 38 | // }, 39 | // }, 40 | // }); 41 | // }, 42 | }); 43 | 44 | useOrderUpdateSubscription(); 45 | 46 | // awaiting https://github.com/apollographql/apollo-client/pull/5909 47 | // for simplification the following code 48 | useOrderDeleteSubscription({ 49 | onSubscriptionData: ({ client, subscriptionData }) => { 50 | const idToRemove = subscriptionData?.data?.orderRemoved; 51 | if (!idToRemove) return; 52 | 53 | const data = client.readQuery({ 54 | query: OrderListQueryDocument, 55 | variables, 56 | }); 57 | const newData = { 58 | viewer: { 59 | ...data?.viewer, 60 | orderPagination: { 61 | ...data?.viewer?.orderPagination, 62 | items: data?.viewer?.orderPagination?.items?.filter((t) => t._id !== idToRemove), 63 | }, 64 | }, 65 | }; 66 | client.writeQuery({ 67 | query: OrderListQueryDocument, 68 | variables, 69 | data: newData, 70 | }); 71 | }, 72 | }); 73 | 74 | function onPageChange(pagination: TablePaginationConfig) { 75 | router.push({ 76 | pathname: router.pathname, 77 | query: { 78 | page: pagination.current, 79 | perPage: pagination.pageSize, 80 | }, 81 | }); 82 | } 83 | 84 | function expandedRowRender(record: OrderListItem) { 85 | return
{JSON.stringify(record)}
; 86 | } 87 | 88 | return ( 89 | 90 | loading={loading} 91 | dataSource={data?.viewer?.orderPagination?.items || []} 92 | pagination={{ 93 | pageSize: data?.viewer?.orderPagination?.pageInfo?.perPage || 10, 94 | current: data?.viewer?.orderPagination?.pageInfo?.currentPage || 1, 95 | showSizeChanger: true, 96 | total: data?.viewer?.orderPagination?.count || 0, 97 | }} 98 | onChange={onPageChange} 99 | expandedRowRender={expandedRowRender} 100 | rowKey="orderID" 101 | rowClassName={() => 'editable-row'} 102 | columns={[ 103 | { 104 | title: 'OrderID', 105 | dataIndex: 'orderID', 106 | }, 107 | { 108 | title: 'Customer', 109 | dataIndex: ['customer', 'companyName'], 110 | }, 111 | { 112 | title: 'City', 113 | dataIndex: ['customer', 'address', 'city'], 114 | }, 115 | { 116 | title: 'Order date', 117 | dataIndex: 'orderDate', 118 | render: (t) => new Date(t).toLocaleDateString(), 119 | }, 120 | { 121 | title: 'Freight', 122 | dataIndex: 'freight', 123 | width: '150px', 124 | render: (t, record) => { 125 | // return record.freight; 126 | return ; 127 | }, 128 | }, 129 | { 130 | title: 'Operations', 131 | render: (t, record) => { 132 | return ( 133 | { 136 | orderDelete({ 137 | variables: { filter: { orderID: record.orderID } }, 138 | }); 139 | }} 140 | > 141 | Delete 142 | 143 | ); 144 | }, 145 | }, 146 | ]} 147 | /> 148 | ); 149 | } 150 | -------------------------------------------------------------------------------- /src/features/OrderList/OrderListEditableFreight.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | import { useOrderEditMutation } from './__generated__/OrderEditMutation'; 3 | import { LoadingOutlined, CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons'; 4 | 5 | interface Props { 6 | record: { freight?: number; _id: string }; 7 | } 8 | 9 | export function OrderListEditableFreight({ record }: Props) { 10 | const [freight, setFreight] = useState(`${record?.freight || 0}`); 11 | const [editable, setEditable] = useState(false); 12 | const toggleEditable = () => { 13 | setFreight(`${record?.freight || 0}`); 14 | setEditable(!editable); 15 | }; 16 | 17 | const [save, { loading }] = useOrderEditMutation({ 18 | variables: { 19 | _id: record._id, 20 | record: { 21 | freight: parseFloat(freight), 22 | }, 23 | }, 24 | onCompleted: () => { 25 | setEditable(false); 26 | }, 27 | }); 28 | 29 | if (editable) { 30 | return ( 31 |
32 | setFreight(e.target.value)} 36 | onKeyDown={(e) => { 37 | if (e.key === 'Enter') save(); 38 | }} 39 | disabled={loading} 40 | /> 41 | {loading ? ( 42 | 43 | ) : ( 44 | <> 45 | save()} 48 | > 49 | 53 | 54 | )} 55 |
56 | ); 57 | } 58 | 59 | return ( 60 |
61 | {record?.freight} 62 |
63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/features/OrderList/OrderListItem.fragment.graphql: -------------------------------------------------------------------------------- 1 | fragment OrderListItem on Order { 2 | _id 3 | orderID 4 | orderDate 5 | customerID 6 | employeeID 7 | employee { 8 | firstName 9 | lastName 10 | birthDate 11 | address { 12 | street 13 | } 14 | } 15 | customer { 16 | ...Customer_data 17 | } 18 | freight 19 | } 20 | 21 | fragment Customer_data on Customer { 22 | companyName 23 | address { 24 | city 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/features/OrderList/OrderListQuery.graphql: -------------------------------------------------------------------------------- 1 | query OrderListQuery($page: Int!, $perPage: Int!) { 2 | viewer { 3 | orderPagination(page: $page, perPage: $perPage) { 4 | ...OrderListPagination 5 | } 6 | } 7 | } 8 | 9 | fragment OrderListPagination on OrderPagination { 10 | count 11 | items { 12 | ...OrderListItem 13 | } 14 | pageInfo { 15 | pageCount 16 | currentPage 17 | perPage 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/features/OrderList/OrderUpdateSubscription.graphql: -------------------------------------------------------------------------------- 1 | subscription OrderUpdateSubscription { 2 | orderUpdated { 3 | _id 4 | orderID 5 | freight 6 | ...OrderListItem 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/features/OrderList/__generated__/OrderDeleteMutation.tsx: -------------------------------------------------------------------------------- 1 | // 🛑 NOTICE: __generated__ folders should be added to .gitignore 2 | // 🛑 In this repo I keep generated files only for demo purposes! 3 | import * as Types from '../../../__generated__/types'; 4 | 5 | import { DocumentNode } from 'graphql'; 6 | import * as Apollo from '@apollo/client'; 7 | import * as ApolloReactHooks from 'app/utils/extendApolloHooks'; 8 | const defaultOptions = {} 9 | export type OrderDeleteMutationVariables = Types.Exact<{ 10 | filter: Types.FilterRemoveOneOrderInput; 11 | }>; 12 | 13 | 14 | export type OrderDeleteMutation = { __typename: 'Mutation', removeOrder?: { __typename: 'RemoveOneOrderPayload', record?: { __typename: 'Order', _id: any, orderID?: number | null | undefined } | null | undefined } | null | undefined }; 15 | 16 | 17 | export const OrderDeleteMutationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"OrderDeleteMutation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FilterRemoveOneOrderInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"removeOrder"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"record"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"orderID"}}]}}]}}]}}]} as unknown as DocumentNode; 18 | export type OrderDeleteMutationMutationFn = Apollo.MutationFunction; 19 | 20 | /** 21 | * __useOrderDeleteMutation__ 22 | * 23 | * To run a mutation, you first call `useOrderDeleteMutation` within a React component and pass it any options that fit your needs. 24 | * When your component renders, `useOrderDeleteMutation` returns a tuple that includes: 25 | * - A mutate function that you can call at any time to execute the mutation 26 | * - An object with fields that represent the current status of the mutation's execution 27 | * 28 | * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; 29 | * 30 | * @example 31 | * const [orderDeleteMutation, { data, loading, error }] = useOrderDeleteMutation({ 32 | * variables: { 33 | * filter: // value for 'filter' 34 | * }, 35 | * }); 36 | */ 37 | export function useOrderDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { 38 | const options = {...defaultOptions, ...baseOptions} 39 | return ApolloReactHooks.useMutation(OrderDeleteMutationDocument, options); 40 | } 41 | export type OrderDeleteMutationHookResult = ReturnType; 42 | export type OrderDeleteMutationMutationResult = Apollo.MutationResult; 43 | export type OrderDeleteMutationMutationOptions = Apollo.BaseMutationOptions; -------------------------------------------------------------------------------- /src/features/OrderList/__generated__/OrderDeleteSubscription.tsx: -------------------------------------------------------------------------------- 1 | // 🛑 NOTICE: __generated__ folders should be added to .gitignore 2 | // 🛑 In this repo I keep generated files only for demo purposes! 3 | import * as Types from '../../../__generated__/types'; 4 | 5 | import { DocumentNode } from 'graphql'; 6 | import * as Apollo from '@apollo/client'; 7 | import * as ApolloReactHooks from 'app/utils/extendApolloHooks'; 8 | const defaultOptions = {} 9 | export type OrderDeleteSubscriptionVariables = Types.Exact<{ [key: string]: never; }>; 10 | 11 | 12 | export type OrderDeleteSubscription = { __typename: 'Subscription', orderRemoved?: any | null | undefined }; 13 | 14 | 15 | export const OrderDeleteSubscriptionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"OrderDeleteSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"orderRemoved"}}]}}]} as unknown as DocumentNode; 16 | 17 | /** 18 | * __useOrderDeleteSubscription__ 19 | * 20 | * To run a query within a React component, call `useOrderDeleteSubscription` and pass it any options that fit your needs. 21 | * When your component renders, `useOrderDeleteSubscription` returns an object from Apollo Client that contains loading, error, and data properties 22 | * you can use to render your UI. 23 | * 24 | * @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; 25 | * 26 | * @example 27 | * const { data, loading, error } = useOrderDeleteSubscription({ 28 | * variables: { 29 | * }, 30 | * }); 31 | */ 32 | export function useOrderDeleteSubscription(baseOptions?: ApolloReactHooks.SubscriptionHookOptions) { 33 | const options = {...defaultOptions, ...baseOptions} 34 | return ApolloReactHooks.useSubscription(OrderDeleteSubscriptionDocument, options); 35 | } 36 | export type OrderDeleteSubscriptionHookResult = ReturnType; 37 | export type OrderDeleteSubscriptionSubscriptionResult = Apollo.SubscriptionResult; -------------------------------------------------------------------------------- /src/features/OrderList/__generated__/OrderEditMutation.tsx: -------------------------------------------------------------------------------- 1 | // 🛑 NOTICE: __generated__ folders should be added to .gitignore 2 | // 🛑 In this repo I keep generated files only for demo purposes! 3 | import * as Types from '../../../__generated__/types'; 4 | 5 | import { DocumentNode } from 'graphql'; 6 | import * as Apollo from '@apollo/client'; 7 | import * as ApolloReactHooks from 'app/utils/extendApolloHooks'; 8 | const defaultOptions = {} 9 | export type OrderEditMutationVariables = Types.Exact<{ 10 | _id: Types.Scalars['MongoID']; 11 | record: Types.UpdateByIdOrderInput; 12 | }>; 13 | 14 | 15 | export type OrderEditMutation = { __typename: 'Mutation', updateOrder?: { __typename: 'UpdateByIdOrderPayload', record?: { __typename: 'Order', orderID?: number | null | undefined, freight?: number | null | undefined } | null | undefined } | null | undefined }; 16 | 17 | 18 | export const OrderEditMutationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"OrderEditMutation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"MongoID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"record"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateByIdOrderInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOrder"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"_id"}}},{"kind":"Argument","name":{"kind":"Name","value":"record"},"value":{"kind":"Variable","name":{"kind":"Name","value":"record"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"record"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"orderID"}},{"kind":"Field","name":{"kind":"Name","value":"freight"}}]}}]}}]}}]} as unknown as DocumentNode; 19 | export type OrderEditMutationMutationFn = Apollo.MutationFunction; 20 | 21 | /** 22 | * __useOrderEditMutation__ 23 | * 24 | * To run a mutation, you first call `useOrderEditMutation` within a React component and pass it any options that fit your needs. 25 | * When your component renders, `useOrderEditMutation` returns a tuple that includes: 26 | * - A mutate function that you can call at any time to execute the mutation 27 | * - An object with fields that represent the current status of the mutation's execution 28 | * 29 | * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; 30 | * 31 | * @example 32 | * const [orderEditMutation, { data, loading, error }] = useOrderEditMutation({ 33 | * variables: { 34 | * _id: // value for '_id' 35 | * record: // value for 'record' 36 | * }, 37 | * }); 38 | */ 39 | export function useOrderEditMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { 40 | const options = {...defaultOptions, ...baseOptions} 41 | return ApolloReactHooks.useMutation(OrderEditMutationDocument, options); 42 | } 43 | export type OrderEditMutationHookResult = ReturnType; 44 | export type OrderEditMutationMutationResult = Apollo.MutationResult; 45 | export type OrderEditMutationMutationOptions = Apollo.BaseMutationOptions; -------------------------------------------------------------------------------- /src/features/OrderList/__generated__/OrderListItem.fragment.tsx: -------------------------------------------------------------------------------- 1 | // 🛑 NOTICE: __generated__ folders should be added to .gitignore 2 | // 🛑 In this repo I keep generated files only for demo purposes! 3 | import * as Types from '../../../__generated__/types'; 4 | 5 | import { DocumentNode } from 'graphql'; 6 | export type OrderListItem = { __typename: 'Order', _id: any, orderID?: number | null | undefined, orderDate?: any | null | undefined, customerID?: string | null | undefined, employeeID?: number | null | undefined, freight?: number | null | undefined, employee?: { __typename: 'Employee', firstName?: string | null | undefined, lastName?: string | null | undefined, birthDate?: any | null | undefined, address?: { __typename: 'CustomerAddress', street?: string | null | undefined } | null | undefined } | null | undefined, customer?: { __typename: 'Customer', companyName?: string | null | undefined, address?: { __typename: 'CustomerAddress', city?: string | null | undefined } | null | undefined } | null | undefined }; 7 | 8 | export type Customer_data = { __typename: 'Customer', companyName?: string | null | undefined, address?: { __typename: 'CustomerAddress', city?: string | null | undefined } | null | undefined }; 9 | 10 | export const Customer_data = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Customer_data"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Customer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"address"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"city"}}]}}]}}]} as unknown as DocumentNode; 11 | export const OrderListItem = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"OrderListItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Order"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"orderID"}},{"kind":"Field","name":{"kind":"Name","value":"orderDate"}},{"kind":"Field","name":{"kind":"Name","value":"customerID"}},{"kind":"Field","name":{"kind":"Name","value":"employeeID"}},{"kind":"Field","name":{"kind":"Name","value":"employee"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"birthDate"}},{"kind":"Field","name":{"kind":"Name","value":"address"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"street"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"customer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Customer_data"}}]}},{"kind":"Field","name":{"kind":"Name","value":"freight"}}]}},...Customer_data.definitions]} as unknown as DocumentNode; -------------------------------------------------------------------------------- /src/features/OrderList/__generated__/OrderListQuery.tsx: -------------------------------------------------------------------------------- 1 | // 🛑 NOTICE: __generated__ folders should be added to .gitignore 2 | // 🛑 In this repo I keep generated files only for demo purposes! 3 | import * as Types from '../../../__generated__/types'; 4 | 5 | import { DocumentNode } from 'graphql'; 6 | import { OrderListItem } from './OrderListItem.fragment'; 7 | import * as Apollo from '@apollo/client'; 8 | import * as ApolloReactHooks from 'app/utils/extendApolloHooks'; 9 | const defaultOptions = {} 10 | export type OrderListQueryVariables = Types.Exact<{ 11 | page: Types.Scalars['Int']; 12 | perPage: Types.Scalars['Int']; 13 | }>; 14 | 15 | 16 | export type OrderListQuery = { __typename: 'Query', viewer?: { __typename: 'Viewer', orderPagination?: { __typename: 'OrderPagination', count?: number | null | undefined, items?: Array<{ __typename: 'Order', _id: any, orderID?: number | null | undefined, orderDate?: any | null | undefined, customerID?: string | null | undefined, employeeID?: number | null | undefined, freight?: number | null | undefined, employee?: { __typename: 'Employee', firstName?: string | null | undefined, lastName?: string | null | undefined, birthDate?: any | null | undefined, address?: { __typename: 'CustomerAddress', street?: string | null | undefined } | null | undefined } | null | undefined, customer?: { __typename: 'Customer', companyName?: string | null | undefined, address?: { __typename: 'CustomerAddress', city?: string | null | undefined } | null | undefined } | null | undefined }> | null | undefined, pageInfo: { __typename: 'PaginationInfo', pageCount?: number | null | undefined, currentPage: number, perPage: number } } | null | undefined } | null | undefined }; 17 | 18 | export type OrderListPagination = { __typename: 'OrderPagination', count?: number | null | undefined, items?: Array<{ __typename: 'Order', _id: any, orderID?: number | null | undefined, orderDate?: any | null | undefined, customerID?: string | null | undefined, employeeID?: number | null | undefined, freight?: number | null | undefined, employee?: { __typename: 'Employee', firstName?: string | null | undefined, lastName?: string | null | undefined, birthDate?: any | null | undefined, address?: { __typename: 'CustomerAddress', street?: string | null | undefined } | null | undefined } | null | undefined, customer?: { __typename: 'Customer', companyName?: string | null | undefined, address?: { __typename: 'CustomerAddress', city?: string | null | undefined } | null | undefined } | null | undefined }> | null | undefined, pageInfo: { __typename: 'PaginationInfo', pageCount?: number | null | undefined, currentPage: number, perPage: number } }; 19 | 20 | export const OrderListPagination = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"OrderListPagination"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OrderPagination"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"OrderListItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pageCount"}},{"kind":"Field","name":{"kind":"Name","value":"currentPage"}},{"kind":"Field","name":{"kind":"Name","value":"perPage"}}]}}]}},...OrderListItem.definitions]} as unknown as DocumentNode; 21 | export const OrderListQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"OrderListQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"page"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"perPage"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"viewer"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"orderPagination"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"page"},"value":{"kind":"Variable","name":{"kind":"Name","value":"page"}}},{"kind":"Argument","name":{"kind":"Name","value":"perPage"},"value":{"kind":"Variable","name":{"kind":"Name","value":"perPage"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"OrderListPagination"}}]}}]}}]}},...OrderListPagination.definitions]} as unknown as DocumentNode; 22 | 23 | /** 24 | * __useOrderListQuery__ 25 | * 26 | * To run a query within a React component, call `useOrderListQuery` and pass it any options that fit your needs. 27 | * When your component renders, `useOrderListQuery` returns an object from Apollo Client that contains loading, error, and data properties 28 | * you can use to render your UI. 29 | * 30 | * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; 31 | * 32 | * @example 33 | * const { data, loading, error } = useOrderListQuery({ 34 | * variables: { 35 | * page: // value for 'page' 36 | * perPage: // value for 'perPage' 37 | * }, 38 | * }); 39 | */ 40 | export function useOrderListQuery(baseOptions: ApolloReactHooks.QueryHookOptions) { 41 | const options = {...defaultOptions, ...baseOptions} 42 | return ApolloReactHooks.useQuery(OrderListQueryDocument, options); 43 | } 44 | export function useOrderListQueryLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { 45 | const options = {...defaultOptions, ...baseOptions} 46 | return ApolloReactHooks.useLazyQuery(OrderListQueryDocument, options); 47 | } 48 | export type OrderListQueryHookResult = ReturnType; 49 | export type OrderListQueryLazyQueryHookResult = ReturnType; 50 | export type OrderListQueryQueryResult = Apollo.QueryResult; -------------------------------------------------------------------------------- /src/features/OrderList/__generated__/OrderUpdateSubscription.tsx: -------------------------------------------------------------------------------- 1 | // 🛑 NOTICE: __generated__ folders should be added to .gitignore 2 | // 🛑 In this repo I keep generated files only for demo purposes! 3 | import * as Types from '../../../__generated__/types'; 4 | 5 | import { DocumentNode } from 'graphql'; 6 | import { OrderListItem } from './OrderListItem.fragment'; 7 | import * as Apollo from '@apollo/client'; 8 | import * as ApolloReactHooks from 'app/utils/extendApolloHooks'; 9 | const defaultOptions = {} 10 | export type OrderUpdateSubscriptionVariables = Types.Exact<{ [key: string]: never; }>; 11 | 12 | 13 | export type OrderUpdateSubscription = { __typename: 'Subscription', orderUpdated?: { __typename: 'Order', _id: any, orderID?: number | null | undefined, freight?: number | null | undefined, orderDate?: any | null | undefined, customerID?: string | null | undefined, employeeID?: number | null | undefined, employee?: { __typename: 'Employee', firstName?: string | null | undefined, lastName?: string | null | undefined, birthDate?: any | null | undefined, address?: { __typename: 'CustomerAddress', street?: string | null | undefined } | null | undefined } | null | undefined, customer?: { __typename: 'Customer', companyName?: string | null | undefined, address?: { __typename: 'CustomerAddress', city?: string | null | undefined } | null | undefined } | null | undefined } | null | undefined }; 14 | 15 | 16 | export const OrderUpdateSubscriptionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"OrderUpdateSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"orderUpdated"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"_id"}},{"kind":"Field","name":{"kind":"Name","value":"orderID"}},{"kind":"Field","name":{"kind":"Name","value":"freight"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"OrderListItem"}}]}}]}},...OrderListItem.definitions]} as unknown as DocumentNode; 17 | 18 | /** 19 | * __useOrderUpdateSubscription__ 20 | * 21 | * To run a query within a React component, call `useOrderUpdateSubscription` and pass it any options that fit your needs. 22 | * When your component renders, `useOrderUpdateSubscription` returns an object from Apollo Client that contains loading, error, and data properties 23 | * you can use to render your UI. 24 | * 25 | * @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; 26 | * 27 | * @example 28 | * const { data, loading, error } = useOrderUpdateSubscription({ 29 | * variables: { 30 | * }, 31 | * }); 32 | */ 33 | export function useOrderUpdateSubscription(baseOptions?: ApolloReactHooks.SubscriptionHookOptions) { 34 | const options = {...defaultOptions, ...baseOptions} 35 | return ApolloReactHooks.useSubscription(OrderUpdateSubscriptionDocument, options); 36 | } 37 | export type OrderUpdateSubscriptionHookResult = ReturnType; 38 | export type OrderUpdateSubscriptionSubscriptionResult = Apollo.SubscriptionResult; -------------------------------------------------------------------------------- /src/features/ProductList/ProductList.tsx: -------------------------------------------------------------------------------- 1 | import { useRouter } from 'next/router'; 2 | import { Table, Popconfirm } from 'antd'; 3 | import { TablePaginationConfig } from 'antd/lib/table'; 4 | 5 | export function ProductList() { 6 | const router = useRouter(); 7 | const variables = { 8 | page: parseInt(router.query?.page as any) || 1, 9 | perPage: parseInt(router.query?.perPage as any) || 5, 10 | }; 11 | const loading = false; 12 | 13 | return ( 14 |

TODO: Implement ProductList logic like in Orders

} 16 | loading={loading} 17 | dataSource={[]} 18 | columns={[ 19 | { 20 | title: 'ProductID', 21 | dataIndex: 'productID', 22 | }, 23 | { 24 | title: 'Name', 25 | dataIndex: 'name', 26 | }, 27 | { 28 | title: 'Supplier', 29 | dataIndex: ['supplier', 'companyName'], 30 | }, 31 | { 32 | title: 'Unit Price', 33 | dataIndex: 'unitPrice', 34 | render: (unitPrice, _record) => { 35 | return unitPrice; 36 | // return ; 37 | }, 38 | }, 39 | { 40 | title: 'Operations', 41 | width: '150px', 42 | render: (_t, _record) => { 43 | return ( 44 | { 47 | alert('run delete mutation'); 48 | }} 49 | > 50 | Delete 51 | 52 | ); 53 | }, 54 | }, 55 | ]} 56 | pagination={{ 57 | showSizeChanger: true, 58 | pageSize: variables.perPage, 59 | current: variables.page, 60 | pageSizeOptions: ['5', '10', '100'], 61 | total: 100, // TODO: from graphql response 62 | }} 63 | onChange={(pagination: TablePaginationConfig) => { 64 | router.push({ 65 | pathname: router.pathname, 66 | query: { 67 | page: pagination.current, 68 | perPage: pagination.pageSize, 69 | }, 70 | }); 71 | }} 72 | rowKey="productID" 73 | rowClassName={() => 'editable-row'} 74 | /> 75 | ); 76 | } 77 | -------------------------------------------------------------------------------- /src/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import 'antd/dist/antd.css'; 2 | import { Layout, Menu, notification } from 'antd'; 3 | import { useRouter } from 'next/router'; 4 | import Link from 'next/link'; 5 | import dynamic from 'next/dynamic'; 6 | import { initApolloClient } from 'app/utils/withApollo'; 7 | import '../styles.scss'; 8 | 9 | const { Header, Content, Footer } = Layout; 10 | 11 | function App({ Component, pageProps }) { 12 | const router = useRouter(); 13 | 14 | function clearCache() { 15 | const apolloClient = initApolloClient(); 16 | notification.info({ message: 'Cache was cleared!' }); 17 | apolloClient.clearStore(); 18 | } 19 | 20 | async function resetCache() { 21 | const apolloClient = initApolloClient(); 22 | notification.info({ message: 'Cache was reset!' }); 23 | await apolloClient.resetStore(); 24 | notification.info({ message: 'Fresh data from server was loaded!' }); 25 | } 26 | 27 | return ( 28 | 29 |
30 |
31 | 37 | 38 | 39 | Main 40 | 41 | 42 | 43 | 44 | Orders 45 | 46 | 47 | 48 | 49 | Products 50 | 51 | 52 | 53 | 54 | ApolloClient 55 | 56 | 57 | 58 | 59 | Mock 60 | 61 | 62 | 63 | 64 | Misc 65 | 66 | 67 | 68 | Clear cache 69 | 70 | 71 | Reset cache 72 | 73 | 74 | 79 | API ⤴︎ 80 | 81 | 82 | 83 |
84 | 85 |
86 | 87 |
88 |
89 |
GraphQL Workshop
90 |
91 | ); 92 | } 93 | 94 | // Disable SSR 95 | // it helps to fix warnings in antd@4.16.x with rc-overflow component 96 | // @see https://github.com/ant-design/ant-design/issues/30396#issuecomment-916674374 97 | export default dynamic(() => Promise.resolve(App), { 98 | ssr: false, 99 | }); 100 | -------------------------------------------------------------------------------- /src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import Document, { Html, Head, Main, NextScript } from 'next/document'; 2 | import React from 'react'; 3 | 4 | // The document (which is SSR-only) needs to be customized to expose the locale 5 | // data for the user's locale for React Intl to work in the browser. 6 | export default class MyDocument extends Document { 7 | render() { 8 | const { locale } = this.props; 9 | 10 | return ( 11 | 12 | 13 |