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

    marcaaron

    08/01/2018, 6:16 AM
    Can anyone shed light on how a self-relation might work in a data model where 2 users should be able to “connect” with each other after an invitation to connect has been accepted?
    Untitled.scala
    • 1
    • 1
  • z

    zak.singh

    08/01/2018, 6:56 AM
    When you send a serverside subscription to a webhook, is the node that triggered the subscription sent in the request?
    d
    • 2
    • 1
  • s

    siyfion

    08/01/2018, 4:17 PM
    There’s no way to use
    extend type XX
    to remove a field from the original type is there? Just thinking if there were, that would be the perfect way to “hide” certain fields from the prisma generated schema, without having to worry about copy/paste/repeat each time the prisma schema changed for that type.
    a
    • 2
    • 2
  • p

    peter

    08/01/2018, 5:21 PM
    when using
    prisma-bindings
    with an example query such as
    Copy code
    prisma.mutation.updateUser({ where: { id: 'cjcdi63j80adw0146z7r59bn5' }, data: { name: 'Sarah' } }, '{ id }')
    how can I specify to receive the entire
    User
    object back as the selection set (ideally without specifying each field)? fragments?
    m
    • 2
    • 2
  • d

    danielrasmuson

    08/01/2018, 7:39 PM
    How can I call context explicitly but have the consumer dictate the selection? I.E. Query from the user
    Copy code
    mutation{
      createTeam(data:{
        name:"hi",
      }){
        id
        name
        createdBy{
          email
        }
      }
    }
    prisma-binding call
    Copy code
    return context.db.mutation.createTeam({
      data: {
        name: args.data.name,
        organization: {
          connect: {
            id: context.organizationId
          }
        },
        createdBy: {
          connect: {
            id: context.userId
          }
        }
      }
    }, info)
    I could use
    Copy code
    context.db.mutation.createTeam({data: {...}}, `{id, name, createdBy{ email }}`)
    But I don't know what fields will be used in the selection
    d
    m
    • 3
    • 4
  • j

    Joe Fazzino

    08/01/2018, 8:58 PM
    Hi! I've just deployed a change to Prisma Cloud but now I'm getting a
    Error: GraphQL error: Whoops. Looks like an internal server error.
    response from my server. Does anyone have any advice on how to fix? This is on prisma-eu1 by the way. EDIT: It was because my
    prisma token
    had expired EDIT EDIT: It's still broken on my client 😞 SUPER EDIT: this is in the console of Prisma Cloud when I try and browse the offending data
    Copy code
    Error: {
      "message": "Whoops. Looks like an internal server error. Search your server logs for request ID: eu1:api:cjkbmgzw77v4a0a84t7bsh27f",
      "path": [
        "users"
      ],
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "requestId": "eu1:api:cjkbmgzw77v4a0a84t7bsh27f"
    }
    In my most recent deploy I deleted a field that had data in it and added a new optional field with a default value. I probably shouldn't of forced the deploy... FINAL EDIT: I fixed it by readding the field that I force deleted. Lesson Learnt, I won't delete this because I think other people could benefit from it.
    😅 1
  • n

    Nick

    08/01/2018, 9:30 PM
    Love the new docs https://docs-beta.prisma.io/ ... Every month is like a christmas with these guys always good stuff
    😍 4
    z
    h
    • 3
    • 2
  • k

    Kee

    08/02/2018, 3:16 AM
    Copy code
    prisma:
        image: prismagraphql/prisma:1.13
        # container_name: "idea-prisma"
        restart: always
        depends_on:
          - postgres
        ports:
        - "4466:4466"
        environment:
          PRISMA_CONFIG: |
            port: 4466
            # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
            managementApiSecret: mysecret123
            databases:
              default:
                connector: postgres
                host: postgres
                port: 5432
                user: prisma
                password: prisma
                migrations: true
                database: prisma
    How can I delete my created database
    prisma
    ? using Navicat premiun deleted ERROR: cannot drop the currently open database
    w
    • 2
    • 2
  • e

    elwinarens

    08/02/2018, 5:14 AM
    👋
  • e

    elwinarens

    08/02/2018, 5:14 AM
    I'm looking to find out who designed the primsa.io website. Anyone have info on this?
    m
    • 2
    • 2
  • n

    nilan

    08/02/2018, 8:29 AM
    Hi 👋
    💚 4
    👋 5
    parrotwave6 1
    👍 1
    h
    l
    • 3
    • 3
  • p

    Pedro Jardim

    08/02/2018, 12:22 PM
    I guys! I started to get this error from on of my functions: "software.amazon.awssdk.services.lambda.model.ResourceNotFoundException: Function not found" The functions is a request pipe line
    n
    • 2
    • 1
  • r

    rein

    08/02/2018, 1:10 PM
    Is there any ETA on the elasticSearch integration? Besides that, I guess Algolia is still the go-to way to implement search when working with Prisma?
    👍 2
    l
    • 2
    • 3
  • a

    aroman

    08/02/2018, 2:36 PM
    Hello 😄 I am receiving the following error when from prisma when running my subscription. Could it be a request problem? It seems like I’m overloading the prisma service as it will complete and return about 100 items before stopping and just failing for the rest (426 in total).
    Copy code
    java.util.concurrent.RejectedExecutionException: Task slick.basic.BasicBackend$DatabaseDef$$anon$2@5f6fc9a0 rejected from slick.util.AsyncExecutor$$anon$2$$anon$1@4469989b[Running, pool size = 10, active threads = 10, queued tasks = 1000, completed tasks = 93810]
    m
    • 2
    • 3
  • k

    kratam

    08/02/2018, 10:17 PM
    is it possible to generate typescript types from a
    schema.graphql
    (not prisma
    datamodel.graphql
    ) with resolved `import`s? _edit_: For anyone interested:
    gql2ts
    seems to do the trick (without the import stuff)
  • w

    w0wka91

    08/02/2018, 11:44 PM
    how am i supposed to debug the prisma-cli? I'm using visual studio code
    d
    • 2
    • 6
  • h

    Helmi

    08/03/2018, 2:26 AM
    is it possible to hide the playground but still can fetch the API?
    g
    • 2
    • 2
  • n

    Nicola Molinari

    08/03/2018, 9:18 AM
    Hey guys, has anyone managed to run more than one replica of a prisma container? I’m trying to run 1 primary (managementApi: true) and 2 secondaries (managementApi: false) in Kubernetes but somehow the containers keep crashing (related issue: https://github.com/prismagraphql/prisma/issues/2850). Thanks in advance 🙏
  • n

    Nils

    08/03/2018, 9:40 AM
    Greetings y’all. Anybody here working with vue and graphcool? In the graphcool quickstart (vue-graphql.git) example, the Apollo query is under `export default`:
    Copy code
    apollo: {
          allPosts: {
            query: FeedQuery,
            loadingKey: 'loading',
          },
        }
    But in the latest Vue Apollo integration you can use it right in the template:
    Copy code
    <ApolloQuery
      :query="require('../graphql/HelloWorld.gql')"
      :variables="{ name }"
    >
      <template slot-scope="{ result: { loading, error, data } }">
    I’m looking for more up to date information on how to interface to the graphcool functions (i.e.
    server/src/authenticate.js
    ) from the templates in this way. Can’t find anything. Any articles out there?
  • n

    Nils

    08/03/2018, 9:41 AM
    Or do you define these functions (like
    authenticate.js
    ) once in the server and again in the client? Haven’t found any clear examples.
  • n

    Nils

    08/03/2018, 10:29 AM
    Specifically, I’d love to know how to use the auth template functions set up in the server from the vue front-end code. https://github.com/prismagraphql/graphcool-framework/tree/master/examples/0.x/auth
  • t

    terion

    08/03/2018, 1:47 PM
    Copy code
    ctx.db.query.listByMunicipality({municipality: 1, where: {status: "ACTIVE"}}, dataRequest)
    Copy code
    Expected type ModuleRegistryStatusEnum, found "ACTIVE"; Did you mean the enum value ACTIVE or INACTIVE?
  • t

    terion

    08/03/2018, 1:48 PM
    How to query via bindings with enums?
    n
    • 2
    • 1
  • r

    rwatts3

    08/03/2018, 3:40 PM
    Hello everyone I hope your Friday is going well. I have a question regarding Prisma and it's future support for additional databases. Is it possible to have multiple database endpoints in the same Prisma Application. For example if I have a Mysql database with a set schema, and I also have a MongoDB instance (once available) with a different schema. I'd like to hit my prisma endpoint and get data from either endpoint .
  • r

    rwatts3

    08/03/2018, 3:41 PM
    Use case, if i'm working on a Data Science project, and I'm using mysql that has existing data , but also want to get data from my MongoDB endpoint. The workflow would be a lot simpler to hit my standalone prisma instance and grab data arbitrary of where it's stored, by knowing what mutation or query I need to pull the data
    s
    • 2
    • 3
  • m

    Moritz

    08/03/2018, 3:52 PM
    Hi there, does anyone have a good library or read on how to secure a yoga/prisma endpoint so that only authorized clients can read it? My background in building node/ts backends is limited. I know that the prisma boilerplate implements auth, but I need something much more basic just to limit access to my unauthorized clients. Should I just pass a key in the header and check against it in every request? Is there a lib that does something like that for me? Thanks
    g
    a
    • 3
    • 4
  • a

    aazlant

    08/03/2018, 10:37 PM
    hi all, is prisma a good solution for a personal project that scrapes websites and stores the results in json blobs?
    a
    • 2
    • 1
  • a

    aazlant

    08/03/2018, 10:37 PM
    going to serve the data to a react / redux app
  • a

    aazlant

    08/03/2018, 10:37 PM
    and if so is there a tutorial out there?
  • c

    cfofiu

    08/03/2018, 10:46 PM
    Hi Everyone! I've tried to deploy a Prisma Server on a Google Cloud Compute Engine, but I'm getting this error:
    "Exception in thread "main" java.lang.RuntimeException: Unable to load Prisma config: java.lang.RuntimeException: No valid Prisma config could be loaded."
    Anyone can help? Any idea why?
1...939495...637Latest