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

    pllumh

    12/01/2018, 10:43 PM
    this creates the post.. but disconnects all the previous posts
  • p

    pllumh

    12/01/2018, 10:44 PM
    actually sorry, i was wrong
  • p

    pllumh

    12/01/2018, 10:44 PM
    it works as expected
    🙂 2
  • h

    Hendrik Wendt

    12/01/2018, 11:30 PM
    Has anyone else encountered
    spawnSync graphql ENOENT
    on
    hooks: post-deploy: -graphql get-schema -p prisma
    ?
    h
    d
    • 3
    • 3
  • c

    CCBCodeMonkey

    12/02/2018, 4:03 AM
    does anyone know how to get prisma-bindings to autocomplete in vscode?
    h
    • 2
    • 43
  • a

    Andres Montoya

    12/02/2018, 1:08 PM
    Hi, who have a course about angular 7? Thanks 😁!
  • a

    Anh

    12/02/2018, 4:07 PM
    Hi everyone, I want to create a type Player that already contains id (I don’t want Prisma to create the id for me as the Player is imported from another database), how should I declare the Player type in datamodel.graphql? Thanks!
  • c

    cfree

    12/02/2018, 6:04 PM
    If I have a custom type in my schema that doesn’t correlate to any data, how do I create a resolver for something not tied to a root resolver? I tried using fragments but that doesn’t seem to be doing anything
    d
    a
    • 3
    • 10
  • p

    pasa

    12/02/2018, 6:26 PM
    Hey guys, I have a more deployment oriented question. I'm hosting my own prisma server on a root server, or I'm willing to do so. It's no problem to let the nodejs server run properly. But I have some problems with the docker container. My config looks like this:
    Copy code
    version: '3'
    services:
      prisma:
        image: prismagraphql/prisma:1.7
        restart: always
        ports:
        - "4466:4466"
        environment:
          PRISMA_CONFIG: |
            port: 4466
            managementApiSecret: abc
            databases:
              default:
                connector: mysql
                active: true
                host: localhost
                port: 3306
                user: dude
                password: 123456
    As you can guess, mysql is installed on the root server as well and should be called by the user 'dude', that has currently ALL PRIVILEGES on all dbs @ %. But unfortunately I get the following error:
    f
    • 2
    • 8
  • p

    pasa

    12/02/2018, 7:38 PM
    Okay I write this outside of the thread, because I fixed the first error with some help by @fgreinus, but I do receive another error now, which is obviously not directly related to the first one, as that was a pure MySQL issue. When I try to deploy the changes to the database, with
    prisma deploy
    , I receive the following error:
    Copy code
    ▸    Could not connect to server at <http://localhost:4466>. Please check if your server is running.
    Copy code
    docker ps -a
    delivers:
    Copy code
    CONTAINER ID        IMAGE                                  COMMAND                  CREATED             STATUS                   PORTS                          8fe67f1d8ee3        prismagraphql/prisma:1.7   "/bin/sh -c /app/sta…"   5 minutes ago       Up 5 minutes        0.0.0.0:4466->4466/tcp  
    
    NAMES
    service_prisma_1
    Any ideas?
    • 1
    • 2
  • m

    Martin Hunt

    12/02/2018, 9:40 PM
    hey all, I'm looking in to how I'd go about backing up my prisma database (currently working with a local prisma server install using docker) I'm not up to speed with docker and I'm not quite sure how everything is working. So far I've gotten to this command:
    Copy code
    docker exec 3967e1d0b194 /usr/bin/mysqldump --default-character-set=utf8mb4 -u root --password=prisma prisma > backup.sql
    Which seems to be semi-working. It creates a backup of the deployed prisma API but doesn't seem to contain any of the entries / values that have been created via the deployed API. Could anyone point me in the right direction?
  • i

    ian izaguirre

    12/02/2018, 11:03 PM
    Im confused when it comes to making an
    @relation
    ... If I have a field in my datamodel.prisma like
    type Item { parent: String! }
    how can I change that so it becomes a relationship to another type. If I change it into
    type Item { parent: Collection! @relation(name: "CollectionItemBelongsIn", onDelete: SET_NULL) }
    ... then I can no longer pass the field "parent" a String ?
  • c

    Chris

    12/03/2018, 3:56 AM
    Share very good talk about GraphQL & React in NDC Conference.

    https://www.youtube.com/watch?v=cCwVeRNp2S0▾

  • l

    Lobo

    12/03/2018, 7:29 AM
    hey guys. does someone know a good way to implement simple searching with Prisma/GraphQL? without using third party platforms
    a
    • 2
    • 2
  • e

    eleazar

    12/03/2018, 8:46 AM
    Hi guys, I’m trying to setup a Prisma docker server on a DigitalOcean droplet, following this article: https://www.prisma.io/tutorials/deploy-prisma-to-digitalocean-with-docker-machine-ct06 using the files from the docker locally. However, I’m stuck on the HOST endpoint part when doing
    prisma init hello-world
    and
    prisma deploy
    . So I tried to init using the ipv4 address of the droplet, but I keep getting the
    ERR_INVALID_URL
    and
    Could not connect to server
    error. I tried with http:// and without, and i can’t get it to work. I’ve pinged the server and ensured that it’s running. Any help would be appreciated!
    g
    • 2
    • 8
  • n

    Nick

    12/03/2018, 9:34 AM
    How do I make refetch-queries with graphql-request?
  • c

    Chanlito

    12/03/2018, 9:48 AM
    Has anyone managed to use
    fragments
    with apollo-server 2.0? to get additional fields even tho clients don't request for it? Graphql-Yoga seems to have it working by default. Don't know how to get it to work with
    apollo-server
    .
    a
    • 2
    • 1
  • i

    impowski

    12/03/2018, 12:30 PM
    What will be the best way to implement sessions with GraphQL and Prisma?
  • i

    impowski

    12/03/2018, 12:30 PM
    The method I’m using right now is: stateful jwt. I’m just storing session id inside JWT and check it
  • l

    leafyshark

    12/03/2018, 1:23 PM
    Hey guys, are there any resources for connecting MongoDB to Prisma?
    n
    • 2
    • 1
  • l

    leafyshark

    12/03/2018, 2:19 PM
    Ahh... Why is it so challenging to understand how Prisma works? It's either me or the documentation
    a
    • 2
    • 10
  • a

    Andres Montoya

    12/03/2018, 3:36 PM
    Hi, who can help me with this question that I have with typeorm? https://github.com/typeorm/typeorm/issues/3191 thanks!
  • g

    Gillinghammer

    12/03/2018, 3:59 PM
    Anyone know of a tutorial which explains how to setup dev environments with Prisma? I'm wondering how to point prisma to different PSQL databases, one for development and one for production for example
    a
    • 2
    • 10
  • n

    nuno

    12/03/2018, 4:45 PM
    Can
    prisma.yml
    post-deploy hooks have wildcards? Something like
    ls /var/tmp/*/${env:PRISMA_SERVICE}
    doesn't work.
  • l

    Luke

    12/03/2018, 6:05 PM
    Hi there who do I chat to about billing?
  • a

    Alex

    12/03/2018, 6:18 PM
    Does anyone have experience with Schema delegation? I have a schema for my gateway and would like to transform a sub-selection of a query to be delegated to a prisma schema. However the fields on the gateway are different than on the prisma schema. Maybe I’m just miss-understanding schema delegation
  • h

    hez

    12/03/2018, 9:59 PM
    Probably a pretty basic question, but my searching online is failing me: Is there a way, using Prisma binding, to
    connect
    a new 1-1 relationship between
    Entity_A
    and
    Entity_C
    , where a relationship between
    Entity_A
    and
    Entity_B
    already exists, without first explicitly calling
    disconnect
    on that relationship? My initial assumption was that
    connect
    should override in this case, and replace the old relationship with the new one... but that appears to not be the case.
  • i

    ian izaguirre

    12/03/2018, 11:30 PM
    If you create a @relation in a field is the only way to populate that field through the backend? Since when you create a @relation you no longer tell it to expect something like "String" ?
  • l

    Luke

    12/04/2018, 3:51 AM
    I wrote a blog post for anyone having difficulty working with nested relations. Major thanks to @noahdavis in helping me figure it all out. Hopefully it can help someone struggling with the same issue: https://medium.com/@lukehamilton/nested-relations-in-prisma-971e060a16ab
    prisma green 3
    🙌 1
  • i

    Industrial

    12/04/2018, 9:12 AM
    Hi. I have this model:
    Copy code
    type OHLCV @model {
        id: ID! @unique
        marketBase: String!
        marketQuote: String!
        period: String!
        timestamp: DateTime!
        open: Float!
        high: Float!
        low: Float!
        close: Float!
        volume: Float
    }
    I am importing this data from an external API and I am having troubles with ID. I would like the timestamp to be the primary key and I don't want an ID because I always have a timestamp, only do time based queries on this data and I want to have an
    upsertMany
    where I can just throw many of these in a query and update all of them.
1...170171172...637Latest