danlannz
10/22/2019, 12:58 AMprisma2 generateZane Helton
10/22/2019, 1:06 AMprisma2 generateyarn devZane Helton
10/22/2019, 1:06 AMZane Helton
10/22/2019, 1:12 AMprisma2 generatenpm rebuildZane Helton
10/22/2019, 1:13 AMCorey Snyder
10/22/2019, 1:51 AM@scalarList(strategy: RELATION)supportedBoardSizes: [BoardSizes] @scalarList(strategy: RELATION)setupdatedProduct.supportedBoardSizes = {
    set: [...updatedProduct.supportedBoardSizes]
}boardSizes: [boardSize1, boardSize2, boardSize3]david calcus
10/22/2019, 9:27 AMtype Organisation {
 subOrganisations: [Organisation!] @relation(name: "OrganisationSubOrganisations")
  parentOrganisation: Organisation @relation(name: "OrganisationSubOrganisations")
}Loka
10/22/2019, 1:19 PMMaciek K
10/22/2019, 1:20 PMLoka
10/22/2019, 1:37 PMMaxim Ignatev
10/22/2019, 3:14 PMRashmi Bidanta
10/22/2019, 3:17 PMprisma2 init10.14.2Rashmi Bidanta
10/22/2019, 3:17 PM➜  pocs prisma2 init hello-prisma
Preparing your starter kit: GraphQL API
✔  Downloading the starter kit from GitHub ...
✔  Extracting content to hello-prisma ...
⠏  Installing dependencies with: `npm install` ...
4  Preparing your database ...
5  Seeding your database with: `npm run seed` ...
 ERROR  Error during command execution
npm WARN deprecated @types/graphql@14.5.0: This is a stub types definition. graphql provides its own type definitions, so you do not need this installed.
npm WARN deprecated apollo-upload-server@7.1.0: Please migrate to <https://npm.im/graphql-upload> (see <https://git.io/fADhl>).
sh: yarn: command not found
npm WARN graphql-playground-middleware-lambda@1.7.12 requires a peer of aws-lambda@^0.1.2 but none is installed. You must install peer dependencies yourself.
npm WARN graphql-subscriptions@0.5.8 requires a peer of graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN apollo-server-core@1.4.0 requires a peer of graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN apollo-cache-control@0.1.1 requires a peer of graphql@0.10.x - 0.13.x but none is installed. You must install peer dependencies yourself.
npm WARN apollo-tracing@0.1.4 requires a peer of graphql@0.10.x - 0.13.x but none is installed. You must install peer dependencies yourself.
npm WARN graphql-extensions@0.0.10 requires a peer of graphql@0.10.x - 0.13.x but none is installed. You must install peer dependencies yourself.
npm WARN typescript-graphql@ No repository field.
npm WARN typescript-graphql@ No license field.
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @prisma/sdk@0.0.20 postinstall: `yarn download`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @prisma/sdk@0.0.20 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/rbidanta/.npm/_logs/2019-10-22T15_12_34_461Z-debug.logRashmi Bidanta
10/22/2019, 3:17 PMRicco
10/22/2019, 3:25 PMRashmi Bidanta
10/22/2019, 3:28 PMsqllitestarter kitprisma2 init hello-prismaRashmi Bidanta
10/22/2019, 3:30 PMRicco
10/22/2019, 3:36 PMZane Helton
10/22/2019, 5:41 PM2.0.0-preview015Zane Helton
10/22/2019, 6:23 PMZane Helton
10/22/2019, 6:23 PM$ yarn prisma2 dev
yarn run v1.19.0
$ /Users/zane/repos/project/mono-repo/node_modules/.bin/prisma2 dev
thread 'main' panicked at 'Did not find a relation for those for model OrganizationOrganization and field superorganizationId', src/libcore/option.rs:1034:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::continue_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::option::expect_failed
   9: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  10: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  11: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  12: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  13: prisma_models::datamodel_converter::DatamodelConverter::convert
  14: prisma::data_model_loader::load_data_model_components
  15: prisma::main
  16: std::rt::lang_start::{{closure}}
  17: std::panicking::try::do_call
  18: __rust_maybe_catch_panic
  19: std::rt::lang_start_internal
  20: main
Error: process exited with a non-zero code: 101
thread 'main' panicked at 'Did not find a relation for those for model OrganizationOrganization and field superorganizationId', src/libcore/option.rs:1034:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::continue_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::option::expect_failed
   9: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  10: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  11: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  12: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  13: prisma_models::datamodel_converter::DatamodelConverter::convert
  14: prisma::data_model_loader::load_data_model_components
  15: prisma::main
  16: std::rt::lang_start::{{closure}}
  17: std::panicking::try::do_call
  18: __rust_maybe_catch_panic
  19: std::rt::lang_start_internal
  20: main
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.Zane Helton
10/22/2019, 6:36 PM$ yarn prisma2 dev
yarn run v1.19.0
$ /Users/zane/repos/project/mono-repo/node_modules/.bin/prisma2 dev
thread 'main' panicked at 'Did not find a relation for those for model User and field createdOrder', src/libcore/option.rs:1034:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::continue_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::option::expect_failed
   9: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  10: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  11: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  12: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  13: prisma_models::datamodel_converter::DatamodelConverter::convert
  14: prisma::data_model_loader::load_data_model_components
  15: prisma::main
  16: std::rt::lang_start::{{closure}}
  17: std::panicking::try::do_call
  18: __rust_maybe_catch_panic
  19: std::rt::lang_start_internal
  20: main
Error: process exited with a non-zero code: 101
thread 'main' panicked at 'Did not find a relation for those for model User and field createdOrder', src/libcore/option.rs:1034:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::continue_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::option::expect_failed
   9: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  10: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  11: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  12: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  13: prisma_models::datamodel_converter::DatamodelConverter::convert
  14: prisma::data_model_loader::load_data_model_components
  15: prisma::main
  16: std::rt::lang_start::{{closure}}
  17: std::panicking::try::do_call
  18: __rust_maybe_catch_panic
  19: std::rt::lang_start_internal
  20: main
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.Zane Helton
10/22/2019, 6:44 PMmodel Order {
    creator       User?   @map("creatorId") @relation("OrderCreatorToUserOrder")
}
model User {
    createdOrders Order[] @relation("OrderCreatorToUserOrder")
}Zane Helton
10/22/2019, 7:12 PMprisma2 devyarn devsrc/server.tsxiaoqf10
10/23/2019, 10:53 AMRashmi Bidanta
10/23/2019, 1:05 PMRashmi Bidanta
10/23/2019, 1:05 PMCategorySchema.prismaRashmi Bidanta
10/23/2019, 1:06 PMschema.tsconst Category = objectType({
  name: 'Category',
  definition(t) {
    t.model.id()
    t.model.name()
    t.model.posts({
      pagination: false,
    })
  },
})Rashmi Bidanta
10/23/2019, 1:08 PMProperty 'id' does not exist on type '<CustomTypeName extends "User" | "Post">(typeName: CustomTypeName) => NexusPrismaMethods[CustomTypeName]'.Rashmi Bidanta
10/23/2019, 1:09 PM