├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .gqlconfig ├── .prettierrc ├── .vscode └── settings.json ├── README.md ├── __generated__ └── globalTypes.ts ├── apollo.config.js ├── codegen.yml ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html └── manifest.json ├── schema.graphql ├── src ├── __generated__ │ └── types.ts ├── apolloClient.ts ├── apolloClientQueryDemo.ts ├── components │ └── Menu.tsx ├── index.tsx ├── pages │ ├── _app.tsx │ ├── _error.tsx │ ├── _routes.tsx │ ├── customers │ │ ├── Customer.tsx │ │ ├── Customer_data.graphql │ │ └── __generated__ │ │ │ └── Customer_data.tsx │ ├── index.tsx │ ├── mock │ │ └── index.tsx │ └── orders │ │ ├── OrderList.tsx │ │ ├── OrderList_pagination.graphql │ │ ├── OrderQuery.graphql │ │ ├── OrderQuery.tsx │ │ ├── OrderRow.tsx │ │ ├── OrderRow_order.graphql │ │ └── __generated__ │ │ ├── OrderList_pagination.tsx │ │ ├── OrderQuery.tsx │ │ └── OrderRow_order.tsx └── react-app-env.d.ts ├── tsconfig.json └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | REACT_APP_API_URL="https://graphql-compose.herokuapp.com/northwind" 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist/* 3 | __generated__ -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | 4 | module.exports = { 5 | extends: 'react-app', 6 | plugins: ['graphql'], 7 | rules: { 8 | 'graphql/template-strings': [ 9 | 'error', 10 | { 11 | env: 'apollo', // 'literal' 12 | tagName: 'gql', 13 | schemaString: fs.readFileSync(path.resolve(__dirname, './schema.graphql'), 'utf8'), 14 | }, 15 | ], 16 | 'jsx-a11y/accessible-emoji': 0, 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | # Generated files (commented for demo purposes!) 26 | # __generated__ -------------------------------------------------------------------------------- /.gqlconfig: -------------------------------------------------------------------------------- 1 | // see config options https://github.com/Mayank1791989/gql 2 | { 3 | schema: { 4 | // For Client query autosuggesting 5 | files: 'schema.graphql' 6 | 7 | // For Server: GoTo Definition + Type Checks 8 | // files: 'packages/boilerplate-server/src/schema/**/*.gql' 9 | }, 10 | query: { 11 | files: [ 12 | { 13 | match: 'src/**/*.ts', 14 | parser: ['EmbeddedQueryParser', { startTag: 'gql`', endTag: '`' }], 15 | validate: { 16 | extends: 'gql-rules-query', 17 | rules: { 18 | FieldsOnCorrectType: 'off' 19 | } 20 | } 21 | }, 22 | { 23 | match: 'src/**/*.tsx', 24 | parser: ['EmbeddedQueryParser', { startTag: 'gql`', endTag: '`' }], 25 | validate: { 26 | extends: 'gql-rules-query', 27 | rules: { 28 | KnownFragmentNames: 'off', 29 | NoUnusedFragments: 'off' 30 | } 31 | } 32 | }, 33 | ] 34 | } 35 | } -------------------------------------------------------------------------------- /.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 | "editor.formatOnSave": true, 3 | "[javascript]": { 4 | "editor.formatOnSave": true 5 | }, 6 | "[typescript]": { 7 | "editor.formatOnSave": true 8 | }, 9 | "[typescriptreact]": { 10 | "editor.formatOnSave": true 11 | }, 12 | "eslint.autoFixOnSave": true, 13 | "eslint.validate": [ 14 | { "language": "javascript", "autoFix": true }, 15 | { "language": "javascriptreact", "autoFix": true }, 16 | { "language": "typescript", "autoFix": true }, 17 | { "language": "typescriptreact", "autoFix": true } 18 | ], 19 | "typescript.tsc.autoDetect": "off", 20 | "npm.autoDetect": "off", 21 | "editor.codeActionsOnSave": { 22 | "source.fixAll.eslint": true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ApolloClient + graphql-code-generator 2 | 3 | Example of type generation in relay-compiler manner. 4 | 5 | NOTE: `__generated__` folders should be excluded from version control! In this repo they are added for demo purposes (without run we can see what generated and disscus it). 6 | 7 | If you use VSCode, please install [Apllo GraphQL plugin](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo). It greatly improve DX when you working with `.graphql` files. This project already has properly configured `apollo.config.js`. 8 | -------------------------------------------------------------------------------- /__generated__/globalTypes.ts: -------------------------------------------------------------------------------- 1 | /* tslint:disable */ 2 | /* eslint-disable */ 3 | // This file was automatically generated and should not be edited. 4 | 5 | //============================================================== 6 | // START Enums and Input Objects 7 | //============================================================== 8 | 9 | //============================================================== 10 | // END Enums and Input Objects 11 | //============================================================== 12 | -------------------------------------------------------------------------------- /apollo.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | client: { 3 | service: { 4 | name: 'client', 5 | localSchemaFile: './schema.graphql', 6 | }, 7 | tagName: 'omitGqlTagsTheyAreUnderGraphqlCodeGeneratorControl', 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /codegen.yml: -------------------------------------------------------------------------------- 1 | schema: schema.graphql 2 | documents: 'src/**/*.graphql' 3 | generates: 4 | src/__generated__/types.ts: 5 | - typescript 6 | src/: 7 | preset: near-operation-file 8 | presetConfig: 9 | folder: __generated__ 10 | extension: .tsx 11 | baseTypesPath: __generated__/types.ts 12 | plugins: 13 | - typescript-operations 14 | - typescript-react-apollo 15 | config: 16 | namingConvention: keep 17 | nonOptionalTypename: true 18 | dedupeOperationSuffix: true 19 | withComponent: true 20 | withHooks: true 21 | withHOC: false 22 | reactApolloVersion: 2 23 | # documentMode: documentNode 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-fragments-apollo", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "prebuild": "yarn generate", 8 | "pretest": "yarn generate", 9 | "start": "cross-env EXTEND_ESLINT=true SKIP_PREFLIGHT_CHECK=true react-scripts start", 10 | "build": "react-scripts build", 11 | "test": "react-scripts test", 12 | "eject": "react-scripts eject", 13 | "lint": "eslint 'src/**/*.{js,ts,tsx,jsx}'", 14 | "generate": "graphql-codegen", 15 | "watch-generate": "graphql-codegen --watch", 16 | "watch": "npm run clear && concurrently -k npm:watch-generate npm:start", 17 | "clear": "find ./src -name \"__generated__\" -exec rm -rf '{}' +" 18 | }, 19 | "author": "", 20 | "license": "ISC", 21 | "dependencies": { 22 | "@apollo/react-components": "3.1.3", 23 | "apollo-cache-inmemory": "^1.6.5", 24 | "apollo-client": "2.6.8", 25 | "apollo-link": "1.2.13", 26 | "apollo-link-http": "^1.5.16", 27 | "graphql": "14.6.0", 28 | "graphql-tag": "2.10.3", 29 | "history": "4.10.1", 30 | "qs": "6.9.1", 31 | "react": "16.12.0", 32 | "react-bootstrap": "1.0.0-beta.16", 33 | "react-dom": "16.12.0", 34 | "react-router": "5.1.2", 35 | "react-router-bootstrap": "^0.25.0", 36 | "react-router-dom": "5.1.2", 37 | "react-scripts": "3.3.1" 38 | }, 39 | "devDependencies": { 40 | "@graphql-codegen/cli": "1.12.2", 41 | "@graphql-codegen/near-operation-file-preset": "^1.12.2", 42 | "@graphql-codegen/typescript": "1.12.2", 43 | "@graphql-codegen/typescript-operations": "1.12.2", 44 | "@graphql-codegen/typescript-react-apollo": "1.12.2", 45 | "@types/history": "4.7.5", 46 | "@types/jest": "25.1.2", 47 | "@types/node": "13.7.1", 48 | "@types/qs": "6.9.1", 49 | "@types/react": "16.9.19", 50 | "@types/react-dom": "16.9.5", 51 | "@types/react-router-bootstrap": "^0.24.5", 52 | "@types/react-router-dom": "^4.3.3", 53 | "@typescript-eslint/eslint-plugin": "2.19.2", 54 | "concurrently": "5.1.0", 55 | "cross-env": "7.0.0", 56 | "eslint": "6.8.0", 57 | "eslint-config-prettier": "6.10.0", 58 | "eslint-plugin-graphql": "3.1.1", 59 | "eslint-plugin-prettier": "3.1.2", 60 | "prettier": "1.19.1", 61 | "typescript": "3.7.5" 62 | }, 63 | "resolutions": { 64 | "graphql": "14.6.0" 65 | }, 66 | "browserslist": { 67 | "production": [ 68 | ">0.2%", 69 | "not dead", 70 | "not op_mini all" 71 | ], 72 | "development": [ 73 | "last 1 chrome version", 74 | "last 1 firefox version", 75 | "last 1 safari version" 76 | ] 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodkz/example-apollo2/03a135775c18142b67097c45451287f87d0e15bd/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 15 | 16 | 17 | 26 | React App 27 | 28 | 29 | 30 |
31 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /schema.graphql: -------------------------------------------------------------------------------- 1 | input _idOperatorsFilterFindManyCategoryInput { 2 | gt: MongoID 3 | gte: MongoID 4 | lt: MongoID 5 | lte: MongoID 6 | ne: MongoID 7 | in: [MongoID] 8 | nin: [MongoID] 9 | } 10 | 11 | input _idOperatorsFilterFindManyCustomerInput { 12 | gt: MongoID 13 | gte: MongoID 14 | lt: MongoID 15 | lte: MongoID 16 | ne: MongoID 17 | in: [MongoID] 18 | nin: [MongoID] 19 | } 20 | 21 | input _idOperatorsFilterFindManyEmployeeInput { 22 | gt: MongoID 23 | gte: MongoID 24 | lt: MongoID 25 | lte: MongoID 26 | ne: MongoID 27 | in: [MongoID] 28 | nin: [MongoID] 29 | } 30 | 31 | input _idOperatorsFilterFindManyOrderInput { 32 | gt: MongoID 33 | gte: MongoID 34 | lt: MongoID 35 | lte: MongoID 36 | ne: MongoID 37 | in: [MongoID] 38 | nin: [MongoID] 39 | } 40 | 41 | input _idOperatorsFilterFindManyProductInput { 42 | gt: MongoID 43 | gte: MongoID 44 | lt: MongoID 45 | lte: MongoID 46 | ne: MongoID 47 | in: [MongoID] 48 | nin: [MongoID] 49 | } 50 | 51 | input _idOperatorsFilterFindManyRegionInput { 52 | gt: MongoID 53 | gte: MongoID 54 | lt: MongoID 55 | lte: MongoID 56 | ne: MongoID 57 | in: [MongoID] 58 | nin: [MongoID] 59 | } 60 | 61 | input _idOperatorsFilterFindManyShipperInput { 62 | gt: MongoID 63 | gte: MongoID 64 | lt: MongoID 65 | lte: MongoID 66 | ne: MongoID 67 | in: [MongoID] 68 | nin: [MongoID] 69 | } 70 | 71 | input _idOperatorsFilterFindManySupplierInput { 72 | gt: MongoID 73 | gte: MongoID 74 | lt: MongoID 75 | lte: MongoID 76 | ne: MongoID 77 | in: [MongoID] 78 | nin: [MongoID] 79 | } 80 | 81 | input _idOperatorsFilterFindOneCategoryInput { 82 | gt: MongoID 83 | gte: MongoID 84 | lt: MongoID 85 | lte: MongoID 86 | ne: MongoID 87 | in: [MongoID] 88 | nin: [MongoID] 89 | } 90 | 91 | input _idOperatorsFilterFindOneCustomerInput { 92 | gt: MongoID 93 | gte: MongoID 94 | lt: MongoID 95 | lte: MongoID 96 | ne: MongoID 97 | in: [MongoID] 98 | nin: [MongoID] 99 | } 100 | 101 | input _idOperatorsFilterFindOneEmployeeInput { 102 | gt: MongoID 103 | gte: MongoID 104 | lt: MongoID 105 | lte: MongoID 106 | ne: MongoID 107 | in: [MongoID] 108 | nin: [MongoID] 109 | } 110 | 111 | input _idOperatorsFilterFindOneOrderInput { 112 | gt: MongoID 113 | gte: MongoID 114 | lt: MongoID 115 | lte: MongoID 116 | ne: MongoID 117 | in: [MongoID] 118 | nin: [MongoID] 119 | } 120 | 121 | input _idOperatorsFilterFindOneProductInput { 122 | gt: MongoID 123 | gte: MongoID 124 | lt: MongoID 125 | lte: MongoID 126 | ne: MongoID 127 | in: [MongoID] 128 | nin: [MongoID] 129 | } 130 | 131 | input _idOperatorsFilterFindOneRegionInput { 132 | gt: MongoID 133 | gte: MongoID 134 | lt: MongoID 135 | lte: MongoID 136 | ne: MongoID 137 | in: [MongoID] 138 | nin: [MongoID] 139 | } 140 | 141 | input _idOperatorsFilterFindOneShipperInput { 142 | gt: MongoID 143 | gte: MongoID 144 | lt: MongoID 145 | lte: MongoID 146 | ne: MongoID 147 | in: [MongoID] 148 | nin: [MongoID] 149 | } 150 | 151 | input _idOperatorsFilterFindOneSupplierInput { 152 | gt: MongoID 153 | gte: MongoID 154 | lt: MongoID 155 | lte: MongoID 156 | ne: MongoID 157 | in: [MongoID] 158 | nin: [MongoID] 159 | } 160 | 161 | type Category implements Node { 162 | # Category unique ID 163 | categoryID: Float 164 | name: String 165 | description: String 166 | _id: MongoID! 167 | 168 | # The globally unique ID among all types 169 | id: ID! 170 | productConnection( 171 | # Forward pagination argument for returning at most first edges 172 | first: Int 173 | 174 | # Forward pagination argument for returning at most first edges 175 | after: String 176 | 177 | # Backward pagination argument for returning at most last edges 178 | last: Int 179 | 180 | # Backward pagination argument for returning at most last edges 181 | before: String 182 | 183 | # Sort argument for data ordering 184 | sort: SortConnectionProductEnum = _ID_DESC 185 | ): ProductConnection 186 | productList(skip: Int, limit: Int = 1000, sort: SortFindManyProductInput): [Product] 187 | } 188 | 189 | input CategoryIDOperatorsFilterFindManyCategoryInput { 190 | # Category unique ID 191 | gt: Float 192 | 193 | # Category unique ID 194 | gte: Float 195 | 196 | # Category unique ID 197 | lt: Float 198 | 199 | # Category unique ID 200 | lte: Float 201 | 202 | # Category unique ID 203 | ne: Float 204 | 205 | # Category unique ID 206 | in: [Float] 207 | 208 | # Category unique ID 209 | nin: [Float] 210 | } 211 | 212 | input CategoryIDOperatorsFilterFindOneCategoryInput { 213 | # Category unique ID 214 | gt: Float 215 | 216 | # Category unique ID 217 | gte: Float 218 | 219 | # Category unique ID 220 | lt: Float 221 | 222 | # Category unique ID 223 | lte: Float 224 | 225 | # Category unique ID 226 | ne: Float 227 | 228 | # Category unique ID 229 | in: [Float] 230 | 231 | # Category unique ID 232 | nin: [Float] 233 | } 234 | 235 | input CompanyNameOperatorsFilterFindManyCustomerInput { 236 | gt: String 237 | gte: String 238 | lt: String 239 | lte: String 240 | ne: String 241 | in: [String] 242 | nin: [String] 243 | } 244 | 245 | input CompanyNameOperatorsFilterFindManySupplierInput { 246 | gt: String 247 | gte: String 248 | lt: String 249 | lte: String 250 | ne: String 251 | in: [String] 252 | nin: [String] 253 | } 254 | 255 | input CompanyNameOperatorsFilterFindOneCustomerInput { 256 | gt: String 257 | gte: String 258 | lt: String 259 | lte: String 260 | ne: String 261 | in: [String] 262 | nin: [String] 263 | } 264 | 265 | input CompanyNameOperatorsFilterFindOneSupplierInput { 266 | gt: String 267 | gte: String 268 | lt: String 269 | lte: String 270 | ne: String 271 | in: [String] 272 | nin: [String] 273 | } 274 | 275 | input CreateOneOrderInput { 276 | # Order unique ID 277 | orderID: Float 278 | customerID: String 279 | employeeID: Float 280 | orderDate: Date 281 | requiredDate: Date 282 | shippedDate: Date 283 | shipVia: Float 284 | freight: Float 285 | shipName: String 286 | shipAddress: CustomerAddressInput 287 | 288 | # List of ordered products 289 | details: [OrderDetailsInput] 290 | } 291 | 292 | type CreateOneOrderPayload { 293 | # Created document ID 294 | recordId: MongoID 295 | 296 | # Created document 297 | record: Order 298 | 299 | # The globally unique ID among all types 300 | nodeId: ID 301 | 302 | # The client mutation ID used by clients like Relay to track the mutation. If 303 | # given, returned in the response payload of the mutation. 304 | clientMutationId: String 305 | query: Query 306 | } 307 | 308 | input CreateOneProductInput { 309 | # Unique product id 310 | productID: Float 311 | name: String 312 | supplierID: Float 313 | categoryID: Float 314 | quantityPerUnit: String 315 | unitPrice: Float 316 | unitsInStock: Float 317 | unitsOnOrder: Float 318 | reorderLevel: Float 319 | discontinued: Boolean 320 | } 321 | 322 | type CreateOneProductPayload { 323 | # Created document ID 324 | recordId: MongoID 325 | 326 | # Created document 327 | record: Product 328 | 329 | # The globally unique ID among all types 330 | nodeId: ID 331 | 332 | # The client mutation ID used by clients like Relay to track the mutation. If 333 | # given, returned in the response payload of the mutation. 334 | clientMutationId: String 335 | query: Query 336 | } 337 | 338 | type Customer implements Node { 339 | # Customer unique ID 340 | customerID: String 341 | companyName: String 342 | contactName: String 343 | contactTitle: String 344 | address: CustomerAddress 345 | _id: MongoID! 346 | 347 | # The globally unique ID among all types 348 | id: ID! 349 | orderConnection( 350 | # Forward pagination argument for returning at most first edges 351 | first: Int 352 | 353 | # Forward pagination argument for returning at most first edges 354 | after: String 355 | 356 | # Backward pagination argument for returning at most last edges 357 | last: Int 358 | 359 | # Backward pagination argument for returning at most last edges 360 | before: String 361 | 362 | # Sort argument for data ordering 363 | sort: SortConnectionOrderEnum = _ID_DESC 364 | ): OrderConnection 365 | orderList(skip: Int, limit: Int = 1000, sort: SortFindManyOrderInput): [Order] 366 | } 367 | 368 | type CustomerAddress { 369 | street: String 370 | city: String 371 | region: String 372 | postalCode: String 373 | country: String 374 | phone: String 375 | } 376 | 377 | input CustomerAddressInput { 378 | street: String 379 | city: String 380 | region: String 381 | postalCode: String 382 | country: String 383 | phone: String 384 | } 385 | 386 | # A connection to a list of items. 387 | type CustomerConnection { 388 | # Total object count. 389 | count: Int! 390 | 391 | # Information to aid in pagination. 392 | pageInfo: PageInfo! 393 | 394 | # Information to aid in pagination. 395 | edges: [CustomerEdge!]! 396 | } 397 | 398 | # An edge in a connection. 399 | type CustomerEdge { 400 | # The item at the end of the edge 401 | node: Customer! 402 | 403 | # A cursor for use in pagination 404 | cursor: String! 405 | } 406 | 407 | input CustomerIDOperatorsFilterFindManyCustomerInput { 408 | # Customer unique ID 409 | gt: String 410 | 411 | # Customer unique ID 412 | gte: String 413 | 414 | # Customer unique ID 415 | lt: String 416 | 417 | # Customer unique ID 418 | lte: String 419 | 420 | # Customer unique ID 421 | ne: String 422 | 423 | # Customer unique ID 424 | in: [String] 425 | 426 | # Customer unique ID 427 | nin: [String] 428 | } 429 | 430 | input CustomerIDOperatorsFilterFindOneCustomerInput { 431 | # Customer unique ID 432 | gt: String 433 | 434 | # Customer unique ID 435 | gte: String 436 | 437 | # Customer unique ID 438 | lt: String 439 | 440 | # Customer unique ID 441 | lte: String 442 | 443 | # Customer unique ID 444 | ne: String 445 | 446 | # Customer unique ID 447 | in: [String] 448 | 449 | # Customer unique ID 450 | nin: [String] 451 | } 452 | 453 | # List of items with pagination. 454 | type CustomerPagination { 455 | # Total object count. 456 | count: Int 457 | 458 | # Array of objects. 459 | items: [Customer] 460 | 461 | # Information to aid in pagination. 462 | pageInfo: PaginationInfo! 463 | } 464 | 465 | scalar Date 466 | 467 | input DetailsOperatorsFilterFindManyOrderInput { 468 | # List of ordered products 469 | gt: OrderDetailsInput 470 | 471 | # List of ordered products 472 | gte: OrderDetailsInput 473 | 474 | # List of ordered products 475 | lt: OrderDetailsInput 476 | 477 | # List of ordered products 478 | lte: OrderDetailsInput 479 | 480 | # List of ordered products 481 | ne: OrderDetailsInput 482 | 483 | # List of ordered products 484 | in: [OrderDetailsInput] 485 | 486 | # List of ordered products 487 | nin: [OrderDetailsInput] 488 | } 489 | 490 | input DetailsOperatorsFilterFindOneOrderInput { 491 | # List of ordered products 492 | gt: OrderDetailsInput 493 | 494 | # List of ordered products 495 | gte: OrderDetailsInput 496 | 497 | # List of ordered products 498 | lt: OrderDetailsInput 499 | 500 | # List of ordered products 501 | lte: OrderDetailsInput 502 | 503 | # List of ordered products 504 | ne: OrderDetailsInput 505 | 506 | # List of ordered products 507 | in: [OrderDetailsInput] 508 | 509 | # List of ordered products 510 | nin: [OrderDetailsInput] 511 | } 512 | 513 | type Employee implements Node { 514 | # Category unique ID 515 | employeeID: Float 516 | lastName: String 517 | firstName: String 518 | title: String 519 | titleOfCourtesy: String 520 | birthDate: Date 521 | hireDate: Date 522 | address: CustomerAddress 523 | notes: String 524 | 525 | # ID of chief 526 | reportsTo: Float 527 | 528 | # Attached territory ID from region collection 529 | territoryIDs: [Float] 530 | _id: MongoID! 531 | 532 | # The globally unique ID among all types 533 | id: ID! 534 | chief: Employee 535 | subordinates(skip: Int, limit: Int = 1000, sort: SortFindManyEmployeeInput): [Employee] 536 | orderConnection( 537 | # Forward pagination argument for returning at most first edges 538 | first: Int 539 | 540 | # Forward pagination argument for returning at most first edges 541 | after: String 542 | 543 | # Backward pagination argument for returning at most last edges 544 | last: Int 545 | 546 | # Backward pagination argument for returning at most last edges 547 | before: String 548 | 549 | # Sort argument for data ordering 550 | sort: SortConnectionOrderEnum = _ID_DESC 551 | ): OrderConnection 552 | } 553 | 554 | input EmployeeIDOperatorsFilterFindManyEmployeeInput { 555 | # Category unique ID 556 | gt: Float 557 | 558 | # Category unique ID 559 | gte: Float 560 | 561 | # Category unique ID 562 | lt: Float 563 | 564 | # Category unique ID 565 | lte: Float 566 | 567 | # Category unique ID 568 | ne: Float 569 | 570 | # Category unique ID 571 | in: [Float] 572 | 573 | # Category unique ID 574 | nin: [Float] 575 | } 576 | 577 | input EmployeeIDOperatorsFilterFindOneEmployeeInput { 578 | # Category unique ID 579 | gt: Float 580 | 581 | # Category unique ID 582 | gte: Float 583 | 584 | # Category unique ID 585 | lt: Float 586 | 587 | # Category unique ID 588 | lte: Float 589 | 590 | # Category unique ID 591 | ne: Float 592 | 593 | # Category unique ID 594 | in: [Float] 595 | 596 | # Category unique ID 597 | nin: [Float] 598 | } 599 | 600 | # List of items with pagination. 601 | type EmployeePagination { 602 | # Total object count. 603 | count: Int 604 | 605 | # Array of objects. 606 | items: [Employee] 607 | 608 | # Information to aid in pagination. 609 | pageInfo: PaginationInfo! 610 | } 611 | 612 | input FilterFindManyCategoryInput { 613 | # Category unique ID 614 | categoryID: Float 615 | name: String 616 | description: String 617 | _id: MongoID 618 | _ids: [MongoID] 619 | 620 | # List of *indexed* fields that can be filtered via operators. 621 | _operators: OperatorsFilterFindManyCategoryInput 622 | OR: [FilterFindManyCategoryInput!] 623 | AND: [FilterFindManyCategoryInput!] 624 | } 625 | 626 | input FilterFindManyCustomerInput { 627 | # Customer unique ID 628 | customerID: String 629 | companyName: String 630 | contactName: String 631 | contactTitle: String 632 | address: CustomerAddressInput 633 | _id: MongoID 634 | _ids: [MongoID] 635 | 636 | # List of *indexed* fields that can be filtered via operators. 637 | _operators: OperatorsFilterFindManyCustomerInput 638 | OR: [FilterFindManyCustomerInput!] 639 | AND: [FilterFindManyCustomerInput!] 640 | } 641 | 642 | input FilterFindManyEmployeeInput { 643 | # Category unique ID 644 | employeeID: Float 645 | lastName: String 646 | firstName: String 647 | title: String 648 | titleOfCourtesy: String 649 | birthDate: Date 650 | hireDate: Date 651 | address: CustomerAddressInput 652 | notes: String 653 | 654 | # ID of chief 655 | reportsTo: Float 656 | 657 | # Attached territory ID from region collection 658 | territoryIDs: [Float] 659 | _id: MongoID 660 | _ids: [MongoID] 661 | 662 | # List of *indexed* fields that can be filtered via operators. 663 | _operators: OperatorsFilterFindManyEmployeeInput 664 | OR: [FilterFindManyEmployeeInput!] 665 | AND: [FilterFindManyEmployeeInput!] 666 | 667 | # Fulltext search with mongodb stemming and weights 668 | fullTextSearch: String 669 | } 670 | 671 | input FilterFindManyOrderInput { 672 | # Order unique ID 673 | orderID: Float 674 | customerID: String 675 | employeeID: Float 676 | orderDate: Date 677 | requiredDate: Date 678 | shippedDate: Date 679 | shipVia: Float 680 | freight: Float 681 | shipName: String 682 | shipAddress: CustomerAddressInput 683 | 684 | # List of ordered products 685 | details: [OrderDetailsInput] 686 | _id: MongoID 687 | _ids: [MongoID] 688 | 689 | # List of *indexed* fields that can be filtered via operators. 690 | _operators: OperatorsFilterFindManyOrderInput 691 | OR: [FilterFindManyOrderInput!] 692 | AND: [FilterFindManyOrderInput!] 693 | } 694 | 695 | input FilterFindManyProductInput { 696 | # Unique product id 697 | productID: Float 698 | name: String 699 | supplierID: Float 700 | categoryID: Float 701 | quantityPerUnit: String 702 | unitPrice: Float 703 | unitsInStock: Float 704 | unitsOnOrder: Float 705 | reorderLevel: Float 706 | discontinued: Boolean 707 | _id: MongoID 708 | _ids: [MongoID] 709 | 710 | # List of *indexed* fields that can be filtered via operators. 711 | _operators: OperatorsFilterFindManyProductInput 712 | OR: [FilterFindManyProductInput!] 713 | AND: [FilterFindManyProductInput!] 714 | 715 | # Search by regExp 716 | nameRegexp: String 717 | } 718 | 719 | input FilterFindManyRegionInput { 720 | # Region unique ID 721 | regionID: Float 722 | name: String 723 | territories: [RegionTerritoriesInput] 724 | _id: MongoID 725 | _ids: [MongoID] 726 | 727 | # List of *indexed* fields that can be filtered via operators. 728 | _operators: OperatorsFilterFindManyRegionInput 729 | OR: [FilterFindManyRegionInput!] 730 | AND: [FilterFindManyRegionInput!] 731 | } 732 | 733 | input FilterFindManyShipperInput { 734 | # Shipper unique ID 735 | shipperID: Float 736 | companyName: String 737 | phone: String 738 | _id: MongoID 739 | _ids: [MongoID] 740 | 741 | # List of *indexed* fields that can be filtered via operators. 742 | _operators: OperatorsFilterFindManyShipperInput 743 | OR: [FilterFindManyShipperInput!] 744 | AND: [FilterFindManyShipperInput!] 745 | } 746 | 747 | input FilterFindManySupplierInput { 748 | # Supplier unique ID 749 | supplierID: Float 750 | companyName: String 751 | contactName: String 752 | contactTitle: String 753 | address: CustomerAddressInput 754 | _id: MongoID 755 | _ids: [MongoID] 756 | 757 | # List of *indexed* fields that can be filtered via operators. 758 | _operators: OperatorsFilterFindManySupplierInput 759 | OR: [FilterFindManySupplierInput!] 760 | AND: [FilterFindManySupplierInput!] 761 | } 762 | 763 | input FilterFindOneCategoryInput { 764 | # Category unique ID 765 | categoryID: Float 766 | name: String 767 | description: String 768 | _id: MongoID 769 | _ids: [MongoID] 770 | 771 | # List of *indexed* fields that can be filtered via operators. 772 | _operators: OperatorsFilterFindOneCategoryInput 773 | OR: [FilterFindOneCategoryInput!] 774 | AND: [FilterFindOneCategoryInput!] 775 | } 776 | 777 | input FilterFindOneCustomerInput { 778 | # Customer unique ID 779 | customerID: String 780 | companyName: String 781 | contactName: String 782 | contactTitle: String 783 | address: CustomerAddressInput 784 | _id: MongoID 785 | _ids: [MongoID] 786 | 787 | # List of *indexed* fields that can be filtered via operators. 788 | _operators: OperatorsFilterFindOneCustomerInput 789 | OR: [FilterFindOneCustomerInput!] 790 | AND: [FilterFindOneCustomerInput!] 791 | } 792 | 793 | input FilterFindOneEmployeeInput { 794 | # Category unique ID 795 | employeeID: Float 796 | lastName: String 797 | firstName: String 798 | title: String 799 | titleOfCourtesy: String 800 | birthDate: Date 801 | hireDate: Date 802 | address: CustomerAddressInput 803 | notes: String 804 | 805 | # ID of chief 806 | reportsTo: Float 807 | 808 | # Attached territory ID from region collection 809 | territoryIDs: [Float] 810 | _id: MongoID 811 | _ids: [MongoID] 812 | 813 | # List of *indexed* fields that can be filtered via operators. 814 | _operators: OperatorsFilterFindOneEmployeeInput 815 | OR: [FilterFindOneEmployeeInput!] 816 | AND: [FilterFindOneEmployeeInput!] 817 | } 818 | 819 | input FilterFindOneOrderInput { 820 | # Order unique ID 821 | orderID: Float 822 | customerID: String 823 | employeeID: Float 824 | orderDate: Date 825 | requiredDate: Date 826 | shippedDate: Date 827 | shipVia: Float 828 | freight: Float 829 | shipName: String 830 | shipAddress: CustomerAddressInput 831 | 832 | # List of ordered products 833 | details: [OrderDetailsInput] 834 | _id: MongoID 835 | _ids: [MongoID] 836 | 837 | # List of *indexed* fields that can be filtered via operators. 838 | _operators: OperatorsFilterFindOneOrderInput 839 | OR: [FilterFindOneOrderInput!] 840 | AND: [FilterFindOneOrderInput!] 841 | } 842 | 843 | input FilterFindOneProductInput { 844 | # Unique product id 845 | productID: Float 846 | name: String 847 | supplierID: Float 848 | categoryID: Float 849 | quantityPerUnit: String 850 | unitPrice: Float 851 | unitsInStock: Float 852 | unitsOnOrder: Float 853 | reorderLevel: Float 854 | discontinued: Boolean 855 | _id: MongoID 856 | _ids: [MongoID] 857 | 858 | # List of *indexed* fields that can be filtered via operators. 859 | _operators: OperatorsFilterFindOneProductInput 860 | OR: [FilterFindOneProductInput!] 861 | AND: [FilterFindOneProductInput!] 862 | } 863 | 864 | input FilterFindOneRegionInput { 865 | # Region unique ID 866 | regionID: Float 867 | name: String 868 | territories: [RegionTerritoriesInput] 869 | _id: MongoID 870 | _ids: [MongoID] 871 | 872 | # List of *indexed* fields that can be filtered via operators. 873 | _operators: OperatorsFilterFindOneRegionInput 874 | OR: [FilterFindOneRegionInput!] 875 | AND: [FilterFindOneRegionInput!] 876 | } 877 | 878 | input FilterFindOneShipperInput { 879 | # Shipper unique ID 880 | shipperID: Float 881 | companyName: String 882 | phone: String 883 | _id: MongoID 884 | _ids: [MongoID] 885 | 886 | # List of *indexed* fields that can be filtered via operators. 887 | _operators: OperatorsFilterFindOneShipperInput 888 | OR: [FilterFindOneShipperInput!] 889 | AND: [FilterFindOneShipperInput!] 890 | } 891 | 892 | input FilterFindOneSupplierInput { 893 | # Supplier unique ID 894 | supplierID: Float 895 | companyName: String 896 | contactName: String 897 | contactTitle: String 898 | address: CustomerAddressInput 899 | _id: MongoID 900 | _ids: [MongoID] 901 | 902 | # List of *indexed* fields that can be filtered via operators. 903 | _operators: OperatorsFilterFindOneSupplierInput 904 | OR: [FilterFindOneSupplierInput!] 905 | AND: [FilterFindOneSupplierInput!] 906 | } 907 | 908 | input LastNameOperatorsFilterFindManyEmployeeInput { 909 | gt: String 910 | gte: String 911 | lt: String 912 | lte: String 913 | ne: String 914 | in: [String] 915 | nin: [String] 916 | } 917 | 918 | input LastNameOperatorsFilterFindOneEmployeeInput { 919 | gt: String 920 | gte: String 921 | lt: String 922 | lte: String 923 | ne: String 924 | in: [String] 925 | nin: [String] 926 | } 927 | 928 | # The `ID` scalar type represents a unique MongoDB identifier in collection. 929 | # MongoDB by default use 12-byte ObjectId value 930 | # (https://docs.mongodb.com/manual/reference/bson-types/#objectid). But MongoDB 931 | # also may accepts string or integer as correct values for _id field. 932 | scalar MongoID 933 | 934 | type Mutation { 935 | # Create one document with mongoose defaults, setters, hooks and validation 936 | createProduct(input: RelayCreateOneProductInput!): CreateOneProductPayload 937 | 938 | # Update one document: 1) Retrieve one document by findById. 2) Apply updates to 939 | # mongoose document. 3) Mongoose applies defaults, setters, hooks and 940 | # validation. 4) And save it. 941 | updateProduct(input: RelayUpdateByIdProductInput!): UpdateByIdProductPayload 942 | 943 | # Remove one document: 1) Retrieve one document and remove with hooks via findByIdAndRemove. 2) Return removed document. 944 | removeProduct(input: RelayRemoveByIdProductInput!): RemoveByIdProductPayload 945 | 946 | # Create one document with mongoose defaults, setters, hooks and validation 947 | createOrder(input: RelayCreateOneOrderInput!): CreateOneOrderPayload 948 | 949 | # Update one document: 1) Retrieve one document by findById. 2) Apply updates to 950 | # mongoose document. 3) Mongoose applies defaults, setters, hooks and 951 | # validation. 4) And save it. 952 | updateOrder(input: RelayUpdateByIdOrderInput!): UpdateByIdOrderPayload 953 | 954 | # Remove one document: 1) Retrieve one document and remove with hooks via findByIdAndRemove. 2) Return removed document. 955 | removeOrder(input: RelayRemoveByIdOrderInput!): RemoveByIdOrderPayload 956 | 957 | # Update one document: 1) Retrieve one document by findById. 2) Apply updates to 958 | # mongoose document. 3) Mongoose applies defaults, setters, hooks and 959 | # validation. 4) And save it. 960 | updateEmployee(input: RelayUpdateByIdEmployeeInput!): UpdateByIdEmployeePayload 961 | } 962 | 963 | input NameOperatorsFilterFindManyCategoryInput { 964 | gt: String 965 | gte: String 966 | lt: String 967 | lte: String 968 | ne: String 969 | in: [String] 970 | nin: [String] 971 | } 972 | 973 | input NameOperatorsFilterFindManyProductInput { 974 | gt: String 975 | gte: String 976 | lt: String 977 | lte: String 978 | ne: String 979 | in: [String] 980 | nin: [String] 981 | } 982 | 983 | input NameOperatorsFilterFindOneCategoryInput { 984 | gt: String 985 | gte: String 986 | lt: String 987 | lte: String 988 | ne: String 989 | in: [String] 990 | nin: [String] 991 | } 992 | 993 | input NameOperatorsFilterFindOneProductInput { 994 | gt: String 995 | gte: String 996 | lt: String 997 | lte: String 998 | ne: String 999 | in: [String] 1000 | nin: [String] 1001 | } 1002 | 1003 | # An object, that can be fetched by the globally unique ID among all types. 1004 | interface Node { 1005 | # The globally unique ID among all types. 1006 | id: ID! 1007 | } 1008 | 1009 | # For performance reason this type contains only *indexed* fields. 1010 | input OperatorsFilterFindManyCategoryInput { 1011 | categoryID: CategoryIDOperatorsFilterFindManyCategoryInput 1012 | name: NameOperatorsFilterFindManyCategoryInput 1013 | _id: _idOperatorsFilterFindManyCategoryInput 1014 | } 1015 | 1016 | # For performance reason this type contains only *indexed* fields. 1017 | input OperatorsFilterFindManyCustomerInput { 1018 | customerID: CustomerIDOperatorsFilterFindManyCustomerInput 1019 | companyName: CompanyNameOperatorsFilterFindManyCustomerInput 1020 | _id: _idOperatorsFilterFindManyCustomerInput 1021 | } 1022 | 1023 | # For performance reason this type contains only *indexed* fields. 1024 | input OperatorsFilterFindManyEmployeeInput { 1025 | employeeID: EmployeeIDOperatorsFilterFindManyEmployeeInput 1026 | lastName: LastNameOperatorsFilterFindManyEmployeeInput 1027 | territoryIDs: TerritoryIDsOperatorsFilterFindManyEmployeeInput 1028 | _id: _idOperatorsFilterFindManyEmployeeInput 1029 | } 1030 | 1031 | # For performance reason this type contains only *indexed* fields. 1032 | input OperatorsFilterFindManyOrderInput { 1033 | orderID: OrderIDOperatorsFilterFindManyOrderInput 1034 | details: DetailsOperatorsFilterFindManyOrderInput 1035 | _id: _idOperatorsFilterFindManyOrderInput 1036 | } 1037 | 1038 | # For performance reason this type contains only *indexed* fields. 1039 | input OperatorsFilterFindManyProductInput { 1040 | productID: ProductIDOperatorsFilterFindManyProductInput 1041 | name: NameOperatorsFilterFindManyProductInput 1042 | unitPrice: UnitPriceOperatorsFilterFindManyProductInput 1043 | _id: _idOperatorsFilterFindManyProductInput 1044 | } 1045 | 1046 | # For performance reason this type contains only *indexed* fields. 1047 | input OperatorsFilterFindManyRegionInput { 1048 | regionID: RegionIDOperatorsFilterFindManyRegionInput 1049 | _id: _idOperatorsFilterFindManyRegionInput 1050 | } 1051 | 1052 | # For performance reason this type contains only *indexed* fields. 1053 | input OperatorsFilterFindManyShipperInput { 1054 | shipperID: ShipperIDOperatorsFilterFindManyShipperInput 1055 | _id: _idOperatorsFilterFindManyShipperInput 1056 | } 1057 | 1058 | # For performance reason this type contains only *indexed* fields. 1059 | input OperatorsFilterFindManySupplierInput { 1060 | supplierID: SupplierIDOperatorsFilterFindManySupplierInput 1061 | companyName: CompanyNameOperatorsFilterFindManySupplierInput 1062 | _id: _idOperatorsFilterFindManySupplierInput 1063 | } 1064 | 1065 | # For performance reason this type contains only *indexed* fields. 1066 | input OperatorsFilterFindOneCategoryInput { 1067 | categoryID: CategoryIDOperatorsFilterFindOneCategoryInput 1068 | name: NameOperatorsFilterFindOneCategoryInput 1069 | _id: _idOperatorsFilterFindOneCategoryInput 1070 | } 1071 | 1072 | # For performance reason this type contains only *indexed* fields. 1073 | input OperatorsFilterFindOneCustomerInput { 1074 | customerID: CustomerIDOperatorsFilterFindOneCustomerInput 1075 | companyName: CompanyNameOperatorsFilterFindOneCustomerInput 1076 | _id: _idOperatorsFilterFindOneCustomerInput 1077 | } 1078 | 1079 | # For performance reason this type contains only *indexed* fields. 1080 | input OperatorsFilterFindOneEmployeeInput { 1081 | employeeID: EmployeeIDOperatorsFilterFindOneEmployeeInput 1082 | lastName: LastNameOperatorsFilterFindOneEmployeeInput 1083 | territoryIDs: TerritoryIDsOperatorsFilterFindOneEmployeeInput 1084 | _id: _idOperatorsFilterFindOneEmployeeInput 1085 | } 1086 | 1087 | # For performance reason this type contains only *indexed* fields. 1088 | input OperatorsFilterFindOneOrderInput { 1089 | orderID: OrderIDOperatorsFilterFindOneOrderInput 1090 | details: DetailsOperatorsFilterFindOneOrderInput 1091 | _id: _idOperatorsFilterFindOneOrderInput 1092 | } 1093 | 1094 | # For performance reason this type contains only *indexed* fields. 1095 | input OperatorsFilterFindOneProductInput { 1096 | productID: ProductIDOperatorsFilterFindOneProductInput 1097 | name: NameOperatorsFilterFindOneProductInput 1098 | unitPrice: UnitPriceOperatorsFilterFindOneProductInput 1099 | _id: _idOperatorsFilterFindOneProductInput 1100 | } 1101 | 1102 | # For performance reason this type contains only *indexed* fields. 1103 | input OperatorsFilterFindOneRegionInput { 1104 | regionID: RegionIDOperatorsFilterFindOneRegionInput 1105 | _id: _idOperatorsFilterFindOneRegionInput 1106 | } 1107 | 1108 | # For performance reason this type contains only *indexed* fields. 1109 | input OperatorsFilterFindOneShipperInput { 1110 | shipperID: ShipperIDOperatorsFilterFindOneShipperInput 1111 | _id: _idOperatorsFilterFindOneShipperInput 1112 | } 1113 | 1114 | # For performance reason this type contains only *indexed* fields. 1115 | input OperatorsFilterFindOneSupplierInput { 1116 | supplierID: SupplierIDOperatorsFilterFindOneSupplierInput 1117 | companyName: CompanyNameOperatorsFilterFindOneSupplierInput 1118 | _id: _idOperatorsFilterFindOneSupplierInput 1119 | } 1120 | 1121 | type Order implements Node { 1122 | # Order unique ID 1123 | orderID: Float 1124 | customerID: String 1125 | employeeID: Float 1126 | orderDate: Date 1127 | requiredDate: Date 1128 | shippedDate: Date 1129 | shipVia: Float 1130 | freight: Float 1131 | shipName: String 1132 | shipAddress: CustomerAddress 1133 | 1134 | # List of ordered products 1135 | details: [OrderDetails] 1136 | _id: MongoID! 1137 | 1138 | # The globally unique ID among all types 1139 | id: ID! 1140 | customer: Customer 1141 | employee: Employee 1142 | shipper: Shipper 1143 | } 1144 | 1145 | # A connection to a list of items. 1146 | type OrderConnection { 1147 | # Total object count. 1148 | count: Int! 1149 | 1150 | # Information to aid in pagination. 1151 | pageInfo: PageInfo! 1152 | 1153 | # Information to aid in pagination. 1154 | edges: [OrderEdge!]! 1155 | } 1156 | 1157 | type OrderDetails { 1158 | productID: Float 1159 | unitPrice: Float 1160 | quantity: Float 1161 | discount: Float 1162 | product: Product 1163 | } 1164 | 1165 | input OrderDetailsInput { 1166 | productID: Float 1167 | unitPrice: Float 1168 | quantity: Float 1169 | discount: Float 1170 | } 1171 | 1172 | # An edge in a connection. 1173 | type OrderEdge { 1174 | # The item at the end of the edge 1175 | node: Order! 1176 | 1177 | # A cursor for use in pagination 1178 | cursor: String! 1179 | } 1180 | 1181 | input OrderIDOperatorsFilterFindManyOrderInput { 1182 | # Order unique ID 1183 | gt: Float 1184 | 1185 | # Order unique ID 1186 | gte: Float 1187 | 1188 | # Order unique ID 1189 | lt: Float 1190 | 1191 | # Order unique ID 1192 | lte: Float 1193 | 1194 | # Order unique ID 1195 | ne: Float 1196 | 1197 | # Order unique ID 1198 | in: [Float] 1199 | 1200 | # Order unique ID 1201 | nin: [Float] 1202 | } 1203 | 1204 | input OrderIDOperatorsFilterFindOneOrderInput { 1205 | # Order unique ID 1206 | gt: Float 1207 | 1208 | # Order unique ID 1209 | gte: Float 1210 | 1211 | # Order unique ID 1212 | lt: Float 1213 | 1214 | # Order unique ID 1215 | lte: Float 1216 | 1217 | # Order unique ID 1218 | ne: Float 1219 | 1220 | # Order unique ID 1221 | in: [Float] 1222 | 1223 | # Order unique ID 1224 | nin: [Float] 1225 | } 1226 | 1227 | # List of items with pagination. 1228 | type OrderPagination { 1229 | # Total object count. 1230 | count: Int 1231 | 1232 | # Array of objects. 1233 | items: [Order] 1234 | 1235 | # Information to aid in pagination. 1236 | pageInfo: PaginationInfo! 1237 | } 1238 | 1239 | # Information about pagination in a connection. 1240 | type PageInfo { 1241 | # When paginating forwards, are there more items? 1242 | hasNextPage: Boolean! 1243 | 1244 | # When paginating backwards, are there more items? 1245 | hasPreviousPage: Boolean! 1246 | 1247 | # When paginating backwards, the cursor to continue. 1248 | startCursor: String 1249 | 1250 | # When paginating forwards, the cursor to continue. 1251 | endCursor: String 1252 | } 1253 | 1254 | # Information about pagination. 1255 | type PaginationInfo { 1256 | # Current page number 1257 | currentPage: Int! 1258 | 1259 | # Number of items per page 1260 | perPage: Int! 1261 | 1262 | # Total number of pages 1263 | pageCount: Int 1264 | 1265 | # Total number of items 1266 | itemCount: Int 1267 | 1268 | # When paginating forwards, are there more items? 1269 | hasNextPage: Boolean 1270 | 1271 | # When paginating backwards, are there more items? 1272 | hasPreviousPage: Boolean 1273 | } 1274 | 1275 | type Product implements Node { 1276 | # Unique product id 1277 | productID: Float 1278 | name: String 1279 | supplierID: Float 1280 | categoryID: Float 1281 | quantityPerUnit: String 1282 | unitPrice: Float 1283 | unitsInStock: Float 1284 | unitsOnOrder: Float 1285 | reorderLevel: Float 1286 | discontinued: Boolean 1287 | _id: MongoID! 1288 | 1289 | # The globally unique ID among all types 1290 | id: ID! 1291 | orderConnection( 1292 | # Forward pagination argument for returning at most first edges 1293 | first: Int 1294 | 1295 | # Forward pagination argument for returning at most first edges 1296 | after: String 1297 | 1298 | # Backward pagination argument for returning at most last edges 1299 | last: Int 1300 | 1301 | # Backward pagination argument for returning at most last edges 1302 | before: String 1303 | 1304 | # Sort argument for data ordering 1305 | sort: SortConnectionOrderEnum = _ID_DESC 1306 | ): OrderConnection 1307 | orderList(skip: Int, limit: Int = 1000, sort: SortFindManyOrderInput): [Order] 1308 | supplier: Supplier 1309 | category: Category 1310 | } 1311 | 1312 | # A connection to a list of items. 1313 | type ProductConnection { 1314 | # Total object count. 1315 | count: Int! 1316 | 1317 | # Information to aid in pagination. 1318 | pageInfo: PageInfo! 1319 | 1320 | # Information to aid in pagination. 1321 | edges: [ProductEdge!]! 1322 | } 1323 | 1324 | # An edge in a connection. 1325 | type ProductEdge { 1326 | # The item at the end of the edge 1327 | node: Product! 1328 | 1329 | # A cursor for use in pagination 1330 | cursor: String! 1331 | } 1332 | 1333 | input ProductIDOperatorsFilterFindManyProductInput { 1334 | # Unique product id 1335 | gt: Float 1336 | 1337 | # Unique product id 1338 | gte: Float 1339 | 1340 | # Unique product id 1341 | lt: Float 1342 | 1343 | # Unique product id 1344 | lte: Float 1345 | 1346 | # Unique product id 1347 | ne: Float 1348 | 1349 | # Unique product id 1350 | in: [Float] 1351 | 1352 | # Unique product id 1353 | nin: [Float] 1354 | } 1355 | 1356 | input ProductIDOperatorsFilterFindOneProductInput { 1357 | # Unique product id 1358 | gt: Float 1359 | 1360 | # Unique product id 1361 | gte: Float 1362 | 1363 | # Unique product id 1364 | lt: Float 1365 | 1366 | # Unique product id 1367 | lte: Float 1368 | 1369 | # Unique product id 1370 | ne: Float 1371 | 1372 | # Unique product id 1373 | in: [Float] 1374 | 1375 | # Unique product id 1376 | nin: [Float] 1377 | } 1378 | 1379 | # List of items with pagination. 1380 | type ProductPagination { 1381 | # Total object count. 1382 | count: Int 1383 | 1384 | # Array of objects. 1385 | items: [Product] 1386 | 1387 | # Information to aid in pagination. 1388 | pageInfo: PaginationInfo! 1389 | } 1390 | 1391 | type Query { 1392 | # Fetches an object that has globally unique ID among all types 1393 | node( 1394 | # The globally unique ID among all types 1395 | id: ID! 1396 | ): Node 1397 | 1398 | # Data under client context 1399 | viewer: Viewer 1400 | } 1401 | 1402 | type Region implements Node { 1403 | # Region unique ID 1404 | regionID: Float 1405 | name: String 1406 | territories: [RegionTerritories] 1407 | _id: MongoID! 1408 | 1409 | # The globally unique ID among all types 1410 | id: ID! 1411 | employees(skip: Int, limit: Int = 1000, sort: SortFindManyEmployeeInput): [Employee] 1412 | } 1413 | 1414 | input RegionIDOperatorsFilterFindManyRegionInput { 1415 | # Region unique ID 1416 | gt: Float 1417 | 1418 | # Region unique ID 1419 | gte: Float 1420 | 1421 | # Region unique ID 1422 | lt: Float 1423 | 1424 | # Region unique ID 1425 | lte: Float 1426 | 1427 | # Region unique ID 1428 | ne: Float 1429 | 1430 | # Region unique ID 1431 | in: [Float] 1432 | 1433 | # Region unique ID 1434 | nin: [Float] 1435 | } 1436 | 1437 | input RegionIDOperatorsFilterFindOneRegionInput { 1438 | # Region unique ID 1439 | gt: Float 1440 | 1441 | # Region unique ID 1442 | gte: Float 1443 | 1444 | # Region unique ID 1445 | lt: Float 1446 | 1447 | # Region unique ID 1448 | lte: Float 1449 | 1450 | # Region unique ID 1451 | ne: Float 1452 | 1453 | # Region unique ID 1454 | in: [Float] 1455 | 1456 | # Region unique ID 1457 | nin: [Float] 1458 | } 1459 | 1460 | type RegionTerritories { 1461 | territoryID: Float 1462 | name: String 1463 | } 1464 | 1465 | input RegionTerritoriesInput { 1466 | territoryID: Float 1467 | name: String 1468 | } 1469 | 1470 | input RelayCreateOneOrderInput { 1471 | record: CreateOneOrderInput! 1472 | 1473 | # The client mutation ID used by clients like Relay to track the mutation. If 1474 | # given, returned in the response payload of the mutation. 1475 | clientMutationId: String 1476 | } 1477 | 1478 | input RelayCreateOneProductInput { 1479 | record: CreateOneProductInput! 1480 | 1481 | # The client mutation ID used by clients like Relay to track the mutation. If 1482 | # given, returned in the response payload of the mutation. 1483 | clientMutationId: String 1484 | } 1485 | 1486 | input RelayRemoveByIdOrderInput { 1487 | _id: MongoID! 1488 | 1489 | # The client mutation ID used by clients like Relay to track the mutation. If 1490 | # given, returned in the response payload of the mutation. 1491 | clientMutationId: String 1492 | } 1493 | 1494 | input RelayRemoveByIdProductInput { 1495 | _id: MongoID! 1496 | 1497 | # The client mutation ID used by clients like Relay to track the mutation. If 1498 | # given, returned in the response payload of the mutation. 1499 | clientMutationId: String 1500 | } 1501 | 1502 | input RelayUpdateByIdEmployeeInput { 1503 | record: UpdateByIdEmployeeInput! 1504 | 1505 | # The client mutation ID used by clients like Relay to track the mutation. If 1506 | # given, returned in the response payload of the mutation. 1507 | clientMutationId: String 1508 | } 1509 | 1510 | input RelayUpdateByIdOrderInput { 1511 | record: UpdateByIdOrderInput! 1512 | 1513 | # The client mutation ID used by clients like Relay to track the mutation. If 1514 | # given, returned in the response payload of the mutation. 1515 | clientMutationId: String 1516 | } 1517 | 1518 | input RelayUpdateByIdProductInput { 1519 | record: UpdateByIdProductInput! 1520 | 1521 | # The client mutation ID used by clients like Relay to track the mutation. If 1522 | # given, returned in the response payload of the mutation. 1523 | clientMutationId: String 1524 | } 1525 | 1526 | type RemoveByIdOrderPayload { 1527 | # Removed document ID 1528 | recordId: MongoID 1529 | 1530 | # Removed document 1531 | record: Order 1532 | 1533 | # The globally unique ID among all types 1534 | nodeId: ID 1535 | 1536 | # The client mutation ID used by clients like Relay to track the mutation. If 1537 | # given, returned in the response payload of the mutation. 1538 | clientMutationId: String 1539 | query: Query 1540 | } 1541 | 1542 | type RemoveByIdProductPayload { 1543 | # Removed document ID 1544 | recordId: MongoID 1545 | 1546 | # Removed document 1547 | record: Product 1548 | 1549 | # The globally unique ID among all types 1550 | nodeId: ID 1551 | 1552 | # The client mutation ID used by clients like Relay to track the mutation. If 1553 | # given, returned in the response payload of the mutation. 1554 | clientMutationId: String 1555 | query: Query 1556 | } 1557 | 1558 | type Shipper implements Node { 1559 | # Shipper unique ID 1560 | shipperID: Float 1561 | companyName: String 1562 | phone: String 1563 | _id: MongoID! 1564 | 1565 | # The globally unique ID among all types 1566 | id: ID! 1567 | orderConnection( 1568 | # Forward pagination argument for returning at most first edges 1569 | first: Int 1570 | 1571 | # Forward pagination argument for returning at most first edges 1572 | after: String 1573 | 1574 | # Backward pagination argument for returning at most last edges 1575 | last: Int 1576 | 1577 | # Backward pagination argument for returning at most last edges 1578 | before: String 1579 | 1580 | # Sort argument for data ordering 1581 | sort: SortConnectionOrderEnum = _ID_DESC 1582 | ): OrderConnection 1583 | } 1584 | 1585 | input ShipperIDOperatorsFilterFindManyShipperInput { 1586 | # Shipper unique ID 1587 | gt: Float 1588 | 1589 | # Shipper unique ID 1590 | gte: Float 1591 | 1592 | # Shipper unique ID 1593 | lt: Float 1594 | 1595 | # Shipper unique ID 1596 | lte: Float 1597 | 1598 | # Shipper unique ID 1599 | ne: Float 1600 | 1601 | # Shipper unique ID 1602 | in: [Float] 1603 | 1604 | # Shipper unique ID 1605 | nin: [Float] 1606 | } 1607 | 1608 | input ShipperIDOperatorsFilterFindOneShipperInput { 1609 | # Shipper unique ID 1610 | gt: Float 1611 | 1612 | # Shipper unique ID 1613 | gte: Float 1614 | 1615 | # Shipper unique ID 1616 | lt: Float 1617 | 1618 | # Shipper unique ID 1619 | lte: Float 1620 | 1621 | # Shipper unique ID 1622 | ne: Float 1623 | 1624 | # Shipper unique ID 1625 | in: [Float] 1626 | 1627 | # Shipper unique ID 1628 | nin: [Float] 1629 | } 1630 | 1631 | enum SortConnectionCustomerEnum { 1632 | _ID_DESC 1633 | _ID_ASC 1634 | CUSTOMERID_DESC 1635 | CUSTOMERID_ASC 1636 | COMPANYNAME_DESC 1637 | COMPANYNAME_ASC 1638 | } 1639 | 1640 | enum SortConnectionOrderEnum { 1641 | _ID_DESC 1642 | _ID_ASC 1643 | ORDERID_DESC 1644 | ORDERID_ASC 1645 | } 1646 | 1647 | enum SortConnectionProductEnum { 1648 | _ID_DESC 1649 | _ID_ASC 1650 | PRODUCTID_DESC 1651 | PRODUCTID_ASC 1652 | NAME__SUPPLIERID_DESC 1653 | NAME__SUPPLIERID_ASC 1654 | } 1655 | 1656 | enum SortConnectionSupplierEnum { 1657 | _ID_DESC 1658 | _ID_ASC 1659 | SUPPLIERID_DESC 1660 | SUPPLIERID_ASC 1661 | COMPANYNAME_DESC 1662 | COMPANYNAME_ASC 1663 | } 1664 | 1665 | enum SortFindManyCategoryInput { 1666 | _ID_ASC 1667 | _ID_DESC 1668 | CATEGORYID_ASC 1669 | CATEGORYID_DESC 1670 | NAME_ASC 1671 | NAME_DESC 1672 | } 1673 | 1674 | enum SortFindManyCustomerInput { 1675 | _ID_ASC 1676 | _ID_DESC 1677 | CUSTOMERID_ASC 1678 | CUSTOMERID_DESC 1679 | COMPANYNAME_ASC 1680 | COMPANYNAME_DESC 1681 | } 1682 | 1683 | enum SortFindManyEmployeeInput { 1684 | _ID_ASC 1685 | _ID_DESC 1686 | EMPLOYEEID_ASC 1687 | EMPLOYEEID_DESC 1688 | TERRITORYIDS_ASC 1689 | TERRITORYIDS_DESC 1690 | LASTNAME_ASC 1691 | LASTNAME_DESC 1692 | LASTNAME__FIRSTNAME_ASC 1693 | LASTNAME__FIRSTNAME_DESC 1694 | } 1695 | 1696 | enum SortFindManyOrderInput { 1697 | _ID_ASC 1698 | _ID_DESC 1699 | ORDERID_ASC 1700 | ORDERID_DESC 1701 | DETAILS_ASC 1702 | DETAILS_DESC 1703 | } 1704 | 1705 | enum SortFindManyProductInput { 1706 | _ID_ASC 1707 | _ID_DESC 1708 | PRODUCTID_ASC 1709 | PRODUCTID_DESC 1710 | UNITPRICE_ASC 1711 | UNITPRICE_DESC 1712 | NAME_ASC 1713 | NAME_DESC 1714 | NAME__SUPPLIERID_ASC 1715 | NAME__SUPPLIERID_DESC 1716 | } 1717 | 1718 | enum SortFindManyRegionInput { 1719 | _ID_ASC 1720 | _ID_DESC 1721 | REGIONID_ASC 1722 | REGIONID_DESC 1723 | } 1724 | 1725 | enum SortFindManyShipperInput { 1726 | _ID_ASC 1727 | _ID_DESC 1728 | SHIPPERID_ASC 1729 | SHIPPERID_DESC 1730 | } 1731 | 1732 | enum SortFindOneCategoryInput { 1733 | _ID_ASC 1734 | _ID_DESC 1735 | CATEGORYID_ASC 1736 | CATEGORYID_DESC 1737 | NAME_ASC 1738 | NAME_DESC 1739 | } 1740 | 1741 | enum SortFindOneCustomerInput { 1742 | _ID_ASC 1743 | _ID_DESC 1744 | CUSTOMERID_ASC 1745 | CUSTOMERID_DESC 1746 | COMPANYNAME_ASC 1747 | COMPANYNAME_DESC 1748 | } 1749 | 1750 | enum SortFindOneEmployeeInput { 1751 | _ID_ASC 1752 | _ID_DESC 1753 | EMPLOYEEID_ASC 1754 | EMPLOYEEID_DESC 1755 | TERRITORYIDS_ASC 1756 | TERRITORYIDS_DESC 1757 | LASTNAME_ASC 1758 | LASTNAME_DESC 1759 | LASTNAME__FIRSTNAME_ASC 1760 | LASTNAME__FIRSTNAME_DESC 1761 | } 1762 | 1763 | enum SortFindOneOrderInput { 1764 | _ID_ASC 1765 | _ID_DESC 1766 | ORDERID_ASC 1767 | ORDERID_DESC 1768 | DETAILS_ASC 1769 | DETAILS_DESC 1770 | } 1771 | 1772 | enum SortFindOneProductInput { 1773 | _ID_ASC 1774 | _ID_DESC 1775 | PRODUCTID_ASC 1776 | PRODUCTID_DESC 1777 | UNITPRICE_ASC 1778 | UNITPRICE_DESC 1779 | NAME_ASC 1780 | NAME_DESC 1781 | NAME__SUPPLIERID_ASC 1782 | NAME__SUPPLIERID_DESC 1783 | } 1784 | 1785 | enum SortFindOneRegionInput { 1786 | _ID_ASC 1787 | _ID_DESC 1788 | REGIONID_ASC 1789 | REGIONID_DESC 1790 | } 1791 | 1792 | enum SortFindOneShipperInput { 1793 | _ID_ASC 1794 | _ID_DESC 1795 | SHIPPERID_ASC 1796 | SHIPPERID_DESC 1797 | } 1798 | 1799 | enum SortFindOneSupplierInput { 1800 | _ID_ASC 1801 | _ID_DESC 1802 | SUPPLIERID_ASC 1803 | SUPPLIERID_DESC 1804 | COMPANYNAME_ASC 1805 | COMPANYNAME_DESC 1806 | } 1807 | 1808 | type Supplier implements Node { 1809 | # Supplier unique ID 1810 | supplierID: Float 1811 | companyName: String 1812 | contactName: String 1813 | contactTitle: String 1814 | address: CustomerAddress 1815 | _id: MongoID! 1816 | 1817 | # The globally unique ID among all types 1818 | id: ID! 1819 | productConnection( 1820 | # Forward pagination argument for returning at most first edges 1821 | first: Int 1822 | 1823 | # Forward pagination argument for returning at most first edges 1824 | after: String 1825 | 1826 | # Backward pagination argument for returning at most last edges 1827 | last: Int 1828 | 1829 | # Backward pagination argument for returning at most last edges 1830 | before: String 1831 | 1832 | # Sort argument for data ordering 1833 | sort: SortConnectionProductEnum = _ID_DESC 1834 | ): ProductConnection 1835 | } 1836 | 1837 | # A connection to a list of items. 1838 | type SupplierConnection { 1839 | # Total object count. 1840 | count: Int! 1841 | 1842 | # Information to aid in pagination. 1843 | pageInfo: PageInfo! 1844 | 1845 | # Information to aid in pagination. 1846 | edges: [SupplierEdge!]! 1847 | } 1848 | 1849 | # An edge in a connection. 1850 | type SupplierEdge { 1851 | # The item at the end of the edge 1852 | node: Supplier! 1853 | 1854 | # A cursor for use in pagination 1855 | cursor: String! 1856 | } 1857 | 1858 | input SupplierIDOperatorsFilterFindManySupplierInput { 1859 | # Supplier unique ID 1860 | gt: Float 1861 | 1862 | # Supplier unique ID 1863 | gte: Float 1864 | 1865 | # Supplier unique ID 1866 | lt: Float 1867 | 1868 | # Supplier unique ID 1869 | lte: Float 1870 | 1871 | # Supplier unique ID 1872 | ne: Float 1873 | 1874 | # Supplier unique ID 1875 | in: [Float] 1876 | 1877 | # Supplier unique ID 1878 | nin: [Float] 1879 | } 1880 | 1881 | input SupplierIDOperatorsFilterFindOneSupplierInput { 1882 | # Supplier unique ID 1883 | gt: Float 1884 | 1885 | # Supplier unique ID 1886 | gte: Float 1887 | 1888 | # Supplier unique ID 1889 | lt: Float 1890 | 1891 | # Supplier unique ID 1892 | lte: Float 1893 | 1894 | # Supplier unique ID 1895 | ne: Float 1896 | 1897 | # Supplier unique ID 1898 | in: [Float] 1899 | 1900 | # Supplier unique ID 1901 | nin: [Float] 1902 | } 1903 | 1904 | input TerritoryIDsOperatorsFilterFindManyEmployeeInput { 1905 | # Attached territory ID from region collection 1906 | gt: Float 1907 | 1908 | # Attached territory ID from region collection 1909 | gte: Float 1910 | 1911 | # Attached territory ID from region collection 1912 | lt: Float 1913 | 1914 | # Attached territory ID from region collection 1915 | lte: Float 1916 | 1917 | # Attached territory ID from region collection 1918 | ne: Float 1919 | 1920 | # Attached territory ID from region collection 1921 | in: [Float] 1922 | 1923 | # Attached territory ID from region collection 1924 | nin: [Float] 1925 | } 1926 | 1927 | input TerritoryIDsOperatorsFilterFindOneEmployeeInput { 1928 | # Attached territory ID from region collection 1929 | gt: Float 1930 | 1931 | # Attached territory ID from region collection 1932 | gte: Float 1933 | 1934 | # Attached territory ID from region collection 1935 | lt: Float 1936 | 1937 | # Attached territory ID from region collection 1938 | lte: Float 1939 | 1940 | # Attached territory ID from region collection 1941 | ne: Float 1942 | 1943 | # Attached territory ID from region collection 1944 | in: [Float] 1945 | 1946 | # Attached territory ID from region collection 1947 | nin: [Float] 1948 | } 1949 | 1950 | input UnitPriceOperatorsFilterFindManyProductInput { 1951 | gt: Float 1952 | gte: Float 1953 | lt: Float 1954 | lte: Float 1955 | ne: Float 1956 | in: [Float] 1957 | nin: [Float] 1958 | } 1959 | 1960 | input UnitPriceOperatorsFilterFindOneProductInput { 1961 | gt: Float 1962 | gte: Float 1963 | lt: Float 1964 | lte: Float 1965 | ne: Float 1966 | in: [Float] 1967 | nin: [Float] 1968 | } 1969 | 1970 | input UpdateByIdEmployeeInput { 1971 | # Category unique ID 1972 | employeeID: Float 1973 | lastName: String 1974 | firstName: String 1975 | title: String 1976 | titleOfCourtesy: String 1977 | birthDate: Date 1978 | hireDate: Date 1979 | address: CustomerAddressInput 1980 | notes: String 1981 | 1982 | # ID of chief 1983 | reportsTo: Float 1984 | 1985 | # Attached territory ID from region collection 1986 | territoryIDs: [Float] 1987 | _id: MongoID! 1988 | } 1989 | 1990 | type UpdateByIdEmployeePayload { 1991 | # Updated document ID 1992 | recordId: MongoID 1993 | 1994 | # Updated document 1995 | record: Employee 1996 | 1997 | # The globally unique ID among all types 1998 | nodeId: ID 1999 | 2000 | # The client mutation ID used by clients like Relay to track the mutation. If 2001 | # given, returned in the response payload of the mutation. 2002 | clientMutationId: String 2003 | query: Query 2004 | } 2005 | 2006 | input UpdateByIdOrderInput { 2007 | # Order unique ID 2008 | orderID: Float 2009 | customerID: String 2010 | employeeID: Float 2011 | orderDate: Date 2012 | requiredDate: Date 2013 | shippedDate: Date 2014 | shipVia: Float 2015 | freight: Float 2016 | shipName: String 2017 | shipAddress: CustomerAddressInput 2018 | 2019 | # List of ordered products 2020 | details: [OrderDetailsInput] 2021 | _id: MongoID! 2022 | } 2023 | 2024 | type UpdateByIdOrderPayload { 2025 | # Updated document ID 2026 | recordId: MongoID 2027 | 2028 | # Updated document 2029 | record: Order 2030 | 2031 | # The globally unique ID among all types 2032 | nodeId: ID 2033 | 2034 | # The client mutation ID used by clients like Relay to track the mutation. If 2035 | # given, returned in the response payload of the mutation. 2036 | clientMutationId: String 2037 | query: Query 2038 | } 2039 | 2040 | input UpdateByIdProductInput { 2041 | # Unique product id 2042 | productID: Float 2043 | name: String 2044 | supplierID: Float 2045 | categoryID: Float 2046 | quantityPerUnit: String 2047 | unitPrice: Float 2048 | unitsInStock: Float 2049 | unitsOnOrder: Float 2050 | reorderLevel: Float 2051 | discontinued: Boolean 2052 | _id: MongoID! 2053 | } 2054 | 2055 | type UpdateByIdProductPayload { 2056 | # Updated document ID 2057 | recordId: MongoID 2058 | 2059 | # Updated document 2060 | record: Product 2061 | 2062 | # The globally unique ID among all types 2063 | nodeId: ID 2064 | 2065 | # The client mutation ID used by clients like Relay to track the mutation. If 2066 | # given, returned in the response payload of the mutation. 2067 | clientMutationId: String 2068 | query: Query 2069 | } 2070 | 2071 | type Viewer { 2072 | category( 2073 | # Filter by fields 2074 | filter: FilterFindOneCategoryInput 2075 | skip: Int 2076 | sort: SortFindOneCategoryInput 2077 | ): Category 2078 | categoryList( 2079 | # Filter by fields 2080 | filter: FilterFindManyCategoryInput 2081 | skip: Int 2082 | limit: Int = 1000 2083 | sort: SortFindManyCategoryInput 2084 | ): [Category] 2085 | customer( 2086 | # Filter by fields 2087 | filter: FilterFindOneCustomerInput 2088 | skip: Int 2089 | sort: SortFindOneCustomerInput 2090 | ): Customer 2091 | customerPagination( 2092 | # Page number for displaying 2093 | page: Int 2094 | perPage: Int = 20 2095 | 2096 | # Filter by fields 2097 | filter: FilterFindManyCustomerInput 2098 | sort: SortFindManyCustomerInput 2099 | ): CustomerPagination 2100 | customerConnection( 2101 | # Forward pagination argument for returning at most first edges 2102 | first: Int 2103 | 2104 | # Forward pagination argument for returning at most first edges 2105 | after: String 2106 | 2107 | # Backward pagination argument for returning at most last edges 2108 | last: Int 2109 | 2110 | # Backward pagination argument for returning at most last edges 2111 | before: String 2112 | 2113 | # Filter by fields 2114 | filter: FilterFindManyCustomerInput 2115 | 2116 | # Sort argument for data ordering 2117 | sort: SortConnectionCustomerEnum = _ID_DESC 2118 | ): CustomerConnection 2119 | employee( 2120 | # Filter by fields 2121 | filter: FilterFindOneEmployeeInput 2122 | skip: Int 2123 | sort: SortFindOneEmployeeInput 2124 | ): Employee 2125 | employeeList( 2126 | # Filter by fields 2127 | filter: FilterFindManyEmployeeInput 2128 | skip: Int 2129 | limit: Int = 1000 2130 | sort: SortFindManyEmployeeInput 2131 | ): [Employee] 2132 | employeePagination( 2133 | # Page number for displaying 2134 | page: Int 2135 | perPage: Int = 20 2136 | 2137 | # Filter by fields 2138 | filter: FilterFindManyEmployeeInput 2139 | sort: SortFindManyEmployeeInput 2140 | ): EmployeePagination 2141 | order( 2142 | # Filter by fields 2143 | filter: FilterFindOneOrderInput 2144 | skip: Int 2145 | sort: SortFindOneOrderInput 2146 | ): Order 2147 | orderPagination( 2148 | # Page number for displaying 2149 | page: Int 2150 | perPage: Int = 20 2151 | 2152 | # Filter by fields 2153 | filter: FilterFindManyOrderInput 2154 | sort: SortFindManyOrderInput 2155 | ): OrderPagination 2156 | orderConnection( 2157 | # Forward pagination argument for returning at most first edges 2158 | first: Int 2159 | 2160 | # Forward pagination argument for returning at most first edges 2161 | after: String 2162 | 2163 | # Backward pagination argument for returning at most last edges 2164 | last: Int 2165 | 2166 | # Backward pagination argument for returning at most last edges 2167 | before: String 2168 | 2169 | # Filter by fields 2170 | filter: FilterFindManyOrderInput 2171 | 2172 | # Sort argument for data ordering 2173 | sort: SortConnectionOrderEnum = _ID_DESC 2174 | ): OrderConnection 2175 | product( 2176 | # Filter by fields 2177 | filter: FilterFindOneProductInput 2178 | skip: Int 2179 | sort: SortFindOneProductInput 2180 | ): Product 2181 | productList( 2182 | # Filter by fields 2183 | filter: FilterFindManyProductInput 2184 | skip: Int 2185 | limit: Int = 1000 2186 | sort: SortFindManyProductInput 2187 | ): [Product] 2188 | productPagination( 2189 | # Page number for displaying 2190 | page: Int 2191 | perPage: Int = 20 2192 | 2193 | # Filter by fields 2194 | filter: FilterFindManyProductInput 2195 | sort: SortFindManyProductInput 2196 | ): ProductPagination 2197 | productConnection( 2198 | # Forward pagination argument for returning at most first edges 2199 | first: Int 2200 | 2201 | # Forward pagination argument for returning at most first edges 2202 | after: String 2203 | 2204 | # Backward pagination argument for returning at most last edges 2205 | last: Int 2206 | 2207 | # Backward pagination argument for returning at most last edges 2208 | before: String 2209 | 2210 | # Filter by fields 2211 | filter: FilterFindManyProductInput 2212 | 2213 | # Sort argument for data ordering 2214 | sort: SortConnectionProductEnum = _ID_DESC 2215 | ): ProductConnection 2216 | region( 2217 | # Filter by fields 2218 | filter: FilterFindOneRegionInput 2219 | skip: Int 2220 | sort: SortFindOneRegionInput 2221 | ): Region 2222 | regionList( 2223 | # Filter by fields 2224 | filter: FilterFindManyRegionInput 2225 | skip: Int 2226 | limit: Int = 1000 2227 | sort: SortFindManyRegionInput 2228 | ): [Region] 2229 | shipper( 2230 | # Filter by fields 2231 | filter: FilterFindOneShipperInput 2232 | skip: Int 2233 | sort: SortFindOneShipperInput 2234 | ): Shipper 2235 | shipperList( 2236 | # Filter by fields 2237 | filter: FilterFindManyShipperInput 2238 | skip: Int 2239 | limit: Int = 1000 2240 | sort: SortFindManyShipperInput 2241 | ): [Shipper] 2242 | supplier( 2243 | # Filter by fields 2244 | filter: FilterFindOneSupplierInput 2245 | skip: Int 2246 | sort: SortFindOneSupplierInput 2247 | ): Supplier 2248 | supplierConnection( 2249 | # Forward pagination argument for returning at most first edges 2250 | first: Int 2251 | 2252 | # Forward pagination argument for returning at most first edges 2253 | after: String 2254 | 2255 | # Backward pagination argument for returning at most last edges 2256 | last: Int 2257 | 2258 | # Backward pagination argument for returning at most last edges 2259 | before: String 2260 | 2261 | # Filter by fields 2262 | filter: FilterFindManySupplierInput 2263 | 2264 | # Sort argument for data ordering 2265 | sort: SortConnectionSupplierEnum = _ID_DESC 2266 | ): SupplierConnection 2267 | } 2268 | -------------------------------------------------------------------------------- /src/__generated__/types.ts: -------------------------------------------------------------------------------- 1 | export type Maybe = T | null; 2 | /** All built-in and custom scalars, mapped to their actual values */ 3 | export type Scalars = { 4 | ID: string, 5 | String: string, 6 | Boolean: boolean, 7 | Int: number, 8 | Float: number, 9 | /** 10 | * The `ID` scalar type represents a unique MongoDB identifier in collection. 11 | * MongoDB by default use 12-byte ObjectId value 12 | * (https://docs.mongodb.com/manual/reference/bson-types/#objectid). But MongoDB 13 | * also may accepts string or integer as correct values for _id field. 14 | */ 15 | MongoID: any, 16 | Date: any, 17 | }; 18 | 19 | export type _IdOperatorsFilterFindManyCategoryInput = { 20 | gt?: Maybe, 21 | gte?: Maybe, 22 | lt?: Maybe, 23 | lte?: Maybe, 24 | ne?: Maybe, 25 | in?: Maybe>>, 26 | nin?: Maybe>>, 27 | }; 28 | 29 | export type _IdOperatorsFilterFindManyCustomerInput = { 30 | gt?: Maybe, 31 | gte?: Maybe, 32 | lt?: Maybe, 33 | lte?: Maybe, 34 | ne?: Maybe, 35 | in?: Maybe>>, 36 | nin?: Maybe>>, 37 | }; 38 | 39 | export type _IdOperatorsFilterFindManyEmployeeInput = { 40 | gt?: Maybe, 41 | gte?: Maybe, 42 | lt?: Maybe, 43 | lte?: Maybe, 44 | ne?: Maybe, 45 | in?: Maybe>>, 46 | nin?: Maybe>>, 47 | }; 48 | 49 | export type _IdOperatorsFilterFindManyOrderInput = { 50 | gt?: Maybe, 51 | gte?: Maybe, 52 | lt?: Maybe, 53 | lte?: Maybe, 54 | ne?: Maybe, 55 | in?: Maybe>>, 56 | nin?: Maybe>>, 57 | }; 58 | 59 | export type _IdOperatorsFilterFindManyProductInput = { 60 | gt?: Maybe, 61 | gte?: Maybe, 62 | lt?: Maybe, 63 | lte?: Maybe, 64 | ne?: Maybe, 65 | in?: Maybe>>, 66 | nin?: Maybe>>, 67 | }; 68 | 69 | export type _IdOperatorsFilterFindManyRegionInput = { 70 | gt?: Maybe, 71 | gte?: Maybe, 72 | lt?: Maybe, 73 | lte?: Maybe, 74 | ne?: Maybe, 75 | in?: Maybe>>, 76 | nin?: Maybe>>, 77 | }; 78 | 79 | export type _IdOperatorsFilterFindManyShipperInput = { 80 | gt?: Maybe, 81 | gte?: Maybe, 82 | lt?: Maybe, 83 | lte?: Maybe, 84 | ne?: Maybe, 85 | in?: Maybe>>, 86 | nin?: Maybe>>, 87 | }; 88 | 89 | export type _IdOperatorsFilterFindManySupplierInput = { 90 | gt?: Maybe, 91 | gte?: Maybe, 92 | lt?: Maybe, 93 | lte?: Maybe, 94 | ne?: Maybe, 95 | in?: Maybe>>, 96 | nin?: Maybe>>, 97 | }; 98 | 99 | export type _IdOperatorsFilterFindOneCategoryInput = { 100 | gt?: Maybe, 101 | gte?: Maybe, 102 | lt?: Maybe, 103 | lte?: Maybe, 104 | ne?: Maybe, 105 | in?: Maybe>>, 106 | nin?: Maybe>>, 107 | }; 108 | 109 | export type _IdOperatorsFilterFindOneCustomerInput = { 110 | gt?: Maybe, 111 | gte?: Maybe, 112 | lt?: Maybe, 113 | lte?: Maybe, 114 | ne?: Maybe, 115 | in?: Maybe>>, 116 | nin?: Maybe>>, 117 | }; 118 | 119 | export type _IdOperatorsFilterFindOneEmployeeInput = { 120 | gt?: Maybe, 121 | gte?: Maybe, 122 | lt?: Maybe, 123 | lte?: Maybe, 124 | ne?: Maybe, 125 | in?: Maybe>>, 126 | nin?: Maybe>>, 127 | }; 128 | 129 | export type _IdOperatorsFilterFindOneOrderInput = { 130 | gt?: Maybe, 131 | gte?: Maybe, 132 | lt?: Maybe, 133 | lte?: Maybe, 134 | ne?: Maybe, 135 | in?: Maybe>>, 136 | nin?: Maybe>>, 137 | }; 138 | 139 | export type _IdOperatorsFilterFindOneProductInput = { 140 | gt?: Maybe, 141 | gte?: Maybe, 142 | lt?: Maybe, 143 | lte?: Maybe, 144 | ne?: Maybe, 145 | in?: Maybe>>, 146 | nin?: Maybe>>, 147 | }; 148 | 149 | export type _IdOperatorsFilterFindOneRegionInput = { 150 | gt?: Maybe, 151 | gte?: Maybe, 152 | lt?: Maybe, 153 | lte?: Maybe, 154 | ne?: Maybe, 155 | in?: Maybe>>, 156 | nin?: Maybe>>, 157 | }; 158 | 159 | export type _IdOperatorsFilterFindOneShipperInput = { 160 | gt?: Maybe, 161 | gte?: Maybe, 162 | lt?: Maybe, 163 | lte?: Maybe, 164 | ne?: Maybe, 165 | in?: Maybe>>, 166 | nin?: Maybe>>, 167 | }; 168 | 169 | export type _IdOperatorsFilterFindOneSupplierInput = { 170 | gt?: Maybe, 171 | gte?: Maybe, 172 | lt?: Maybe, 173 | lte?: Maybe, 174 | ne?: Maybe, 175 | in?: Maybe>>, 176 | nin?: Maybe>>, 177 | }; 178 | 179 | export type Category = Node & { 180 | __typename?: 'Category', 181 | /** Category unique ID */ 182 | categoryID?: Maybe, 183 | name?: Maybe, 184 | description?: Maybe, 185 | _id: Scalars['MongoID'], 186 | /** The globally unique ID among all types */ 187 | id: Scalars['ID'], 188 | productConnection?: Maybe, 189 | productList?: Maybe>>, 190 | }; 191 | 192 | 193 | export type CategoryProductConnectionArgs = { 194 | first?: Maybe, 195 | after?: Maybe, 196 | last?: Maybe, 197 | before?: Maybe, 198 | sort?: Maybe 199 | }; 200 | 201 | 202 | export type CategoryProductListArgs = { 203 | skip?: Maybe, 204 | limit?: Maybe, 205 | sort?: Maybe 206 | }; 207 | 208 | export type CategoryIdOperatorsFilterFindManyCategoryInput = { 209 | /** Category unique ID */ 210 | gt?: Maybe, 211 | /** Category unique ID */ 212 | gte?: Maybe, 213 | /** Category unique ID */ 214 | lt?: Maybe, 215 | /** Category unique ID */ 216 | lte?: Maybe, 217 | /** Category unique ID */ 218 | ne?: Maybe, 219 | /** Category unique ID */ 220 | in?: Maybe>>, 221 | /** Category unique ID */ 222 | nin?: Maybe>>, 223 | }; 224 | 225 | export type CategoryIdOperatorsFilterFindOneCategoryInput = { 226 | /** Category unique ID */ 227 | gt?: Maybe, 228 | /** Category unique ID */ 229 | gte?: Maybe, 230 | /** Category unique ID */ 231 | lt?: Maybe, 232 | /** Category unique ID */ 233 | lte?: Maybe, 234 | /** Category unique ID */ 235 | ne?: Maybe, 236 | /** Category unique ID */ 237 | in?: Maybe>>, 238 | /** Category unique ID */ 239 | nin?: Maybe>>, 240 | }; 241 | 242 | export type CompanyNameOperatorsFilterFindManyCustomerInput = { 243 | gt?: Maybe, 244 | gte?: Maybe, 245 | lt?: Maybe, 246 | lte?: Maybe, 247 | ne?: Maybe, 248 | in?: Maybe>>, 249 | nin?: Maybe>>, 250 | }; 251 | 252 | export type CompanyNameOperatorsFilterFindManySupplierInput = { 253 | gt?: Maybe, 254 | gte?: Maybe, 255 | lt?: Maybe, 256 | lte?: Maybe, 257 | ne?: Maybe, 258 | in?: Maybe>>, 259 | nin?: Maybe>>, 260 | }; 261 | 262 | export type CompanyNameOperatorsFilterFindOneCustomerInput = { 263 | gt?: Maybe, 264 | gte?: Maybe, 265 | lt?: Maybe, 266 | lte?: Maybe, 267 | ne?: Maybe, 268 | in?: Maybe>>, 269 | nin?: Maybe>>, 270 | }; 271 | 272 | export type CompanyNameOperatorsFilterFindOneSupplierInput = { 273 | gt?: Maybe, 274 | gte?: Maybe, 275 | lt?: Maybe, 276 | lte?: Maybe, 277 | ne?: Maybe, 278 | in?: Maybe>>, 279 | nin?: Maybe>>, 280 | }; 281 | 282 | export type CreateOneOrderInput = { 283 | /** Order unique ID */ 284 | orderID?: Maybe, 285 | customerID?: Maybe, 286 | employeeID?: Maybe, 287 | orderDate?: Maybe, 288 | requiredDate?: Maybe, 289 | shippedDate?: Maybe, 290 | shipVia?: Maybe, 291 | freight?: Maybe, 292 | shipName?: Maybe, 293 | shipAddress?: Maybe, 294 | /** List of ordered products */ 295 | details?: Maybe>>, 296 | }; 297 | 298 | export type CreateOneOrderPayload = { 299 | __typename?: 'CreateOneOrderPayload', 300 | /** Created document ID */ 301 | recordId?: Maybe, 302 | /** Created document */ 303 | record?: Maybe, 304 | /** The globally unique ID among all types */ 305 | nodeId?: Maybe, 306 | /** 307 | * The client mutation ID used by clients like Relay to track the mutation. If 308 | * given, returned in the response payload of the mutation. 309 | */ 310 | clientMutationId?: Maybe, 311 | query?: Maybe, 312 | }; 313 | 314 | export type CreateOneProductInput = { 315 | /** Unique product id */ 316 | productID?: Maybe, 317 | name?: Maybe, 318 | supplierID?: Maybe, 319 | categoryID?: Maybe, 320 | quantityPerUnit?: Maybe, 321 | unitPrice?: Maybe, 322 | unitsInStock?: Maybe, 323 | unitsOnOrder?: Maybe, 324 | reorderLevel?: Maybe, 325 | discontinued?: Maybe, 326 | }; 327 | 328 | export type CreateOneProductPayload = { 329 | __typename?: 'CreateOneProductPayload', 330 | /** Created document ID */ 331 | recordId?: Maybe, 332 | /** Created document */ 333 | record?: Maybe, 334 | /** The globally unique ID among all types */ 335 | nodeId?: Maybe, 336 | /** 337 | * The client mutation ID used by clients like Relay to track the mutation. If 338 | * given, returned in the response payload of the mutation. 339 | */ 340 | clientMutationId?: Maybe, 341 | query?: Maybe, 342 | }; 343 | 344 | export type Customer = Node & { 345 | __typename?: 'Customer', 346 | /** Customer unique ID */ 347 | customerID?: Maybe, 348 | companyName?: Maybe, 349 | contactName?: Maybe, 350 | contactTitle?: Maybe, 351 | address?: Maybe, 352 | _id: Scalars['MongoID'], 353 | /** The globally unique ID among all types */ 354 | id: Scalars['ID'], 355 | orderConnection?: Maybe, 356 | orderList?: Maybe>>, 357 | }; 358 | 359 | 360 | export type CustomerOrderConnectionArgs = { 361 | first?: Maybe, 362 | after?: Maybe, 363 | last?: Maybe, 364 | before?: Maybe, 365 | sort?: Maybe 366 | }; 367 | 368 | 369 | export type CustomerOrderListArgs = { 370 | skip?: Maybe, 371 | limit?: Maybe, 372 | sort?: Maybe 373 | }; 374 | 375 | export type CustomerAddress = { 376 | __typename?: 'CustomerAddress', 377 | street?: Maybe, 378 | city?: Maybe, 379 | region?: Maybe, 380 | postalCode?: Maybe, 381 | country?: Maybe, 382 | phone?: Maybe, 383 | }; 384 | 385 | export type CustomerAddressInput = { 386 | street?: Maybe, 387 | city?: Maybe, 388 | region?: Maybe, 389 | postalCode?: Maybe, 390 | country?: Maybe, 391 | phone?: Maybe, 392 | }; 393 | 394 | /** A connection to a list of items. */ 395 | export type CustomerConnection = { 396 | __typename?: 'CustomerConnection', 397 | /** Total object count. */ 398 | count: Scalars['Int'], 399 | /** Information to aid in pagination. */ 400 | pageInfo: PageInfo, 401 | /** Information to aid in pagination. */ 402 | edges: Array, 403 | }; 404 | 405 | /** An edge in a connection. */ 406 | export type CustomerEdge = { 407 | __typename?: 'CustomerEdge', 408 | /** The item at the end of the edge */ 409 | node: Customer, 410 | /** A cursor for use in pagination */ 411 | cursor: Scalars['String'], 412 | }; 413 | 414 | export type CustomerIdOperatorsFilterFindManyCustomerInput = { 415 | /** Customer unique ID */ 416 | gt?: Maybe, 417 | /** Customer unique ID */ 418 | gte?: Maybe, 419 | /** Customer unique ID */ 420 | lt?: Maybe, 421 | /** Customer unique ID */ 422 | lte?: Maybe, 423 | /** Customer unique ID */ 424 | ne?: Maybe, 425 | /** Customer unique ID */ 426 | in?: Maybe>>, 427 | /** Customer unique ID */ 428 | nin?: Maybe>>, 429 | }; 430 | 431 | export type CustomerIdOperatorsFilterFindOneCustomerInput = { 432 | /** Customer unique ID */ 433 | gt?: Maybe, 434 | /** Customer unique ID */ 435 | gte?: Maybe, 436 | /** Customer unique ID */ 437 | lt?: Maybe, 438 | /** Customer unique ID */ 439 | lte?: Maybe, 440 | /** Customer unique ID */ 441 | ne?: Maybe, 442 | /** Customer unique ID */ 443 | in?: Maybe>>, 444 | /** Customer unique ID */ 445 | nin?: Maybe>>, 446 | }; 447 | 448 | /** List of items with pagination. */ 449 | export type CustomerPagination = { 450 | __typename?: 'CustomerPagination', 451 | /** Total object count. */ 452 | count?: Maybe, 453 | /** Array of objects. */ 454 | items?: Maybe>>, 455 | /** Information to aid in pagination. */ 456 | pageInfo: PaginationInfo, 457 | }; 458 | 459 | 460 | export type DetailsOperatorsFilterFindManyOrderInput = { 461 | /** List of ordered products */ 462 | gt?: Maybe, 463 | /** List of ordered products */ 464 | gte?: Maybe, 465 | /** List of ordered products */ 466 | lt?: Maybe, 467 | /** List of ordered products */ 468 | lte?: Maybe, 469 | /** List of ordered products */ 470 | ne?: Maybe, 471 | /** List of ordered products */ 472 | in?: Maybe>>, 473 | /** List of ordered products */ 474 | nin?: Maybe>>, 475 | }; 476 | 477 | export type DetailsOperatorsFilterFindOneOrderInput = { 478 | /** List of ordered products */ 479 | gt?: Maybe, 480 | /** List of ordered products */ 481 | gte?: Maybe, 482 | /** List of ordered products */ 483 | lt?: Maybe, 484 | /** List of ordered products */ 485 | lte?: Maybe, 486 | /** List of ordered products */ 487 | ne?: Maybe, 488 | /** List of ordered products */ 489 | in?: Maybe>>, 490 | /** List of ordered products */ 491 | nin?: Maybe>>, 492 | }; 493 | 494 | export type Employee = Node & { 495 | __typename?: 'Employee', 496 | /** Category unique ID */ 497 | employeeID?: Maybe, 498 | lastName?: Maybe, 499 | firstName?: Maybe, 500 | title?: Maybe, 501 | titleOfCourtesy?: Maybe, 502 | birthDate?: Maybe, 503 | hireDate?: Maybe, 504 | address?: Maybe, 505 | notes?: Maybe, 506 | /** ID of chief */ 507 | reportsTo?: Maybe, 508 | /** Attached territory ID from region collection */ 509 | territoryIDs?: Maybe>>, 510 | _id: Scalars['MongoID'], 511 | /** The globally unique ID among all types */ 512 | id: Scalars['ID'], 513 | chief?: Maybe, 514 | subordinates?: Maybe>>, 515 | orderConnection?: Maybe, 516 | }; 517 | 518 | 519 | export type EmployeeSubordinatesArgs = { 520 | skip?: Maybe, 521 | limit?: Maybe, 522 | sort?: Maybe 523 | }; 524 | 525 | 526 | export type EmployeeOrderConnectionArgs = { 527 | first?: Maybe, 528 | after?: Maybe, 529 | last?: Maybe, 530 | before?: Maybe, 531 | sort?: Maybe 532 | }; 533 | 534 | export type EmployeeIdOperatorsFilterFindManyEmployeeInput = { 535 | /** Category unique ID */ 536 | gt?: Maybe, 537 | /** Category unique ID */ 538 | gte?: Maybe, 539 | /** Category unique ID */ 540 | lt?: Maybe, 541 | /** Category unique ID */ 542 | lte?: Maybe, 543 | /** Category unique ID */ 544 | ne?: Maybe, 545 | /** Category unique ID */ 546 | in?: Maybe>>, 547 | /** Category unique ID */ 548 | nin?: Maybe>>, 549 | }; 550 | 551 | export type EmployeeIdOperatorsFilterFindOneEmployeeInput = { 552 | /** Category unique ID */ 553 | gt?: Maybe, 554 | /** Category unique ID */ 555 | gte?: Maybe, 556 | /** Category unique ID */ 557 | lt?: Maybe, 558 | /** Category unique ID */ 559 | lte?: Maybe, 560 | /** Category unique ID */ 561 | ne?: Maybe, 562 | /** Category unique ID */ 563 | in?: Maybe>>, 564 | /** Category unique ID */ 565 | nin?: Maybe>>, 566 | }; 567 | 568 | /** List of items with pagination. */ 569 | export type EmployeePagination = { 570 | __typename?: 'EmployeePagination', 571 | /** Total object count. */ 572 | count?: Maybe, 573 | /** Array of objects. */ 574 | items?: Maybe>>, 575 | /** Information to aid in pagination. */ 576 | pageInfo: PaginationInfo, 577 | }; 578 | 579 | export type FilterFindManyCategoryInput = { 580 | /** Category unique ID */ 581 | categoryID?: Maybe, 582 | name?: Maybe, 583 | description?: Maybe, 584 | _id?: Maybe, 585 | _ids?: Maybe>>, 586 | /** List of *indexed* fields that can be filtered via operators. */ 587 | _operators?: Maybe, 588 | OR?: Maybe>, 589 | AND?: Maybe>, 590 | }; 591 | 592 | export type FilterFindManyCustomerInput = { 593 | /** Customer unique ID */ 594 | customerID?: Maybe, 595 | companyName?: Maybe, 596 | contactName?: Maybe, 597 | contactTitle?: Maybe, 598 | address?: Maybe, 599 | _id?: Maybe, 600 | _ids?: Maybe>>, 601 | /** List of *indexed* fields that can be filtered via operators. */ 602 | _operators?: Maybe, 603 | OR?: Maybe>, 604 | AND?: Maybe>, 605 | }; 606 | 607 | export type FilterFindManyEmployeeInput = { 608 | /** Category unique ID */ 609 | employeeID?: Maybe, 610 | lastName?: Maybe, 611 | firstName?: Maybe, 612 | title?: Maybe, 613 | titleOfCourtesy?: Maybe, 614 | birthDate?: Maybe, 615 | hireDate?: Maybe, 616 | address?: Maybe, 617 | notes?: Maybe, 618 | /** ID of chief */ 619 | reportsTo?: Maybe, 620 | /** Attached territory ID from region collection */ 621 | territoryIDs?: Maybe>>, 622 | _id?: Maybe, 623 | _ids?: Maybe>>, 624 | /** List of *indexed* fields that can be filtered via operators. */ 625 | _operators?: Maybe, 626 | OR?: Maybe>, 627 | AND?: Maybe>, 628 | /** Fulltext search with mongodb stemming and weights */ 629 | fullTextSearch?: Maybe, 630 | }; 631 | 632 | export type FilterFindManyOrderInput = { 633 | /** Order unique ID */ 634 | orderID?: Maybe, 635 | customerID?: Maybe, 636 | employeeID?: Maybe, 637 | orderDate?: Maybe, 638 | requiredDate?: Maybe, 639 | shippedDate?: Maybe, 640 | shipVia?: Maybe, 641 | freight?: Maybe, 642 | shipName?: Maybe, 643 | shipAddress?: Maybe, 644 | /** List of ordered products */ 645 | details?: Maybe>>, 646 | _id?: Maybe, 647 | _ids?: Maybe>>, 648 | /** List of *indexed* fields that can be filtered via operators. */ 649 | _operators?: Maybe, 650 | OR?: Maybe>, 651 | AND?: Maybe>, 652 | }; 653 | 654 | export type FilterFindManyProductInput = { 655 | /** Unique product id */ 656 | productID?: Maybe, 657 | name?: Maybe, 658 | supplierID?: Maybe, 659 | categoryID?: Maybe, 660 | quantityPerUnit?: Maybe, 661 | unitPrice?: Maybe, 662 | unitsInStock?: Maybe, 663 | unitsOnOrder?: Maybe, 664 | reorderLevel?: Maybe, 665 | discontinued?: Maybe, 666 | _id?: Maybe, 667 | _ids?: Maybe>>, 668 | /** List of *indexed* fields that can be filtered via operators. */ 669 | _operators?: Maybe, 670 | OR?: Maybe>, 671 | AND?: Maybe>, 672 | /** Search by regExp */ 673 | nameRegexp?: Maybe, 674 | }; 675 | 676 | export type FilterFindManyRegionInput = { 677 | /** Region unique ID */ 678 | regionID?: Maybe, 679 | name?: Maybe, 680 | territories?: Maybe>>, 681 | _id?: Maybe, 682 | _ids?: Maybe>>, 683 | /** List of *indexed* fields that can be filtered via operators. */ 684 | _operators?: Maybe, 685 | OR?: Maybe>, 686 | AND?: Maybe>, 687 | }; 688 | 689 | export type FilterFindManyShipperInput = { 690 | /** Shipper unique ID */ 691 | shipperID?: Maybe, 692 | companyName?: Maybe, 693 | phone?: Maybe, 694 | _id?: Maybe, 695 | _ids?: Maybe>>, 696 | /** List of *indexed* fields that can be filtered via operators. */ 697 | _operators?: Maybe, 698 | OR?: Maybe>, 699 | AND?: Maybe>, 700 | }; 701 | 702 | export type FilterFindManySupplierInput = { 703 | /** Supplier unique ID */ 704 | supplierID?: Maybe, 705 | companyName?: Maybe, 706 | contactName?: Maybe, 707 | contactTitle?: Maybe, 708 | address?: Maybe, 709 | _id?: Maybe, 710 | _ids?: Maybe>>, 711 | /** List of *indexed* fields that can be filtered via operators. */ 712 | _operators?: Maybe, 713 | OR?: Maybe>, 714 | AND?: Maybe>, 715 | }; 716 | 717 | export type FilterFindOneCategoryInput = { 718 | /** Category unique ID */ 719 | categoryID?: Maybe, 720 | name?: Maybe, 721 | description?: Maybe, 722 | _id?: Maybe, 723 | _ids?: Maybe>>, 724 | /** List of *indexed* fields that can be filtered via operators. */ 725 | _operators?: Maybe, 726 | OR?: Maybe>, 727 | AND?: Maybe>, 728 | }; 729 | 730 | export type FilterFindOneCustomerInput = { 731 | /** Customer unique ID */ 732 | customerID?: Maybe, 733 | companyName?: Maybe, 734 | contactName?: Maybe, 735 | contactTitle?: Maybe, 736 | address?: Maybe, 737 | _id?: Maybe, 738 | _ids?: Maybe>>, 739 | /** List of *indexed* fields that can be filtered via operators. */ 740 | _operators?: Maybe, 741 | OR?: Maybe>, 742 | AND?: Maybe>, 743 | }; 744 | 745 | export type FilterFindOneEmployeeInput = { 746 | /** Category unique ID */ 747 | employeeID?: Maybe, 748 | lastName?: Maybe, 749 | firstName?: Maybe, 750 | title?: Maybe, 751 | titleOfCourtesy?: Maybe, 752 | birthDate?: Maybe, 753 | hireDate?: Maybe, 754 | address?: Maybe, 755 | notes?: Maybe, 756 | /** ID of chief */ 757 | reportsTo?: Maybe, 758 | /** Attached territory ID from region collection */ 759 | territoryIDs?: Maybe>>, 760 | _id?: Maybe, 761 | _ids?: Maybe>>, 762 | /** List of *indexed* fields that can be filtered via operators. */ 763 | _operators?: Maybe, 764 | OR?: Maybe>, 765 | AND?: Maybe>, 766 | }; 767 | 768 | export type FilterFindOneOrderInput = { 769 | /** Order unique ID */ 770 | orderID?: Maybe, 771 | customerID?: Maybe, 772 | employeeID?: Maybe, 773 | orderDate?: Maybe, 774 | requiredDate?: Maybe, 775 | shippedDate?: Maybe, 776 | shipVia?: Maybe, 777 | freight?: Maybe, 778 | shipName?: Maybe, 779 | shipAddress?: Maybe, 780 | /** List of ordered products */ 781 | details?: Maybe>>, 782 | _id?: Maybe, 783 | _ids?: Maybe>>, 784 | /** List of *indexed* fields that can be filtered via operators. */ 785 | _operators?: Maybe, 786 | OR?: Maybe>, 787 | AND?: Maybe>, 788 | }; 789 | 790 | export type FilterFindOneProductInput = { 791 | /** Unique product id */ 792 | productID?: Maybe, 793 | name?: Maybe, 794 | supplierID?: Maybe, 795 | categoryID?: Maybe, 796 | quantityPerUnit?: Maybe, 797 | unitPrice?: Maybe, 798 | unitsInStock?: Maybe, 799 | unitsOnOrder?: Maybe, 800 | reorderLevel?: Maybe, 801 | discontinued?: Maybe, 802 | _id?: Maybe, 803 | _ids?: Maybe>>, 804 | /** List of *indexed* fields that can be filtered via operators. */ 805 | _operators?: Maybe, 806 | OR?: Maybe>, 807 | AND?: Maybe>, 808 | }; 809 | 810 | export type FilterFindOneRegionInput = { 811 | /** Region unique ID */ 812 | regionID?: Maybe, 813 | name?: Maybe, 814 | territories?: Maybe>>, 815 | _id?: Maybe, 816 | _ids?: Maybe>>, 817 | /** List of *indexed* fields that can be filtered via operators. */ 818 | _operators?: Maybe, 819 | OR?: Maybe>, 820 | AND?: Maybe>, 821 | }; 822 | 823 | export type FilterFindOneShipperInput = { 824 | /** Shipper unique ID */ 825 | shipperID?: Maybe, 826 | companyName?: Maybe, 827 | phone?: Maybe, 828 | _id?: Maybe, 829 | _ids?: Maybe>>, 830 | /** List of *indexed* fields that can be filtered via operators. */ 831 | _operators?: Maybe, 832 | OR?: Maybe>, 833 | AND?: Maybe>, 834 | }; 835 | 836 | export type FilterFindOneSupplierInput = { 837 | /** Supplier unique ID */ 838 | supplierID?: Maybe, 839 | companyName?: Maybe, 840 | contactName?: Maybe, 841 | contactTitle?: Maybe, 842 | address?: Maybe, 843 | _id?: Maybe, 844 | _ids?: Maybe>>, 845 | /** List of *indexed* fields that can be filtered via operators. */ 846 | _operators?: Maybe, 847 | OR?: Maybe>, 848 | AND?: Maybe>, 849 | }; 850 | 851 | export type LastNameOperatorsFilterFindManyEmployeeInput = { 852 | gt?: Maybe, 853 | gte?: Maybe, 854 | lt?: Maybe, 855 | lte?: Maybe, 856 | ne?: Maybe, 857 | in?: Maybe>>, 858 | nin?: Maybe>>, 859 | }; 860 | 861 | export type LastNameOperatorsFilterFindOneEmployeeInput = { 862 | gt?: Maybe, 863 | gte?: Maybe, 864 | lt?: Maybe, 865 | lte?: Maybe, 866 | ne?: Maybe, 867 | in?: Maybe>>, 868 | nin?: Maybe>>, 869 | }; 870 | 871 | 872 | export type Mutation = { 873 | __typename?: 'Mutation', 874 | /** Create one document with mongoose defaults, setters, hooks and validation */ 875 | createProduct?: Maybe, 876 | /** 877 | * Update one document: 1) Retrieve one document by findById. 2) Apply updates to 878 | * mongoose document. 3) Mongoose applies defaults, setters, hooks and 879 | * validation. 4) And save it. 880 | */ 881 | updateProduct?: Maybe, 882 | /** Remove one document: 1) Retrieve one document and remove with hooks via findByIdAndRemove. 2) Return removed document. */ 883 | removeProduct?: Maybe, 884 | /** Create one document with mongoose defaults, setters, hooks and validation */ 885 | createOrder?: Maybe, 886 | /** 887 | * Update one document: 1) Retrieve one document by findById. 2) Apply updates to 888 | * mongoose document. 3) Mongoose applies defaults, setters, hooks and 889 | * validation. 4) And save it. 890 | */ 891 | updateOrder?: Maybe, 892 | /** Remove one document: 1) Retrieve one document and remove with hooks via findByIdAndRemove. 2) Return removed document. */ 893 | removeOrder?: Maybe, 894 | /** 895 | * Update one document: 1) Retrieve one document by findById. 2) Apply updates to 896 | * mongoose document. 3) Mongoose applies defaults, setters, hooks and 897 | * validation. 4) And save it. 898 | */ 899 | updateEmployee?: Maybe, 900 | }; 901 | 902 | 903 | export type MutationCreateProductArgs = { 904 | input: RelayCreateOneProductInput 905 | }; 906 | 907 | 908 | export type MutationUpdateProductArgs = { 909 | input: RelayUpdateByIdProductInput 910 | }; 911 | 912 | 913 | export type MutationRemoveProductArgs = { 914 | input: RelayRemoveByIdProductInput 915 | }; 916 | 917 | 918 | export type MutationCreateOrderArgs = { 919 | input: RelayCreateOneOrderInput 920 | }; 921 | 922 | 923 | export type MutationUpdateOrderArgs = { 924 | input: RelayUpdateByIdOrderInput 925 | }; 926 | 927 | 928 | export type MutationRemoveOrderArgs = { 929 | input: RelayRemoveByIdOrderInput 930 | }; 931 | 932 | 933 | export type MutationUpdateEmployeeArgs = { 934 | input: RelayUpdateByIdEmployeeInput 935 | }; 936 | 937 | export type NameOperatorsFilterFindManyCategoryInput = { 938 | gt?: Maybe, 939 | gte?: Maybe, 940 | lt?: Maybe, 941 | lte?: Maybe, 942 | ne?: Maybe, 943 | in?: Maybe>>, 944 | nin?: Maybe>>, 945 | }; 946 | 947 | export type NameOperatorsFilterFindManyProductInput = { 948 | gt?: Maybe, 949 | gte?: Maybe, 950 | lt?: Maybe, 951 | lte?: Maybe, 952 | ne?: Maybe, 953 | in?: Maybe>>, 954 | nin?: Maybe>>, 955 | }; 956 | 957 | export type NameOperatorsFilterFindOneCategoryInput = { 958 | gt?: Maybe, 959 | gte?: Maybe, 960 | lt?: Maybe, 961 | lte?: Maybe, 962 | ne?: Maybe, 963 | in?: Maybe>>, 964 | nin?: Maybe>>, 965 | }; 966 | 967 | export type NameOperatorsFilterFindOneProductInput = { 968 | gt?: Maybe, 969 | gte?: Maybe, 970 | lt?: Maybe, 971 | lte?: Maybe, 972 | ne?: Maybe, 973 | in?: Maybe>>, 974 | nin?: Maybe>>, 975 | }; 976 | 977 | /** An object, that can be fetched by the globally unique ID among all types. */ 978 | export type Node = { 979 | /** The globally unique ID among all types. */ 980 | id: Scalars['ID'], 981 | }; 982 | 983 | /** For performance reason this type contains only *indexed* fields. */ 984 | export type OperatorsFilterFindManyCategoryInput = { 985 | categoryID?: Maybe, 986 | name?: Maybe, 987 | _id?: Maybe<_IdOperatorsFilterFindManyCategoryInput>, 988 | }; 989 | 990 | /** For performance reason this type contains only *indexed* fields. */ 991 | export type OperatorsFilterFindManyCustomerInput = { 992 | customerID?: Maybe, 993 | companyName?: Maybe, 994 | _id?: Maybe<_IdOperatorsFilterFindManyCustomerInput>, 995 | }; 996 | 997 | /** For performance reason this type contains only *indexed* fields. */ 998 | export type OperatorsFilterFindManyEmployeeInput = { 999 | employeeID?: Maybe, 1000 | lastName?: Maybe, 1001 | territoryIDs?: Maybe, 1002 | _id?: Maybe<_IdOperatorsFilterFindManyEmployeeInput>, 1003 | }; 1004 | 1005 | /** For performance reason this type contains only *indexed* fields. */ 1006 | export type OperatorsFilterFindManyOrderInput = { 1007 | orderID?: Maybe, 1008 | details?: Maybe, 1009 | _id?: Maybe<_IdOperatorsFilterFindManyOrderInput>, 1010 | }; 1011 | 1012 | /** For performance reason this type contains only *indexed* fields. */ 1013 | export type OperatorsFilterFindManyProductInput = { 1014 | productID?: Maybe, 1015 | name?: Maybe, 1016 | unitPrice?: Maybe, 1017 | _id?: Maybe<_IdOperatorsFilterFindManyProductInput>, 1018 | }; 1019 | 1020 | /** For performance reason this type contains only *indexed* fields. */ 1021 | export type OperatorsFilterFindManyRegionInput = { 1022 | regionID?: Maybe, 1023 | _id?: Maybe<_IdOperatorsFilterFindManyRegionInput>, 1024 | }; 1025 | 1026 | /** For performance reason this type contains only *indexed* fields. */ 1027 | export type OperatorsFilterFindManyShipperInput = { 1028 | shipperID?: Maybe, 1029 | _id?: Maybe<_IdOperatorsFilterFindManyShipperInput>, 1030 | }; 1031 | 1032 | /** For performance reason this type contains only *indexed* fields. */ 1033 | export type OperatorsFilterFindManySupplierInput = { 1034 | supplierID?: Maybe, 1035 | companyName?: Maybe, 1036 | _id?: Maybe<_IdOperatorsFilterFindManySupplierInput>, 1037 | }; 1038 | 1039 | /** For performance reason this type contains only *indexed* fields. */ 1040 | export type OperatorsFilterFindOneCategoryInput = { 1041 | categoryID?: Maybe, 1042 | name?: Maybe, 1043 | _id?: Maybe<_IdOperatorsFilterFindOneCategoryInput>, 1044 | }; 1045 | 1046 | /** For performance reason this type contains only *indexed* fields. */ 1047 | export type OperatorsFilterFindOneCustomerInput = { 1048 | customerID?: Maybe, 1049 | companyName?: Maybe, 1050 | _id?: Maybe<_IdOperatorsFilterFindOneCustomerInput>, 1051 | }; 1052 | 1053 | /** For performance reason this type contains only *indexed* fields. */ 1054 | export type OperatorsFilterFindOneEmployeeInput = { 1055 | employeeID?: Maybe, 1056 | lastName?: Maybe, 1057 | territoryIDs?: Maybe, 1058 | _id?: Maybe<_IdOperatorsFilterFindOneEmployeeInput>, 1059 | }; 1060 | 1061 | /** For performance reason this type contains only *indexed* fields. */ 1062 | export type OperatorsFilterFindOneOrderInput = { 1063 | orderID?: Maybe, 1064 | details?: Maybe, 1065 | _id?: Maybe<_IdOperatorsFilterFindOneOrderInput>, 1066 | }; 1067 | 1068 | /** For performance reason this type contains only *indexed* fields. */ 1069 | export type OperatorsFilterFindOneProductInput = { 1070 | productID?: Maybe, 1071 | name?: Maybe, 1072 | unitPrice?: Maybe, 1073 | _id?: Maybe<_IdOperatorsFilterFindOneProductInput>, 1074 | }; 1075 | 1076 | /** For performance reason this type contains only *indexed* fields. */ 1077 | export type OperatorsFilterFindOneRegionInput = { 1078 | regionID?: Maybe, 1079 | _id?: Maybe<_IdOperatorsFilterFindOneRegionInput>, 1080 | }; 1081 | 1082 | /** For performance reason this type contains only *indexed* fields. */ 1083 | export type OperatorsFilterFindOneShipperInput = { 1084 | shipperID?: Maybe, 1085 | _id?: Maybe<_IdOperatorsFilterFindOneShipperInput>, 1086 | }; 1087 | 1088 | /** For performance reason this type contains only *indexed* fields. */ 1089 | export type OperatorsFilterFindOneSupplierInput = { 1090 | supplierID?: Maybe, 1091 | companyName?: Maybe, 1092 | _id?: Maybe<_IdOperatorsFilterFindOneSupplierInput>, 1093 | }; 1094 | 1095 | export type Order = Node & { 1096 | __typename?: 'Order', 1097 | /** Order unique ID */ 1098 | orderID?: Maybe, 1099 | customerID?: Maybe, 1100 | employeeID?: Maybe, 1101 | orderDate?: Maybe, 1102 | requiredDate?: Maybe, 1103 | shippedDate?: Maybe, 1104 | shipVia?: Maybe, 1105 | freight?: Maybe, 1106 | shipName?: Maybe, 1107 | shipAddress?: Maybe, 1108 | /** List of ordered products */ 1109 | details?: Maybe>>, 1110 | _id: Scalars['MongoID'], 1111 | /** The globally unique ID among all types */ 1112 | id: Scalars['ID'], 1113 | customer?: Maybe, 1114 | employee?: Maybe, 1115 | shipper?: Maybe, 1116 | }; 1117 | 1118 | /** A connection to a list of items. */ 1119 | export type OrderConnection = { 1120 | __typename?: 'OrderConnection', 1121 | /** Total object count. */ 1122 | count: Scalars['Int'], 1123 | /** Information to aid in pagination. */ 1124 | pageInfo: PageInfo, 1125 | /** Information to aid in pagination. */ 1126 | edges: Array, 1127 | }; 1128 | 1129 | export type OrderDetails = { 1130 | __typename?: 'OrderDetails', 1131 | productID?: Maybe, 1132 | unitPrice?: Maybe, 1133 | quantity?: Maybe, 1134 | discount?: Maybe, 1135 | product?: Maybe, 1136 | }; 1137 | 1138 | export type OrderDetailsInput = { 1139 | productID?: Maybe, 1140 | unitPrice?: Maybe, 1141 | quantity?: Maybe, 1142 | discount?: Maybe, 1143 | }; 1144 | 1145 | /** An edge in a connection. */ 1146 | export type OrderEdge = { 1147 | __typename?: 'OrderEdge', 1148 | /** The item at the end of the edge */ 1149 | node: Order, 1150 | /** A cursor for use in pagination */ 1151 | cursor: Scalars['String'], 1152 | }; 1153 | 1154 | export type OrderIdOperatorsFilterFindManyOrderInput = { 1155 | /** Order unique ID */ 1156 | gt?: Maybe, 1157 | /** Order unique ID */ 1158 | gte?: Maybe, 1159 | /** Order unique ID */ 1160 | lt?: Maybe, 1161 | /** Order unique ID */ 1162 | lte?: Maybe, 1163 | /** Order unique ID */ 1164 | ne?: Maybe, 1165 | /** Order unique ID */ 1166 | in?: Maybe>>, 1167 | /** Order unique ID */ 1168 | nin?: Maybe>>, 1169 | }; 1170 | 1171 | export type OrderIdOperatorsFilterFindOneOrderInput = { 1172 | /** Order unique ID */ 1173 | gt?: Maybe, 1174 | /** Order unique ID */ 1175 | gte?: Maybe, 1176 | /** Order unique ID */ 1177 | lt?: Maybe, 1178 | /** Order unique ID */ 1179 | lte?: Maybe, 1180 | /** Order unique ID */ 1181 | ne?: Maybe, 1182 | /** Order unique ID */ 1183 | in?: Maybe>>, 1184 | /** Order unique ID */ 1185 | nin?: Maybe>>, 1186 | }; 1187 | 1188 | /** List of items with pagination. */ 1189 | export type OrderPagination = { 1190 | __typename?: 'OrderPagination', 1191 | /** Total object count. */ 1192 | count?: Maybe, 1193 | /** Array of objects. */ 1194 | items?: Maybe>>, 1195 | /** Information to aid in pagination. */ 1196 | pageInfo: PaginationInfo, 1197 | }; 1198 | 1199 | /** Information about pagination in a connection. */ 1200 | export type PageInfo = { 1201 | __typename?: 'PageInfo', 1202 | /** When paginating forwards, are there more items? */ 1203 | hasNextPage: Scalars['Boolean'], 1204 | /** When paginating backwards, are there more items? */ 1205 | hasPreviousPage: Scalars['Boolean'], 1206 | /** When paginating backwards, the cursor to continue. */ 1207 | startCursor?: Maybe, 1208 | /** When paginating forwards, the cursor to continue. */ 1209 | endCursor?: Maybe, 1210 | }; 1211 | 1212 | /** Information about pagination. */ 1213 | export type PaginationInfo = { 1214 | __typename?: 'PaginationInfo', 1215 | /** Current page number */ 1216 | currentPage: Scalars['Int'], 1217 | /** Number of items per page */ 1218 | perPage: Scalars['Int'], 1219 | /** Total number of pages */ 1220 | pageCount?: Maybe, 1221 | /** Total number of items */ 1222 | itemCount?: Maybe, 1223 | /** When paginating forwards, are there more items? */ 1224 | hasNextPage?: Maybe, 1225 | /** When paginating backwards, are there more items? */ 1226 | hasPreviousPage?: Maybe, 1227 | }; 1228 | 1229 | export type Product = Node & { 1230 | __typename?: 'Product', 1231 | /** Unique product id */ 1232 | productID?: Maybe, 1233 | name?: Maybe, 1234 | supplierID?: Maybe, 1235 | categoryID?: Maybe, 1236 | quantityPerUnit?: Maybe, 1237 | unitPrice?: Maybe, 1238 | unitsInStock?: Maybe, 1239 | unitsOnOrder?: Maybe, 1240 | reorderLevel?: Maybe, 1241 | discontinued?: Maybe, 1242 | _id: Scalars['MongoID'], 1243 | /** The globally unique ID among all types */ 1244 | id: Scalars['ID'], 1245 | orderConnection?: Maybe, 1246 | orderList?: Maybe>>, 1247 | supplier?: Maybe, 1248 | category?: Maybe, 1249 | }; 1250 | 1251 | 1252 | export type ProductOrderConnectionArgs = { 1253 | first?: Maybe, 1254 | after?: Maybe, 1255 | last?: Maybe, 1256 | before?: Maybe, 1257 | sort?: Maybe 1258 | }; 1259 | 1260 | 1261 | export type ProductOrderListArgs = { 1262 | skip?: Maybe, 1263 | limit?: Maybe, 1264 | sort?: Maybe 1265 | }; 1266 | 1267 | /** A connection to a list of items. */ 1268 | export type ProductConnection = { 1269 | __typename?: 'ProductConnection', 1270 | /** Total object count. */ 1271 | count: Scalars['Int'], 1272 | /** Information to aid in pagination. */ 1273 | pageInfo: PageInfo, 1274 | /** Information to aid in pagination. */ 1275 | edges: Array, 1276 | }; 1277 | 1278 | /** An edge in a connection. */ 1279 | export type ProductEdge = { 1280 | __typename?: 'ProductEdge', 1281 | /** The item at the end of the edge */ 1282 | node: Product, 1283 | /** A cursor for use in pagination */ 1284 | cursor: Scalars['String'], 1285 | }; 1286 | 1287 | export type ProductIdOperatorsFilterFindManyProductInput = { 1288 | /** Unique product id */ 1289 | gt?: Maybe, 1290 | /** Unique product id */ 1291 | gte?: Maybe, 1292 | /** Unique product id */ 1293 | lt?: Maybe, 1294 | /** Unique product id */ 1295 | lte?: Maybe, 1296 | /** Unique product id */ 1297 | ne?: Maybe, 1298 | /** Unique product id */ 1299 | in?: Maybe>>, 1300 | /** Unique product id */ 1301 | nin?: Maybe>>, 1302 | }; 1303 | 1304 | export type ProductIdOperatorsFilterFindOneProductInput = { 1305 | /** Unique product id */ 1306 | gt?: Maybe, 1307 | /** Unique product id */ 1308 | gte?: Maybe, 1309 | /** Unique product id */ 1310 | lt?: Maybe, 1311 | /** Unique product id */ 1312 | lte?: Maybe, 1313 | /** Unique product id */ 1314 | ne?: Maybe, 1315 | /** Unique product id */ 1316 | in?: Maybe>>, 1317 | /** Unique product id */ 1318 | nin?: Maybe>>, 1319 | }; 1320 | 1321 | /** List of items with pagination. */ 1322 | export type ProductPagination = { 1323 | __typename?: 'ProductPagination', 1324 | /** Total object count. */ 1325 | count?: Maybe, 1326 | /** Array of objects. */ 1327 | items?: Maybe>>, 1328 | /** Information to aid in pagination. */ 1329 | pageInfo: PaginationInfo, 1330 | }; 1331 | 1332 | export type Query = { 1333 | __typename?: 'Query', 1334 | /** Fetches an object that has globally unique ID among all types */ 1335 | node?: Maybe, 1336 | /** Data under client context */ 1337 | viewer?: Maybe, 1338 | }; 1339 | 1340 | 1341 | export type QueryNodeArgs = { 1342 | id: Scalars['ID'] 1343 | }; 1344 | 1345 | export type Region = Node & { 1346 | __typename?: 'Region', 1347 | /** Region unique ID */ 1348 | regionID?: Maybe, 1349 | name?: Maybe, 1350 | territories?: Maybe>>, 1351 | _id: Scalars['MongoID'], 1352 | /** The globally unique ID among all types */ 1353 | id: Scalars['ID'], 1354 | employees?: Maybe>>, 1355 | }; 1356 | 1357 | 1358 | export type RegionEmployeesArgs = { 1359 | skip?: Maybe, 1360 | limit?: Maybe, 1361 | sort?: Maybe 1362 | }; 1363 | 1364 | export type RegionIdOperatorsFilterFindManyRegionInput = { 1365 | /** Region unique ID */ 1366 | gt?: Maybe, 1367 | /** Region unique ID */ 1368 | gte?: Maybe, 1369 | /** Region unique ID */ 1370 | lt?: Maybe, 1371 | /** Region unique ID */ 1372 | lte?: Maybe, 1373 | /** Region unique ID */ 1374 | ne?: Maybe, 1375 | /** Region unique ID */ 1376 | in?: Maybe>>, 1377 | /** Region unique ID */ 1378 | nin?: Maybe>>, 1379 | }; 1380 | 1381 | export type RegionIdOperatorsFilterFindOneRegionInput = { 1382 | /** Region unique ID */ 1383 | gt?: Maybe, 1384 | /** Region unique ID */ 1385 | gte?: Maybe, 1386 | /** Region unique ID */ 1387 | lt?: Maybe, 1388 | /** Region unique ID */ 1389 | lte?: Maybe, 1390 | /** Region unique ID */ 1391 | ne?: Maybe, 1392 | /** Region unique ID */ 1393 | in?: Maybe>>, 1394 | /** Region unique ID */ 1395 | nin?: Maybe>>, 1396 | }; 1397 | 1398 | export type RegionTerritories = { 1399 | __typename?: 'RegionTerritories', 1400 | territoryID?: Maybe, 1401 | name?: Maybe, 1402 | }; 1403 | 1404 | export type RegionTerritoriesInput = { 1405 | territoryID?: Maybe, 1406 | name?: Maybe, 1407 | }; 1408 | 1409 | export type RelayCreateOneOrderInput = { 1410 | record: CreateOneOrderInput, 1411 | /** 1412 | * The client mutation ID used by clients like Relay to track the mutation. If 1413 | * given, returned in the response payload of the mutation. 1414 | */ 1415 | clientMutationId?: Maybe, 1416 | }; 1417 | 1418 | export type RelayCreateOneProductInput = { 1419 | record: CreateOneProductInput, 1420 | /** 1421 | * The client mutation ID used by clients like Relay to track the mutation. If 1422 | * given, returned in the response payload of the mutation. 1423 | */ 1424 | clientMutationId?: Maybe, 1425 | }; 1426 | 1427 | export type RelayRemoveByIdOrderInput = { 1428 | _id: Scalars['MongoID'], 1429 | /** 1430 | * The client mutation ID used by clients like Relay to track the mutation. If 1431 | * given, returned in the response payload of the mutation. 1432 | */ 1433 | clientMutationId?: Maybe, 1434 | }; 1435 | 1436 | export type RelayRemoveByIdProductInput = { 1437 | _id: Scalars['MongoID'], 1438 | /** 1439 | * The client mutation ID used by clients like Relay to track the mutation. If 1440 | * given, returned in the response payload of the mutation. 1441 | */ 1442 | clientMutationId?: Maybe, 1443 | }; 1444 | 1445 | export type RelayUpdateByIdEmployeeInput = { 1446 | record: UpdateByIdEmployeeInput, 1447 | /** 1448 | * The client mutation ID used by clients like Relay to track the mutation. If 1449 | * given, returned in the response payload of the mutation. 1450 | */ 1451 | clientMutationId?: Maybe, 1452 | }; 1453 | 1454 | export type RelayUpdateByIdOrderInput = { 1455 | record: UpdateByIdOrderInput, 1456 | /** 1457 | * The client mutation ID used by clients like Relay to track the mutation. If 1458 | * given, returned in the response payload of the mutation. 1459 | */ 1460 | clientMutationId?: Maybe, 1461 | }; 1462 | 1463 | export type RelayUpdateByIdProductInput = { 1464 | record: UpdateByIdProductInput, 1465 | /** 1466 | * The client mutation ID used by clients like Relay to track the mutation. If 1467 | * given, returned in the response payload of the mutation. 1468 | */ 1469 | clientMutationId?: Maybe, 1470 | }; 1471 | 1472 | export type RemoveByIdOrderPayload = { 1473 | __typename?: 'RemoveByIdOrderPayload', 1474 | /** Removed document ID */ 1475 | recordId?: Maybe, 1476 | /** Removed document */ 1477 | record?: Maybe, 1478 | /** The globally unique ID among all types */ 1479 | nodeId?: Maybe, 1480 | /** 1481 | * The client mutation ID used by clients like Relay to track the mutation. If 1482 | * given, returned in the response payload of the mutation. 1483 | */ 1484 | clientMutationId?: Maybe, 1485 | query?: Maybe, 1486 | }; 1487 | 1488 | export type RemoveByIdProductPayload = { 1489 | __typename?: 'RemoveByIdProductPayload', 1490 | /** Removed document ID */ 1491 | recordId?: Maybe, 1492 | /** Removed document */ 1493 | record?: Maybe, 1494 | /** The globally unique ID among all types */ 1495 | nodeId?: Maybe, 1496 | /** 1497 | * The client mutation ID used by clients like Relay to track the mutation. If 1498 | * given, returned in the response payload of the mutation. 1499 | */ 1500 | clientMutationId?: Maybe, 1501 | query?: Maybe, 1502 | }; 1503 | 1504 | export type Shipper = Node & { 1505 | __typename?: 'Shipper', 1506 | /** Shipper unique ID */ 1507 | shipperID?: Maybe, 1508 | companyName?: Maybe, 1509 | phone?: Maybe, 1510 | _id: Scalars['MongoID'], 1511 | /** The globally unique ID among all types */ 1512 | id: Scalars['ID'], 1513 | orderConnection?: Maybe, 1514 | }; 1515 | 1516 | 1517 | export type ShipperOrderConnectionArgs = { 1518 | first?: Maybe, 1519 | after?: Maybe, 1520 | last?: Maybe, 1521 | before?: Maybe, 1522 | sort?: Maybe 1523 | }; 1524 | 1525 | export type ShipperIdOperatorsFilterFindManyShipperInput = { 1526 | /** Shipper unique ID */ 1527 | gt?: Maybe, 1528 | /** Shipper unique ID */ 1529 | gte?: Maybe, 1530 | /** Shipper unique ID */ 1531 | lt?: Maybe, 1532 | /** Shipper unique ID */ 1533 | lte?: Maybe, 1534 | /** Shipper unique ID */ 1535 | ne?: Maybe, 1536 | /** Shipper unique ID */ 1537 | in?: Maybe>>, 1538 | /** Shipper unique ID */ 1539 | nin?: Maybe>>, 1540 | }; 1541 | 1542 | export type ShipperIdOperatorsFilterFindOneShipperInput = { 1543 | /** Shipper unique ID */ 1544 | gt?: Maybe, 1545 | /** Shipper unique ID */ 1546 | gte?: Maybe, 1547 | /** Shipper unique ID */ 1548 | lt?: Maybe, 1549 | /** Shipper unique ID */ 1550 | lte?: Maybe, 1551 | /** Shipper unique ID */ 1552 | ne?: Maybe, 1553 | /** Shipper unique ID */ 1554 | in?: Maybe>>, 1555 | /** Shipper unique ID */ 1556 | nin?: Maybe>>, 1557 | }; 1558 | 1559 | export enum SortConnectionCustomerEnum { 1560 | IdDesc = '_ID_DESC', 1561 | IdAsc = '_ID_ASC', 1562 | CustomeridDesc = 'CUSTOMERID_DESC', 1563 | CustomeridAsc = 'CUSTOMERID_ASC', 1564 | CompanynameDesc = 'COMPANYNAME_DESC', 1565 | CompanynameAsc = 'COMPANYNAME_ASC' 1566 | } 1567 | 1568 | export enum SortConnectionOrderEnum { 1569 | IdDesc = '_ID_DESC', 1570 | IdAsc = '_ID_ASC', 1571 | OrderidDesc = 'ORDERID_DESC', 1572 | OrderidAsc = 'ORDERID_ASC' 1573 | } 1574 | 1575 | export enum SortConnectionProductEnum { 1576 | IdDesc = '_ID_DESC', 1577 | IdAsc = '_ID_ASC', 1578 | ProductidDesc = 'PRODUCTID_DESC', 1579 | ProductidAsc = 'PRODUCTID_ASC', 1580 | NameSupplieridDesc = 'NAME__SUPPLIERID_DESC', 1581 | NameSupplieridAsc = 'NAME__SUPPLIERID_ASC' 1582 | } 1583 | 1584 | export enum SortConnectionSupplierEnum { 1585 | IdDesc = '_ID_DESC', 1586 | IdAsc = '_ID_ASC', 1587 | SupplieridDesc = 'SUPPLIERID_DESC', 1588 | SupplieridAsc = 'SUPPLIERID_ASC', 1589 | CompanynameDesc = 'COMPANYNAME_DESC', 1590 | CompanynameAsc = 'COMPANYNAME_ASC' 1591 | } 1592 | 1593 | export enum SortFindManyCategoryInput { 1594 | IdAsc = '_ID_ASC', 1595 | IdDesc = '_ID_DESC', 1596 | CategoryidAsc = 'CATEGORYID_ASC', 1597 | CategoryidDesc = 'CATEGORYID_DESC', 1598 | NameAsc = 'NAME_ASC', 1599 | NameDesc = 'NAME_DESC' 1600 | } 1601 | 1602 | export enum SortFindManyCustomerInput { 1603 | IdAsc = '_ID_ASC', 1604 | IdDesc = '_ID_DESC', 1605 | CustomeridAsc = 'CUSTOMERID_ASC', 1606 | CustomeridDesc = 'CUSTOMERID_DESC', 1607 | CompanynameAsc = 'COMPANYNAME_ASC', 1608 | CompanynameDesc = 'COMPANYNAME_DESC' 1609 | } 1610 | 1611 | export enum SortFindManyEmployeeInput { 1612 | IdAsc = '_ID_ASC', 1613 | IdDesc = '_ID_DESC', 1614 | EmployeeidAsc = 'EMPLOYEEID_ASC', 1615 | EmployeeidDesc = 'EMPLOYEEID_DESC', 1616 | TerritoryidsAsc = 'TERRITORYIDS_ASC', 1617 | TerritoryidsDesc = 'TERRITORYIDS_DESC', 1618 | LastnameAsc = 'LASTNAME_ASC', 1619 | LastnameDesc = 'LASTNAME_DESC', 1620 | LastnameFirstnameAsc = 'LASTNAME__FIRSTNAME_ASC', 1621 | LastnameFirstnameDesc = 'LASTNAME__FIRSTNAME_DESC' 1622 | } 1623 | 1624 | export enum SortFindManyOrderInput { 1625 | IdAsc = '_ID_ASC', 1626 | IdDesc = '_ID_DESC', 1627 | OrderidAsc = 'ORDERID_ASC', 1628 | OrderidDesc = 'ORDERID_DESC', 1629 | DetailsAsc = 'DETAILS_ASC', 1630 | DetailsDesc = 'DETAILS_DESC' 1631 | } 1632 | 1633 | export enum SortFindManyProductInput { 1634 | IdAsc = '_ID_ASC', 1635 | IdDesc = '_ID_DESC', 1636 | ProductidAsc = 'PRODUCTID_ASC', 1637 | ProductidDesc = 'PRODUCTID_DESC', 1638 | UnitpriceAsc = 'UNITPRICE_ASC', 1639 | UnitpriceDesc = 'UNITPRICE_DESC', 1640 | NameAsc = 'NAME_ASC', 1641 | NameDesc = 'NAME_DESC', 1642 | NameSupplieridAsc = 'NAME__SUPPLIERID_ASC', 1643 | NameSupplieridDesc = 'NAME__SUPPLIERID_DESC' 1644 | } 1645 | 1646 | export enum SortFindManyRegionInput { 1647 | IdAsc = '_ID_ASC', 1648 | IdDesc = '_ID_DESC', 1649 | RegionidAsc = 'REGIONID_ASC', 1650 | RegionidDesc = 'REGIONID_DESC' 1651 | } 1652 | 1653 | export enum SortFindManyShipperInput { 1654 | IdAsc = '_ID_ASC', 1655 | IdDesc = '_ID_DESC', 1656 | ShipperidAsc = 'SHIPPERID_ASC', 1657 | ShipperidDesc = 'SHIPPERID_DESC' 1658 | } 1659 | 1660 | export enum SortFindOneCategoryInput { 1661 | IdAsc = '_ID_ASC', 1662 | IdDesc = '_ID_DESC', 1663 | CategoryidAsc = 'CATEGORYID_ASC', 1664 | CategoryidDesc = 'CATEGORYID_DESC', 1665 | NameAsc = 'NAME_ASC', 1666 | NameDesc = 'NAME_DESC' 1667 | } 1668 | 1669 | export enum SortFindOneCustomerInput { 1670 | IdAsc = '_ID_ASC', 1671 | IdDesc = '_ID_DESC', 1672 | CustomeridAsc = 'CUSTOMERID_ASC', 1673 | CustomeridDesc = 'CUSTOMERID_DESC', 1674 | CompanynameAsc = 'COMPANYNAME_ASC', 1675 | CompanynameDesc = 'COMPANYNAME_DESC' 1676 | } 1677 | 1678 | export enum SortFindOneEmployeeInput { 1679 | IdAsc = '_ID_ASC', 1680 | IdDesc = '_ID_DESC', 1681 | EmployeeidAsc = 'EMPLOYEEID_ASC', 1682 | EmployeeidDesc = 'EMPLOYEEID_DESC', 1683 | TerritoryidsAsc = 'TERRITORYIDS_ASC', 1684 | TerritoryidsDesc = 'TERRITORYIDS_DESC', 1685 | LastnameAsc = 'LASTNAME_ASC', 1686 | LastnameDesc = 'LASTNAME_DESC', 1687 | LastnameFirstnameAsc = 'LASTNAME__FIRSTNAME_ASC', 1688 | LastnameFirstnameDesc = 'LASTNAME__FIRSTNAME_DESC' 1689 | } 1690 | 1691 | export enum SortFindOneOrderInput { 1692 | IdAsc = '_ID_ASC', 1693 | IdDesc = '_ID_DESC', 1694 | OrderidAsc = 'ORDERID_ASC', 1695 | OrderidDesc = 'ORDERID_DESC', 1696 | DetailsAsc = 'DETAILS_ASC', 1697 | DetailsDesc = 'DETAILS_DESC' 1698 | } 1699 | 1700 | export enum SortFindOneProductInput { 1701 | IdAsc = '_ID_ASC', 1702 | IdDesc = '_ID_DESC', 1703 | ProductidAsc = 'PRODUCTID_ASC', 1704 | ProductidDesc = 'PRODUCTID_DESC', 1705 | UnitpriceAsc = 'UNITPRICE_ASC', 1706 | UnitpriceDesc = 'UNITPRICE_DESC', 1707 | NameAsc = 'NAME_ASC', 1708 | NameDesc = 'NAME_DESC', 1709 | NameSupplieridAsc = 'NAME__SUPPLIERID_ASC', 1710 | NameSupplieridDesc = 'NAME__SUPPLIERID_DESC' 1711 | } 1712 | 1713 | export enum SortFindOneRegionInput { 1714 | IdAsc = '_ID_ASC', 1715 | IdDesc = '_ID_DESC', 1716 | RegionidAsc = 'REGIONID_ASC', 1717 | RegionidDesc = 'REGIONID_DESC' 1718 | } 1719 | 1720 | export enum SortFindOneShipperInput { 1721 | IdAsc = '_ID_ASC', 1722 | IdDesc = '_ID_DESC', 1723 | ShipperidAsc = 'SHIPPERID_ASC', 1724 | ShipperidDesc = 'SHIPPERID_DESC' 1725 | } 1726 | 1727 | export enum SortFindOneSupplierInput { 1728 | IdAsc = '_ID_ASC', 1729 | IdDesc = '_ID_DESC', 1730 | SupplieridAsc = 'SUPPLIERID_ASC', 1731 | SupplieridDesc = 'SUPPLIERID_DESC', 1732 | CompanynameAsc = 'COMPANYNAME_ASC', 1733 | CompanynameDesc = 'COMPANYNAME_DESC' 1734 | } 1735 | 1736 | export type Supplier = Node & { 1737 | __typename?: 'Supplier', 1738 | /** Supplier unique ID */ 1739 | supplierID?: Maybe, 1740 | companyName?: Maybe, 1741 | contactName?: Maybe, 1742 | contactTitle?: Maybe, 1743 | address?: Maybe, 1744 | _id: Scalars['MongoID'], 1745 | /** The globally unique ID among all types */ 1746 | id: Scalars['ID'], 1747 | productConnection?: Maybe, 1748 | }; 1749 | 1750 | 1751 | export type SupplierProductConnectionArgs = { 1752 | first?: Maybe, 1753 | after?: Maybe, 1754 | last?: Maybe, 1755 | before?: Maybe, 1756 | sort?: Maybe 1757 | }; 1758 | 1759 | /** A connection to a list of items. */ 1760 | export type SupplierConnection = { 1761 | __typename?: 'SupplierConnection', 1762 | /** Total object count. */ 1763 | count: Scalars['Int'], 1764 | /** Information to aid in pagination. */ 1765 | pageInfo: PageInfo, 1766 | /** Information to aid in pagination. */ 1767 | edges: Array, 1768 | }; 1769 | 1770 | /** An edge in a connection. */ 1771 | export type SupplierEdge = { 1772 | __typename?: 'SupplierEdge', 1773 | /** The item at the end of the edge */ 1774 | node: Supplier, 1775 | /** A cursor for use in pagination */ 1776 | cursor: Scalars['String'], 1777 | }; 1778 | 1779 | export type SupplierIdOperatorsFilterFindManySupplierInput = { 1780 | /** Supplier unique ID */ 1781 | gt?: Maybe, 1782 | /** Supplier unique ID */ 1783 | gte?: Maybe, 1784 | /** Supplier unique ID */ 1785 | lt?: Maybe, 1786 | /** Supplier unique ID */ 1787 | lte?: Maybe, 1788 | /** Supplier unique ID */ 1789 | ne?: Maybe, 1790 | /** Supplier unique ID */ 1791 | in?: Maybe>>, 1792 | /** Supplier unique ID */ 1793 | nin?: Maybe>>, 1794 | }; 1795 | 1796 | export type SupplierIdOperatorsFilterFindOneSupplierInput = { 1797 | /** Supplier unique ID */ 1798 | gt?: Maybe, 1799 | /** Supplier unique ID */ 1800 | gte?: Maybe, 1801 | /** Supplier unique ID */ 1802 | lt?: Maybe, 1803 | /** Supplier unique ID */ 1804 | lte?: Maybe, 1805 | /** Supplier unique ID */ 1806 | ne?: Maybe, 1807 | /** Supplier unique ID */ 1808 | in?: Maybe>>, 1809 | /** Supplier unique ID */ 1810 | nin?: Maybe>>, 1811 | }; 1812 | 1813 | export type TerritoryIDsOperatorsFilterFindManyEmployeeInput = { 1814 | /** Attached territory ID from region collection */ 1815 | gt?: Maybe, 1816 | /** Attached territory ID from region collection */ 1817 | gte?: Maybe, 1818 | /** Attached territory ID from region collection */ 1819 | lt?: Maybe, 1820 | /** Attached territory ID from region collection */ 1821 | lte?: Maybe, 1822 | /** Attached territory ID from region collection */ 1823 | ne?: Maybe, 1824 | /** Attached territory ID from region collection */ 1825 | in?: Maybe>>, 1826 | /** Attached territory ID from region collection */ 1827 | nin?: Maybe>>, 1828 | }; 1829 | 1830 | export type TerritoryIDsOperatorsFilterFindOneEmployeeInput = { 1831 | /** Attached territory ID from region collection */ 1832 | gt?: Maybe, 1833 | /** Attached territory ID from region collection */ 1834 | gte?: Maybe, 1835 | /** Attached territory ID from region collection */ 1836 | lt?: Maybe, 1837 | /** Attached territory ID from region collection */ 1838 | lte?: Maybe, 1839 | /** Attached territory ID from region collection */ 1840 | ne?: Maybe, 1841 | /** Attached territory ID from region collection */ 1842 | in?: Maybe>>, 1843 | /** Attached territory ID from region collection */ 1844 | nin?: Maybe>>, 1845 | }; 1846 | 1847 | export type UnitPriceOperatorsFilterFindManyProductInput = { 1848 | gt?: Maybe, 1849 | gte?: Maybe, 1850 | lt?: Maybe, 1851 | lte?: Maybe, 1852 | ne?: Maybe, 1853 | in?: Maybe>>, 1854 | nin?: Maybe>>, 1855 | }; 1856 | 1857 | export type UnitPriceOperatorsFilterFindOneProductInput = { 1858 | gt?: Maybe, 1859 | gte?: Maybe, 1860 | lt?: Maybe, 1861 | lte?: Maybe, 1862 | ne?: Maybe, 1863 | in?: Maybe>>, 1864 | nin?: Maybe>>, 1865 | }; 1866 | 1867 | export type UpdateByIdEmployeeInput = { 1868 | /** Category unique ID */ 1869 | employeeID?: Maybe, 1870 | lastName?: Maybe, 1871 | firstName?: Maybe, 1872 | title?: Maybe, 1873 | titleOfCourtesy?: Maybe, 1874 | birthDate?: Maybe, 1875 | hireDate?: Maybe, 1876 | address?: Maybe, 1877 | notes?: Maybe, 1878 | /** ID of chief */ 1879 | reportsTo?: Maybe, 1880 | /** Attached territory ID from region collection */ 1881 | territoryIDs?: Maybe>>, 1882 | _id: Scalars['MongoID'], 1883 | }; 1884 | 1885 | export type UpdateByIdEmployeePayload = { 1886 | __typename?: 'UpdateByIdEmployeePayload', 1887 | /** Updated document ID */ 1888 | recordId?: Maybe, 1889 | /** Updated document */ 1890 | record?: Maybe, 1891 | /** The globally unique ID among all types */ 1892 | nodeId?: Maybe, 1893 | /** 1894 | * The client mutation ID used by clients like Relay to track the mutation. If 1895 | * given, returned in the response payload of the mutation. 1896 | */ 1897 | clientMutationId?: Maybe, 1898 | query?: Maybe, 1899 | }; 1900 | 1901 | export type UpdateByIdOrderInput = { 1902 | /** Order unique ID */ 1903 | orderID?: Maybe, 1904 | customerID?: Maybe, 1905 | employeeID?: Maybe, 1906 | orderDate?: Maybe, 1907 | requiredDate?: Maybe, 1908 | shippedDate?: Maybe, 1909 | shipVia?: Maybe, 1910 | freight?: Maybe, 1911 | shipName?: Maybe, 1912 | shipAddress?: Maybe, 1913 | /** List of ordered products */ 1914 | details?: Maybe>>, 1915 | _id: Scalars['MongoID'], 1916 | }; 1917 | 1918 | export type UpdateByIdOrderPayload = { 1919 | __typename?: 'UpdateByIdOrderPayload', 1920 | /** Updated document ID */ 1921 | recordId?: Maybe, 1922 | /** Updated document */ 1923 | record?: Maybe, 1924 | /** The globally unique ID among all types */ 1925 | nodeId?: Maybe, 1926 | /** 1927 | * The client mutation ID used by clients like Relay to track the mutation. If 1928 | * given, returned in the response payload of the mutation. 1929 | */ 1930 | clientMutationId?: Maybe, 1931 | query?: Maybe, 1932 | }; 1933 | 1934 | export type UpdateByIdProductInput = { 1935 | /** Unique product id */ 1936 | productID?: Maybe, 1937 | name?: Maybe, 1938 | supplierID?: Maybe, 1939 | categoryID?: Maybe, 1940 | quantityPerUnit?: Maybe, 1941 | unitPrice?: Maybe, 1942 | unitsInStock?: Maybe, 1943 | unitsOnOrder?: Maybe, 1944 | reorderLevel?: Maybe, 1945 | discontinued?: Maybe, 1946 | _id: Scalars['MongoID'], 1947 | }; 1948 | 1949 | export type UpdateByIdProductPayload = { 1950 | __typename?: 'UpdateByIdProductPayload', 1951 | /** Updated document ID */ 1952 | recordId?: Maybe, 1953 | /** Updated document */ 1954 | record?: Maybe, 1955 | /** The globally unique ID among all types */ 1956 | nodeId?: Maybe, 1957 | /** 1958 | * The client mutation ID used by clients like Relay to track the mutation. If 1959 | * given, returned in the response payload of the mutation. 1960 | */ 1961 | clientMutationId?: Maybe, 1962 | query?: Maybe, 1963 | }; 1964 | 1965 | export type Viewer = { 1966 | __typename?: 'Viewer', 1967 | category?: Maybe, 1968 | categoryList?: Maybe>>, 1969 | customer?: Maybe, 1970 | customerPagination?: Maybe, 1971 | customerConnection?: Maybe, 1972 | employee?: Maybe, 1973 | employeeList?: Maybe>>, 1974 | employeePagination?: Maybe, 1975 | order?: Maybe, 1976 | orderPagination?: Maybe, 1977 | orderConnection?: Maybe, 1978 | product?: Maybe, 1979 | productList?: Maybe>>, 1980 | productPagination?: Maybe, 1981 | productConnection?: Maybe, 1982 | region?: Maybe, 1983 | regionList?: Maybe>>, 1984 | shipper?: Maybe, 1985 | shipperList?: Maybe>>, 1986 | supplier?: Maybe, 1987 | supplierConnection?: Maybe, 1988 | }; 1989 | 1990 | 1991 | export type ViewerCategoryArgs = { 1992 | filter?: Maybe, 1993 | skip?: Maybe, 1994 | sort?: Maybe 1995 | }; 1996 | 1997 | 1998 | export type ViewerCategoryListArgs = { 1999 | filter?: Maybe, 2000 | skip?: Maybe, 2001 | limit?: Maybe, 2002 | sort?: Maybe 2003 | }; 2004 | 2005 | 2006 | export type ViewerCustomerArgs = { 2007 | filter?: Maybe, 2008 | skip?: Maybe, 2009 | sort?: Maybe 2010 | }; 2011 | 2012 | 2013 | export type ViewerCustomerPaginationArgs = { 2014 | page?: Maybe, 2015 | perPage?: Maybe, 2016 | filter?: Maybe, 2017 | sort?: Maybe 2018 | }; 2019 | 2020 | 2021 | export type ViewerCustomerConnectionArgs = { 2022 | first?: Maybe, 2023 | after?: Maybe, 2024 | last?: Maybe, 2025 | before?: Maybe, 2026 | filter?: Maybe, 2027 | sort?: Maybe 2028 | }; 2029 | 2030 | 2031 | export type ViewerEmployeeArgs = { 2032 | filter?: Maybe, 2033 | skip?: Maybe, 2034 | sort?: Maybe 2035 | }; 2036 | 2037 | 2038 | export type ViewerEmployeeListArgs = { 2039 | filter?: Maybe, 2040 | skip?: Maybe, 2041 | limit?: Maybe, 2042 | sort?: Maybe 2043 | }; 2044 | 2045 | 2046 | export type ViewerEmployeePaginationArgs = { 2047 | page?: Maybe, 2048 | perPage?: Maybe, 2049 | filter?: Maybe, 2050 | sort?: Maybe 2051 | }; 2052 | 2053 | 2054 | export type ViewerOrderArgs = { 2055 | filter?: Maybe, 2056 | skip?: Maybe, 2057 | sort?: Maybe 2058 | }; 2059 | 2060 | 2061 | export type ViewerOrderPaginationArgs = { 2062 | page?: Maybe, 2063 | perPage?: Maybe, 2064 | filter?: Maybe, 2065 | sort?: Maybe 2066 | }; 2067 | 2068 | 2069 | export type ViewerOrderConnectionArgs = { 2070 | first?: Maybe, 2071 | after?: Maybe, 2072 | last?: Maybe, 2073 | before?: Maybe, 2074 | filter?: Maybe, 2075 | sort?: Maybe 2076 | }; 2077 | 2078 | 2079 | export type ViewerProductArgs = { 2080 | filter?: Maybe, 2081 | skip?: Maybe, 2082 | sort?: Maybe 2083 | }; 2084 | 2085 | 2086 | export type ViewerProductListArgs = { 2087 | filter?: Maybe, 2088 | skip?: Maybe, 2089 | limit?: Maybe, 2090 | sort?: Maybe 2091 | }; 2092 | 2093 | 2094 | export type ViewerProductPaginationArgs = { 2095 | page?: Maybe, 2096 | perPage?: Maybe, 2097 | filter?: Maybe, 2098 | sort?: Maybe 2099 | }; 2100 | 2101 | 2102 | export type ViewerProductConnectionArgs = { 2103 | first?: Maybe, 2104 | after?: Maybe, 2105 | last?: Maybe, 2106 | before?: Maybe, 2107 | filter?: Maybe, 2108 | sort?: Maybe 2109 | }; 2110 | 2111 | 2112 | export type ViewerRegionArgs = { 2113 | filter?: Maybe, 2114 | skip?: Maybe, 2115 | sort?: Maybe 2116 | }; 2117 | 2118 | 2119 | export type ViewerRegionListArgs = { 2120 | filter?: Maybe, 2121 | skip?: Maybe, 2122 | limit?: Maybe, 2123 | sort?: Maybe 2124 | }; 2125 | 2126 | 2127 | export type ViewerShipperArgs = { 2128 | filter?: Maybe, 2129 | skip?: Maybe, 2130 | sort?: Maybe 2131 | }; 2132 | 2133 | 2134 | export type ViewerShipperListArgs = { 2135 | filter?: Maybe, 2136 | skip?: Maybe, 2137 | limit?: Maybe, 2138 | sort?: Maybe 2139 | }; 2140 | 2141 | 2142 | export type ViewerSupplierArgs = { 2143 | filter?: Maybe, 2144 | skip?: Maybe, 2145 | sort?: Maybe 2146 | }; 2147 | 2148 | 2149 | export type ViewerSupplierConnectionArgs = { 2150 | first?: Maybe, 2151 | after?: Maybe, 2152 | last?: Maybe, 2153 | before?: Maybe, 2154 | filter?: Maybe, 2155 | sort?: Maybe 2156 | }; 2157 | -------------------------------------------------------------------------------- /src/apolloClient.ts: -------------------------------------------------------------------------------- 1 | import ApolloClient from 'apollo-client'; 2 | import { InMemoryCache, defaultDataIdFromObject } from 'apollo-cache-inmemory'; 3 | import { ApolloLink } from 'apollo-link'; 4 | import { HttpLink } from 'apollo-link-http'; 5 | 6 | const cache = new InMemoryCache({ 7 | dataIdFromObject: (o: any) => { 8 | switch (o.__typename) { 9 | // case 'Order': 10 | // return `Order:${o.orderID}`; 11 | // case 'Customer': 12 | // return `Customer:${o.customerID}`; 13 | // case 'CustomerAddress': { 14 | // return `CustomerAddress:${o.city}`; 15 | // } 16 | // case 'Employee': 17 | // return `Employee:${o.lastName}`; 18 | default: 19 | return defaultDataIdFromObject(o); 20 | } 21 | }, 22 | }); 23 | 24 | const httpLink = new HttpLink({ 25 | uri: process.env.REACT_APP_API_URL, 26 | fetch, 27 | credentials: 'same-origin', 28 | headers: {}, 29 | }); 30 | 31 | const link = ApolloLink.from([httpLink]); 32 | 33 | export const apolloClient = new ApolloClient({ 34 | cache, 35 | link, 36 | }); 37 | 38 | if (typeof window !== 'undefined') { 39 | (window as any).ac = apolloClient; 40 | } 41 | -------------------------------------------------------------------------------- /src/apolloClientQueryDemo.ts: -------------------------------------------------------------------------------- 1 | import { apolloClient } from './apolloClient'; 2 | import gql from 'graphql-tag'; 3 | 4 | const query = gql` 5 | query DemoQueryWithoutReact($page: Int!, $perPage: Int!) { 6 | viewer { 7 | orderPagination(page: $page, perPage: $perPage) { 8 | ...OrderList_orderPagination 9 | } 10 | } 11 | } 12 | fragment OrderList_orderPagination on OrderPagination { 13 | count 14 | items { 15 | ...OrderRow_order 16 | } 17 | pageInfo { 18 | pageCount 19 | currentPage 20 | } 21 | } 22 | fragment OrderRow_order on Order { 23 | orderID 24 | orderDate 25 | customerID 26 | employeeID 27 | employee { 28 | firstName 29 | lastName 30 | birthDate 31 | } 32 | customer { 33 | companyName 34 | orderList(limit: $perPage) { 35 | orderID 36 | } 37 | } 38 | freight 39 | } 40 | `; 41 | 42 | console.log('DocumentNode:', query); 43 | const variables = { page: 1, perPage: 5 }; 44 | apolloClient.query({ query, variables }).then((res: any) => console.log(`Result:`, res)); 45 | -------------------------------------------------------------------------------- /src/components/Menu.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Nav } from 'react-bootstrap'; 3 | import { Link } from 'react-router-dom'; 4 | 5 | export default function Menu() { 6 | return ( 7 | 28 | ); 29 | } 30 | 31 | // import React from 'react'; 32 | // import { Nav } from 'react-bootstrap'; 33 | // import { LinkContainer } from 'react-router-bootstrap'; 34 | 35 | // export const menuLinks: { [link: string]: string } = { 36 | // '/orders': 'Orders', 37 | // '/products': 'Products', 38 | // '/customers': 'Customers', 39 | // '/employees': 'Employees', 40 | // // '/categories': 'Categories', 41 | // // '/shippers': 'Shippers', 42 | // // '/suppliers': 'Suppliers', 43 | // // '/regions': 'Regions', 44 | // }; 45 | 46 | // export default class Menu extends React.Component<{}> { 47 | // render() { 48 | // return ( 49 | // 64 | // ); 65 | // } 66 | // } 67 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { createBrowserHistory } from 'history'; 4 | import App from './pages/_app'; 5 | import { apolloClient } from './apolloClient'; 6 | 7 | const history = createBrowserHistory(); 8 | 9 | ReactDOM.render( 10 | , 11 | document.getElementById('root') 12 | ); 13 | -------------------------------------------------------------------------------- /src/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { History } from 'history'; 3 | import { Container } from 'react-bootstrap'; 4 | import { Router } from 'react-router-dom'; 5 | import Menu from '../components/Menu'; 6 | import AppRoute from './_routes'; 7 | import { ApolloClient } from 'apollo-client'; 8 | import { NormalizedCacheObject } from 'apollo-cache-inmemory'; 9 | import { ApolloProvider } from '@apollo/react-components'; 10 | 11 | interface Props { 12 | history: History; 13 | apolloClient: ApolloClient; 14 | } 15 | 16 | class App extends Component { 17 | render() { 18 | const { history, apolloClient } = this.props; 19 | return ( 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | ); 29 | } 30 | } 31 | 32 | export default App; 33 | -------------------------------------------------------------------------------- /src/pages/_error.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Jumbotron } from 'react-bootstrap'; 3 | import { RouteComponentProps } from 'react-router-dom'; 4 | 5 | interface Props extends RouteComponentProps {} 6 | interface State { 7 | cnt: number; 8 | } 9 | 10 | export default class Error extends React.Component { 11 | state: State = { cnt: 404 }; 12 | 13 | onClick = () => { 14 | this.setState({ cnt: this.state.cnt + 1 }); 15 | }; 16 | 17 | render() { 18 | return ( 19 | 20 |

{this.props.location.pathname}

21 |

22 | {this.state.cnt} 23 |

24 |

Страница не найдена

25 |
26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/pages/_routes.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route, Switch } from 'react-router-dom'; 3 | import { Index } from './'; 4 | import Error from './_error'; 5 | import { OrderQuery } from './orders/OrderQuery'; 6 | import MockPage from './mock'; 7 | 8 | export default function AppRoute() { 9 | return ( 10 | 11 | 12 | 13 | 14 | {/* */} 15 | {/* */} 16 | 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /src/pages/customers/Customer.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Customer_dataFragment } from './__generated__/Customer_data'; 3 | 4 | interface Props { 5 | data: Customer_dataFragment; 6 | } 7 | 8 | export function Customer(props: Props) { 9 | const { data } = props; 10 | 11 | return ( 12 |
13 |
14 | {data.companyName} ({data.address?.city}) 15 |
16 |
17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /src/pages/customers/Customer_data.graphql: -------------------------------------------------------------------------------- 1 | fragment Customer_data on Customer { 2 | companyName 3 | address { 4 | city 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/pages/customers/__generated__/Customer_data.tsx: -------------------------------------------------------------------------------- 1 | import * as Types from '../../../__generated__/types'; 2 | 3 | import gql from 'graphql-tag'; 4 | 5 | export type Customer_dataFragment = ( 6 | { __typename: 'Customer' } 7 | & Pick 8 | & { address: Types.Maybe<( 9 | { __typename: 'CustomerAddress' } 10 | & Pick 11 | )> } 12 | ); 13 | 14 | export const Customer_dataFragmentDoc = gql` 15 | fragment Customer_data on Customer { 16 | companyName 17 | address { 18 | city 19 | } 20 | } 21 | `; -------------------------------------------------------------------------------- /src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Jumbotron } from 'react-bootstrap'; 3 | 4 | export function Index() { 5 | return ( 6 |
7 | 8 |
9 |
10 |
11 |

12 | Northwind data explorer via GraphQL 13 |
14 |

15 |
16 |

17 | This is a true story. The events depicted took place in Northwind company in{' '} 18 | 1996-1998. At the request of the survivors, the names have been changed. Out of 19 | respect for the dead, the rest has been told exactly as it occurred. 20 |

21 |

© Fargo

22 |
23 |
24 |
25 | 26 | 36 | 37 |
38 |

🛑 NOTICE

39 | __generated__ folders should be added to .gitignore file. It's bad 40 | to keep generated files in repo because it complicates code review. You need to generate 41 | files everytime before you build or start app in watch mode. In this repo I keep generated 42 | files only for demo purposes! 43 |
44 |
45 | ); 46 | } 47 | -------------------------------------------------------------------------------- /src/pages/mock/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ApolloClient from 'apollo-client'; 3 | import { InMemoryCache } from 'apollo-cache-inmemory'; 4 | import { ApolloLink } from 'apollo-link'; 5 | import { HttpLink } from 'apollo-link-http'; 6 | 7 | import gqlMock from 'graphql-tag'; 8 | import { useEffect, useState } from 'react'; 9 | 10 | // More docs can be found here 11 | // https://www.apollographql.com/docs/react/development-testing/client-schema-mocking/ 12 | 13 | // example data 14 | const authors = [ 15 | { id: 1, firstName: 'Tom', lastName: 'Coleman', __typename: 'Author' }, 16 | { id: 2, firstName: 'Sashko', lastName: 'Stubailo', __typename: 'Author' }, 17 | { id: 3, firstName: 'Mikhail', lastName: 'Novikov', __typename: 'Author' }, 18 | ]; 19 | 20 | const posts = [ 21 | { id: 1, authorId: 1, title: 'Introduction to GraphQL', votes: 2, __typename: 'Post' }, 22 | { id: 2, authorId: 2, title: 'Welcome to Meteor', votes: 3, __typename: 'Post' }, 23 | { id: 3, authorId: 2, title: 'Advanced GraphQL', votes: 1, __typename: 'Post' }, 24 | { id: 4, authorId: 3, title: 'Launchpad is Cool', votes: 7, __typename: 'Post' }, 25 | ]; 26 | 27 | export const typeDefs = gqlMock` 28 | type Author { 29 | id: Int! 30 | firstName: String 31 | lastName: String 32 | """ 33 | the list of Posts by this author 34 | """ 35 | posts: [Post] 36 | } 37 | type Post { 38 | id: Int! 39 | title: String 40 | authorId: Int 41 | author: Author 42 | votes: Int 43 | } 44 | 45 | # the schema allows the following query: 46 | extend type Query { 47 | posts: [Post] 48 | author(id: Int!): Author 49 | } 50 | `; 51 | 52 | export const resolvers = { 53 | Query: { 54 | posts: () => posts, 55 | author: (_: any, { id }: { id: number }) => authors.find((e) => e.id === id), 56 | }, 57 | Author: { 58 | posts: (author: { id: number }) => posts.filter((e) => e.authorId === author.id), 59 | }, 60 | Post: { 61 | author: (post: { authorId: number }) => authors.find((e) => e.id === post.authorId), 62 | }, 63 | }; 64 | 65 | const gqlClient = new ApolloClient({ 66 | cache: new InMemoryCache(), 67 | typeDefs, 68 | resolvers, 69 | link: ApolloLink.from([ 70 | new HttpLink({ 71 | uri: 'https://graphql-compose.herokuapp.com/northwind', 72 | }), 73 | ]), 74 | }); 75 | 76 | export default function MockPage() { 77 | const [data, setData] = useState('Loading'); 78 | useEffect(() => { 79 | const operation = gqlMock` 80 | query MockQuery { 81 | posts @client { 82 | __typename 83 | title 84 | authorId 85 | author { firstName } 86 | } 87 | } 88 | `; 89 | gqlClient.query({ query: operation }).then((r) => { 90 | setData(JSON.stringify(r, null, 2)); 91 | }); 92 | }, []); 93 | 94 | return
{data}
; 95 | } 96 | -------------------------------------------------------------------------------- /src/pages/orders/OrderList.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Pagination } from 'react-bootstrap'; 3 | import { OrderRow } from './OrderRow'; 4 | import { OrderList_paginationFragment } from './__generated__/OrderList_pagination'; 5 | 6 | interface Props { 7 | pagination: OrderList_paginationFragment; 8 | onSetPage: (page: number) => any; 9 | } 10 | 11 | export function OrderList(props: Props) { 12 | const setPage = (page: number) => { 13 | const { onSetPage } = props; 14 | if (onSetPage) onSetPage(page); 15 | }; 16 | 17 | const { pagination } = props; 18 | const { count } = pagination; 19 | const { pageCount, currentPage } = pagination.pageInfo; 20 | 21 | if (!pagination || !pagination.items) { 22 | return
No data
; 23 | } 24 | 25 | return ( 26 |
27 |

Orders: {count}

28 | {pagination.items.map((order, i) => { 29 | if (!order) return
Empty element
; 30 | return ; 31 | })} 32 | 33 | 34 | {[...Array(pageCount)].map((_, i) => { 35 | return ( 36 | { 40 | setPage(i + 1); 41 | }} 42 | > 43 | {i + 1} 44 | 45 | ); 46 | })} 47 | 48 |
49 | ); 50 | } 51 | -------------------------------------------------------------------------------- /src/pages/orders/OrderList_pagination.graphql: -------------------------------------------------------------------------------- 1 | fragment OrderList_pagination on OrderPagination { 2 | count 3 | items { 4 | ...OrderRow_order 5 | } 6 | pageInfo { 7 | pageCount 8 | currentPage 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/pages/orders/OrderQuery.graphql: -------------------------------------------------------------------------------- 1 | query OrderListQuery($page: Int!, $perPage: Int!) { 2 | viewer { 3 | orderPagination(page: $page, perPage: $perPage) { 4 | ...OrderList_pagination 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/orders/OrderQuery.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { RouteComponentProps } from 'react-router-dom'; 3 | import qs from 'qs'; 4 | import { useOrderListQuery } from './__generated__/OrderQuery'; 5 | import { OrderList } from './OrderList'; 6 | 7 | interface Props extends RouteComponentProps {} 8 | 9 | export function OrderQuery(props: Props) { 10 | const setPage = (page: number) => { 11 | const { search } = props.location; 12 | const query = qs.parse(search, { ignoreQueryPrefix: true }) || {}; 13 | 14 | props.history.push({ 15 | search: qs.stringify({ ...query, page }), 16 | }); 17 | }; 18 | 19 | const { search } = props.location; 20 | const query = qs.parse(search, { ignoreQueryPrefix: true }) || {}; 21 | const page = parseInt(query.page, 10) || 1; 22 | const perPage = parseInt(query.perPage, 10) || 10; 23 | 24 | const { error, loading, data } = useOrderListQuery({ 25 | variables: { 26 | page, 27 | perPage, 28 | }, 29 | }); 30 | 31 | if (loading) return
Loading...
; 32 | if (error) return
Error: {error.message}
; 33 | if (data && data.viewer && data.viewer.orderPagination) { 34 | return ; 35 | } 36 | 37 | return null; 38 | } 39 | -------------------------------------------------------------------------------- /src/pages/orders/OrderRow.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { OrderRow_orderFragment } from './__generated__/OrderRow_order'; 3 | import { Customer } from '../customers/Customer'; 4 | 5 | interface Props { 6 | order: OrderRow_orderFragment; 7 | } 8 | 9 | export function OrderRow(props: Props) { 10 | const { order } = props; 11 | const { employee } = order; 12 | 13 | return ( 14 |
15 |
16 |
{order.orderID}
17 |
{order.customer && }
18 | {employee && ( 19 |
20 | {employee.firstName} {employee.lastName} (id:{order.employeeID}) 21 |
22 | )} 23 |
{`${order.orderDate || ''}`.substr(0, 10)}
24 |
{order.freight}
25 |
26 |
27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /src/pages/orders/OrderRow_order.graphql: -------------------------------------------------------------------------------- 1 | fragment OrderRow_order on Order { 2 | orderID 3 | orderDate 4 | customerID 5 | employeeID 6 | employee { 7 | firstName 8 | lastName 9 | birthDate 10 | } 11 | customer { 12 | ...Customer_data 13 | } 14 | freight 15 | } 16 | -------------------------------------------------------------------------------- /src/pages/orders/__generated__/OrderList_pagination.tsx: -------------------------------------------------------------------------------- 1 | import * as Types from '../../../__generated__/types'; 2 | 3 | import { OrderRow_orderFragmentDoc, OrderRow_orderFragment } from './OrderRow_order'; 4 | import gql from 'graphql-tag'; 5 | 6 | 7 | export type OrderList_paginationFragment = ( 8 | { __typename: 'OrderPagination' } 9 | & Pick 10 | & { items: Types.Maybe>>, pageInfo: ( 14 | { __typename: 'PaginationInfo' } 15 | & Pick 16 | ) } 17 | ); 18 | 19 | export const OrderList_paginationFragmentDoc = gql` 20 | fragment OrderList_pagination on OrderPagination { 21 | count 22 | items { 23 | ...OrderRow_order 24 | } 25 | pageInfo { 26 | pageCount 27 | currentPage 28 | } 29 | } 30 | ${OrderRow_orderFragmentDoc}`; -------------------------------------------------------------------------------- /src/pages/orders/__generated__/OrderQuery.tsx: -------------------------------------------------------------------------------- 1 | import * as Types from '../../../__generated__/types'; 2 | 3 | import { OrderList_paginationFragmentDoc, OrderList_paginationFragment } from './OrderList_pagination'; 4 | import gql from 'graphql-tag'; 5 | import * as React from 'react'; 6 | import * as ApolloReactCommon from '@apollo/react-common'; 7 | import * as ApolloReactComponents from '@apollo/react-components'; 8 | import * as ApolloReactHooks from '@apollo/react-hooks'; 9 | export type Omit = Pick>; 10 | 11 | 12 | export type OrderListQueryVariables = { 13 | page: Types.Scalars['Int'], 14 | perPage: Types.Scalars['Int'] 15 | }; 16 | 17 | 18 | export type OrderListQuery = ( 19 | { __typename: 'Query' } 20 | & { viewer: Types.Maybe<( 21 | { __typename: 'Viewer' } 22 | & { orderPagination: Types.Maybe<( 23 | { __typename: 'OrderPagination' } 24 | & OrderList_paginationFragment 25 | )> } 26 | )> } 27 | ); 28 | 29 | 30 | export const OrderListQueryDocument = gql` 31 | query OrderListQuery($page: Int!, $perPage: Int!) { 32 | viewer { 33 | orderPagination(page: $page, perPage: $perPage) { 34 | ...OrderList_pagination 35 | } 36 | } 37 | } 38 | ${OrderList_paginationFragmentDoc}`; 39 | export type OrderListQueryComponentProps = Omit, 'query'> & ({ variables: OrderListQueryVariables; skip?: boolean; } | { skip: boolean; }); 40 | 41 | export const OrderListQueryComponent = (props: OrderListQueryComponentProps) => ( 42 | query={OrderListQueryDocument} {...props} /> 43 | ); 44 | 45 | 46 | /** 47 | * __useOrderListQuery__ 48 | * 49 | * To run a query within a React component, call `useOrderListQuery` and pass it any options that fit your needs. 50 | * When your component renders, `useOrderListQuery` returns an object from Apollo Client that contains loading, error, and data properties 51 | * you can use to render your UI. 52 | * 53 | * @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; 54 | * 55 | * @example 56 | * const { data, loading, error } = useOrderListQuery({ 57 | * variables: { 58 | * page: // value for 'page' 59 | * perPage: // value for 'perPage' 60 | * }, 61 | * }); 62 | */ 63 | export function useOrderListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { 64 | return ApolloReactHooks.useQuery(OrderListQueryDocument, baseOptions); 65 | } 66 | export function useOrderListQueryLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { 67 | return ApolloReactHooks.useLazyQuery(OrderListQueryDocument, baseOptions); 68 | } 69 | export type OrderListQueryHookResult = ReturnType; 70 | export type OrderListQueryLazyQueryHookResult = ReturnType; 71 | export type OrderListQueryQueryResult = ApolloReactCommon.QueryResult; -------------------------------------------------------------------------------- /src/pages/orders/__generated__/OrderRow_order.tsx: -------------------------------------------------------------------------------- 1 | import * as Types from '../../../__generated__/types'; 2 | 3 | import { Customer_dataFragmentDoc, Customer_dataFragment } from '../../customers/__generated__/Customer_data'; 4 | import gql from 'graphql-tag'; 5 | 6 | 7 | export type OrderRow_orderFragment = ( 8 | { __typename: 'Order' } 9 | & Pick 10 | & { employee: Types.Maybe<( 11 | { __typename: 'Employee' } 12 | & Pick 13 | )>, customer: Types.Maybe<( 14 | { __typename: 'Customer' } 15 | & Customer_dataFragment 16 | )> } 17 | ); 18 | 19 | export const OrderRow_orderFragmentDoc = gql` 20 | fragment OrderRow_order on Order { 21 | orderID 22 | orderDate 23 | customerID 24 | employeeID 25 | employee { 26 | firstName 27 | lastName 28 | birthDate 29 | } 30 | customer { 31 | ...Customer_data 32 | } 33 | freight 34 | } 35 | ${Customer_dataFragmentDoc}`; -------------------------------------------------------------------------------- /src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "module": "esnext", 16 | "moduleResolution": "node", 17 | "resolveJsonModule": true, 18 | "isolatedModules": true, 19 | "noEmit": true, 20 | "jsx": "preserve" 21 | }, 22 | "include": [ 23 | "src" 24 | ] 25 | } 26 | --------------------------------------------------------------------------------