https://www.prisma.io/ logo
Join Slack
Powered by
# orm-help
  • e

    Ehsan Sarshar

    10/28/2019, 2:32 PM
    đŸ˜« 1
  • a

    Andres Montoya

    10/28/2019, 3:51 PM
    Hello, when will be the release date of Prisma 2? 🐙
    👀 2
  • k

    Khoa Huynh

    10/29/2019, 12:37 AM
    hey, can we use Mongodb Connector without docker?
  • m

    Maxim Ignatev

    10/29/2019, 2:46 AM
    Hello guys. Now trying to implement online/offline status for users in my chat app Here is the code. I run
    photon.update
    when establishing a websocket connection (im using
    graphql-yoga
    ) but db doesn’t get updated What should I do in this situation?
    h
    • 2
    • 2
  • b

    Basix

    10/29/2019, 4:15 AM
    Can I add other collaborators on my workspace on Prisma Cloud?
  • b

    Basix

    10/29/2019, 4:19 AM
    + Is it okay to use camel_case in datamodel field names?
  • i

    isemaj

    10/29/2019, 5:15 AM
    My datamodel is set as
    Copy code
    type Board {
     id: ID! @id
     list: [List!]! @relation(link: INLINE)
    }
    
    type List {
     id: ID! @id
     board: [Board!]! 
    }
    querying the
    Board
    the
    list
    field will contain only with `id`s but how can I resolve it with the actual document which is the `List`s not the `id`s. my query looks like
    Copy code
    prisma.boards();
    I'm using mongodb.
    h
    • 2
    • 2
  • k

    karafizi.arthur

    10/29/2019, 8:02 AM
    Hi guys. I’m working on the project with graphcool inside. And I want to rewrite it to Prisma. So when I’m trying to run
    prisma introspect
    on the graphcool’s mysql docker container I have an error
    'ECONNREFUSED': connect ECONNREFUSED 127.0.0.1:3306
    . Is anyone knows what the reason of that?
    r
    n
    • 3
    • 3
  • a

    Adilet

    10/29/2019, 5:11 PM
    How to see all photon findMany "where" options?
    h
    • 2
    • 2
  • a

    anyhowstep

    10/29/2019, 5:46 PM
    https://github.com/prisma/lift/blob/master/src/types.ts#L20 Are the only primitive types really just string, int, float, boolean? Seems like it's missing bytea/blob, Date, Decimal, among others
    n
    g
    m
    • 4
    • 35
  • e

    Evan Sparkman

    10/29/2019, 8:35 PM
    super noob question
  • e

    Evan Sparkman

    10/29/2019, 8:36 PM
    how do i set a query variable in graphql playground?
    r
    • 2
    • 5
  • r

    Robert Lemiesz

    10/29/2019, 8:46 PM
    Does anyone have an example of how to use fragments with graphql-request https://github.com/prisma-labs/graphql-request
  • a

    Andres Montoya

    10/30/2019, 1:20 AM
    Hello, How can I filter the users among channels with graphql subscriptions? For example in the channel "private-chat-123456" there are 5 users, in the "private-chat-654421" there are 10 users, how can I do this? Instead of having a single channel like "private-chat" and do all there... I don't know if I'm clear...
  • i

    isemaj

    10/30/2019, 3:50 AM
    Hi, I would like to know why it always need to use fragment when getting value stored on other type (collection in mongodb) connected via
    @relation
    ? Example
    Copy code
    type Board {
      id: ID! @id
      boardTitle: String!
      boardDescription: String!
      createdBy: User! @relation(name: "UsersBoard" link: INLINE)
    }
    
    type User {
      id: ID! @id
      name: String!
      boards: [Board!]! @relation(name: "UsersBoard")
    }
    Running
    prisma.boards()
    will return boards with
    boardTitle
    and
    boardDescription
    but not including the
    createdBy
    field. In order to include it I have to use fragment:
    Copy code
    const fragment = `
      fragment BoardWithCreator on Board {
        id
        boardId
        boardTitle
        boardDescription
        createdBy {
          name
        }
      }
    `;
    
    prisma.boards().$fragment(fragment);
    And that will return boards with
    createdBy
    field. And is there any other way to include
    createdBy
    field without using fragment?
  • m

    Med

    10/30/2019, 4:20 AM
    Hello I had a question I currently have a project that is my server / backend and uses prisma2. I'm also working on another project which is my react frontend. How can I use the generated photon client in my react app. I tried copying the
    @generated/photon
    to my other project and then importing it. but it can't find it and import it properly:
    Copy code
    import { Photon } from './../photon'
    const photon = new Photon()
    I get the error:
    does not contain an export named 'Photon'.
  • j

    Jovaanc

    10/30/2019, 9:12 AM
    Hello everyone, I need your help... I would like to call a function from my resolver when I launch my server but I have an error:
  • j

    Jovaanc

    10/30/2019, 9:12 AM
    Sans titre
  • j

    Jovaanc

    10/30/2019, 9:13 AM
    Sans titre
  • j

    Jovaanc

    10/30/2019, 9:13 AM
    My function in resolvers.js
  • j

    Jovaanc

    10/30/2019, 9:15 AM
    This is Apollo Server
  • s

    Siva Karthikeyan Krishnan

    10/30/2019, 9:30 AM
    Any link available for deploying graphql+prisma with AWS
  • s

    Siva Karthikeyan Krishnan

    10/30/2019, 9:30 AM
    ?
  • j

    Jovaanc

    10/30/2019, 9:34 AM
    https://www.prisma.io/tutorials/deploy-prisma-to-aws-fargate-ct14
  • s

    Siva Karthikeyan Krishnan

    10/30/2019, 9:39 AM
    Thanks Jovaanc. Prisma getting deployed without any issues, but how do we go about Graphql to access the Mutations?
  • h

    Hlm

    10/30/2019, 9:56 AM
    Hey I am using Prisma (v1) and am trying to use the generated client in react-native, but run into errors in the prisma-client-lib. I see an open pull request that should fix this issue, is there any news on this?
    h
    • 2
    • 1
  • h

    Hlm

    10/30/2019, 9:57 AM
    error I am receiving is: `error: bundling failed: Error: Unable to resolve module
    os
    from `node_modules/prisma-client-lib/dist/codegen/generators/flow-client.js`: os could not be found within the project.`
  • d

    deactivateduser

    10/30/2019, 4:16 PM
    I'm using the Prisma Client (TypeScript). I want to add ~500 records to my database -- is there not an option to insert many items into the database? Do I have to iterate instead?
    h
    a
    • 3
    • 6
  • m

    Maxim Ignatev

    10/30/2019, 5:14 PM
    hey guys. trying to return a number representing
    count
    from my resolver when printing in console it’s all good when quering it in graphql playfround i get
    null
    anyone know what might be the problem?
    r
    • 2
    • 5
  • n

    Nasser Alsaeed

    10/30/2019, 6:40 PM
    C:\Users\Home\OneDrive\Graphql\examples> yarn prisma2 dev yarn run v1.19.1 warning package.json: No license field $ C:\Users\Home\OneDrive\Graphql\examples\node_modules\.bin\prisma2 dev Error: Schema parsing thread 'main' panicked at 'Failed lookup of model or field during internal processing. This means that the internal representation was mutated incorrectly.', src\libcore\option.rs:1190:5 stack backtrace: 0: backtrace:backtracedbghelp:trace at C\Users\VssAdministrator\.cargo\registry\src\github.com 1ecc6299db9ec823\backtrace 0.3.37\src\backtrace/dbghelp.rs88 1: backtrace:backtrace:trace_unsynchronized at C\Users\VssAdministrator\.cargo\registry\src\github.com 1ecc6299db9ec823\backtrace 0.3.37\src\backtrace/mod.rs66 2: std:sys commonbacktrace:_print_fmt at src\libstd\sys_common/backtrace.rs:76 3: <std:sys commonbacktrace print:DisplayBacktrace as core:fmtDisplay&gt;:fmt at src\libstd\sys_common/backtrace.rs:60 4: core:fmt:write at src\libcore\fmt/mod.rs:1030 5: std:ioWrite:write_fmt at src\libstd\io/mod.rs:1412 6: std:sys commonbacktrace:_print at src\libstd\sys_common/backtrace.rs:64 7: std:sys commonbacktrace:print at src\libstd\sys_common/backtrace.rs:49 8: std:panickingdefault hook:{{closure}} at src\libstd/panicking.rs:196 9: std:panicking:default_hook at src\libstd/panicking.rs:210 10: std:panicking:rust_panic_with_hook at src\libstd/panicking.rs:473 11: std:panicking:continue_panic_fmt at src\libstd/panicking.rs:380 12: rust_begin_unwind at src\libstd/panicking.rs:307 13: core:panicking:panic_fmt at src\libcore/panicking.rs:85 14: core:option:expect_failed at src\libcore/option.rs:1190 15: datamodel:validatorstandardiseStandardiser:standardise 16: datamodel:validatorvalidation pipelineValidationPipeline:validate 17: datamodel::parse_datamodel_with_sources 18: datamodel::parse_datamodel 19: <core:resultResult&lt;coreoptionOption&lt;T&gt;,prismaerror:PrismaError> as prisma:data model loaderPrismaResultOption&lt;T&gt;&gt;:inner_map 20: prisma:data model loader:load_data_model_components 21: prisma:cliCliCommand:execute 22: prisma::main 23: std:rtlang start:{{closure}} 24: std:rtlang start internal:{{closure}} at src\libstd/rt.rs:49 25: std:panickingtry:do_call at src\libstd/panicking.rs:292 26: __rust_maybe_catch_panic at src\libpanic_unwind/lib.rs:80 27: std:panicking:try at src\libstd/panicking.rs:271 28: std:panic:catch_unwind at src\libstd/panic.rs:394 29: std:rt:lang_start_internal at src\libstd/rt.rs:48 30: main 31: _tmainCRTStartup 32: mainCRTStartup 33: sqlite3GenerateConstraintChecks 34: sqlite3GenerateConstraintChecks note: Some details are omitted, run with
    RUST_BACKTRACE=full
    for a verbose backtrace. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    g
    • 2
    • 1
1...326327328...637Latest