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

    Max Klammer

    03/07/2019, 6:58 PM
    Hi! Can somebody please point me in the right direction? I am fairly new to GraphQL/Prisma and I have question on my mind that I could not resolve for myself 🤔😬 I have client that has been asking us to create a sort of middle ware to to abstract away his legacy systems. He wants to give his Franchisees a nice API to connect to to get their data. In this middleware we have to export large sets of data (like a product catalog) from one backend system to the next. Does it make sense to create a Prisma/GraphQL middleware fore this? I just need a hint where I can go look for answers 🙏 Thank you so much
    j
    • 2
    • 2
  • c

    cfree

    03/07/2019, 7:03 PM
    How do I get my IP unblocked?
  • n

    Nishant

    03/07/2019, 8:04 PM
    Hi can anyone tell me if we have an option to turn on verbose logging of queries on prisma?
  • j

    jangerhofer

    03/07/2019, 8:57 PM
    @Nishant If you mean logging of Prisma Client queries, the option you're looking for is
    debug
    in the Client constructor, per: https://www.prisma.io/docs/prisma-client/setup/constructor-JAVASCRIPT-rsc4/
    n
    • 2
    • 8
  • m

    Meow

    03/07/2019, 10:34 PM
    Any updates on MySQL 8 support? I see release 1.28.0 moved to the mysql 2 client and fixed lower/upper case issues with mysql8… has any one tested the latest Prisma with MySQL 8?
    s
    c
    • 3
    • 3
  • c

    Cristian

    03/08/2019, 2:53 AM
    Does anyone know how to change the UTC timezone for the Prisma server? I need to use Pacific/Auckland
    c
    • 2
    • 3
  • s

    Siddhant

    03/08/2019, 4:09 AM
    Getting this error for prisma deploy on demo server project
  • c

    Carl Foster

    03/08/2019, 4:57 AM
    So what's happening with server-side subscriptions? I want to be able to publish mutation events on the DB onto an event stream so that other consumers can do stuff with that... It seems like there were some docs on doing that in the past, but now it's all gone. I've looked for decision logs on this too but can't seem to find anything. What's the go?
    g
    • 2
    • 1
  • c

    Cihad Turhan

    03/08/2019, 7:59 AM
    What is prisma-way of calculation of a leaderboard. For a leaderboard, you should know each player's earned points and sort them according to earned points. Those points should be the total points of challenges completed by player. However, prisma doesn't have
    sum
    aggregation which makes impossible to generate a leaderboard.
  • c

    Chris Fuller

    03/08/2019, 11:27 AM
    Sorry if this has been asked before. What is the best way to do integration testing using Nexus? Ideally something in the form
    Copy code
    import { makeSchema } from 'nexus';
    import * as allTypes from './typeDefs';
    import { graphql } from 'graphql';
    
    export const schema = makeSchema({
      types: allTypes,
    });
    
    const query = `{ __schema { types { name } } }`;
    
    graphql(schema, query).then(response => {
      console.log(util.inspect(response, { showHidden: false, depth: null }));
    });
    Thanks in advance 🙂
  • h

    hadi

    03/08/2019, 2:12 PM
    Hello all, can someone help me with this error in VS code ? I thought the createdAt & updatedAt are automatically filled
    j
    m
    • 3
    • 20
  • a

    abdullah almesbahi

    03/08/2019, 2:27 PM
    I have an existing mysql with these instructions and there are a lot of data inside it CREATE TABLE
    am_user
    (
    user_id
    int(10) unsigned NOT NULL AUTO_INCREMENT,
    login
    varchar(64) NOT NULL,
    pass
    varchar(64) DEFAULT NULL,
    remember_key
    varchar(40) DEFAULT NULL,
    pass_dattm
    datetime DEFAULT NULL,
    email
    varchar(64) DEFAULT NULL,
    name_f
    varchar(64) NOT NULL,
    name_l
    varchar(64) NOT NULL,
    street
    varchar(255) DEFAULT NULL,
    street2
    varchar(255) DEFAULT NULL,
    city
    varchar(255) DEFAULT NULL,
    state
    varchar(255) DEFAULT NULL,
    zip
    varchar(255) DEFAULT NULL,
    country
    varchar(255) DEFAULT NULL,
    phone
    varchar(255) DEFAULT NULL,
    added
    datetime DEFAULT NULL,
    remote_addr
    varchar(39) DEFAULT NULL,
    user_agent
    varchar(255) DEFAULT NULL,
    saved_form_id
    int(10) unsigned DEFAULT NULL,
    status
    smallint(6) NOT NULL DEFAULT '0',
    unsubscribed
    tinyint(4) NOT NULL DEFAULT '0',
    lang
    varchar(32) DEFAULT NULL,
    i_agree
    tinyint(4) DEFAULT '0',
    is_approved
    tinyint(4) DEFAULT '1',
    is_locked
    tinyint(4) DEFAULT '0',
    disable_lock_until
    datetime DEFAULT NULL,
    reseller_id
    int(11) DEFAULT NULL,
    comment
    text,
    tax_id
    varchar(255) DEFAULT NULL,
    last_login
    datetime DEFAULT NULL,
    last_ip
    varchar(39) DEFAULT NULL,
    last_user_agent
    varchar(255) DEFAULT NULL,
    last_session
    varchar(32) DEFAULT NULL,
    aff_id
    int(10) unsigned DEFAULT NULL,
    aff_added
    datetime DEFAULT NULL,
    is_affiliate
    tinyint(4) DEFAULT NULL,
    aff_payout_type
    varchar(32) DEFAULT NULL, PRIMARY KEY (
    user_id
    ), UNIQUE KEY
    login
    (
    login
    ), KEY
    email
    (
    email
    ), KEY
    country
    (`country`(3)), KEY
    state
    (`state`(191)) ) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4; is there any solution to auto generate datamodel.graphql from existing mysql ? it going to save me a lot of time I also see prisma using CamelCase for table name and fields is possible to re-map fields and table in datamodel.graphql without changing it in mysql? like table am_user to User and field user_id to id
  • j

    Jorge

    03/08/2019, 4:45 PM
    what do you recommend more for prisma server? heroku, digital ocean or other?
    j
    • 2
    • 2
  • r

    Robert

    03/08/2019, 4:55 PM
    Is it possible to connect Prisma (Prisma-graphql) to Wordpress? I’ve been teaching myself GraphQL using Prisma -- very much a beginner at both. I just got a programming test where the brief is to connect a React Native frontend to a WordPress backend. I thought this might be a fun opportunity to put some Prisma and GraphQL into practice. My thought was to connect Prisma to the WP MySQL DB and then use Prisma-GraphQL to connect to React Native. However, it seems that connecting Prisma to MySQL isn’t so straightforward -- at least for me, a beginner. I’d welcome any info as to how one might go about this -- not detailed code, of course, but more whether it’s reasonable to do what I’m thinking of, and what packages/route would be the best way forward. Thanks!
  • s

    Stephen Jensen

    03/08/2019, 5:41 PM
    Robert, one of the supported databases is MySQL so you’d be okay with that connector piece of it at least. Prisma would create tables based on the modelds that you defined in your schema
    r
    j
    • 3
    • 2
  • j

    José Gomes

    03/08/2019, 6:02 PM
    Hey guys. Can someone tell me if is possible do have multiple schemas with prima?
  • l

    lawjolla

    03/08/2019, 7:14 PM
    With
    prisma-nexus
    , how do you expose enums?
    w
    • 2
    • 10
  • l

    Lee Nathan

    03/08/2019, 11:15 PM
    Hello all! I'm taking my very first wobbly baby steps and failing right out of the gate. I googled this error and only found 2 unresolved threads on it. I want to love Prisma, but this is worrying. Any suggestions?
  • j

    jblevins

    03/09/2019, 1:53 AM
    Hey, i'm not new to prisma, but I haven't touched it since November and am getting use to nexus schema. When I code my resolvers, is it the same as my old resolvers where I can just access queries and mutations from context?
    l
    • 2
    • 2
  • j

    jblevins

    03/09/2019, 4:17 AM
    I am getting an odd error message when building my objectTypes in nexus.
  • j

    jblevins

    03/09/2019, 5:30 AM
    I even followed the documentation for adding a field to my objectType. I'm not sure what I am doing wrong.
    j
    • 2
    • 3
  • j

    Jorge

    03/09/2019, 6:40 AM
    I think it should be t.list.shifts()
  • j

    Jorge

    03/09/2019, 6:40 AM
    instead of t.list.fields()
  • r

    rein

    03/09/2019, 10:47 AM
    anyone else have the problem of a self hosted server not showing up in the list of servers when using
    prisma init
    ?
    ✅ 1
    d
    • 2
    • 12
  • r

    rein

    03/09/2019, 10:48 AM
    Despite it being listed on your prisma dashboard
  • m

    medelman

    03/09/2019, 1:54 PM
    Does anyone know where the
    prisma-prod
    --i.e., clustered prisma--docs ran off to?
    👍 1
    • 1
    • 3
  • s

    Seppe Snoeck

    03/09/2019, 1:57 PM
    👋 Hi, I am trying to do a nested mutation. I want to register a new user and create a profile for that user. The user gets successfully created but the user is null. What am I doing wrong?
    Copy code
    const user = context.prisma.createUser({
            email: args.email,
            firstName: args.firstName,
            lastName: args.lastName,
            password,
            profile: {
              create: {
                userName: args.userName
              },
              connect: {
                userName: args.userName
              }
            },
          })
    h
    • 2
    • 2
  • w

    Wendell Misiedjan

    03/09/2019, 6:37 PM
    Hi guys, so I've been diving deep into GraphQL and Prisma for a new side-project, I've been liking it so far, I've managed to setup my data models, protect my API with GraphQL Shield and have support for authentication through API keys for my external apps / microservices 😄 Now one of those micro-services is sending back tons of data that I need to 'upsert' in my database through my API. I'm writing a custom mutation to support generic data that I manually resolve into actual models / types within my Prisma API. Now, I have enums defined in my datamodel, what I want to do now is check if that one of the input strings matches one of those enums, and I can't figure out how to do that. Since the enums are not exported as arrays, but only as an actual Type in the Prisma Client, any tips? (TypeScript client here btw)
    j
    • 2
    • 5
  • s

    Steve Mason

    03/09/2019, 7:54 PM
    Has ANYONE successfully set up subscriptions using Apollo Server and Prisma subscriptions?
    j
    • 2
    • 8
  • j

    jblevins

    03/09/2019, 8:21 PM
    Is there any way to import the *WhereInput's from the generate schema, or is this a bad practice?
1...231232233...637Latest