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

    tabsnotspaces

    06/14/2018, 12:05 AM
    I’m trying to connect prisma to an existing postgres db and I’m SO close to being successful but this error is haunting me. I’ve been able to isolate the issue in my
    datamodel
    schema, i just don’t understand why it’s happening
  • t

    tabsnotspaces

    06/14/2018, 12:06 AM
    schema for reference:
    Copy code
    type User @pgTable(name: "user") {
      enabled: Boolean!
      id: Int! @unique
      is_root: Boolean!
      name: String!
      password_hash: String!
      column_grants: [Column_grants!]!
      database_grants: [Database_grants!]!
      table_grants: [Table_grants!]!
    }
    
    type Database @pgTable(name: "database") {
      description: String
      id: Int! @unique
      name: String!
      database_grants: [Database_grants!]!
      tables: [Table!]!
    }
    
    type Table @pgTable(name: "table") {
      container_db: Database! @pgRelation(column: "container_db")
      credentials: String!
      description: String
      id: Int! @unique
      is_cached: Boolean!
      name: String!
      schema_columns: [Schema_column!]!
      table_grants: [Table_grants!]!
    }
    
    type Schema_column @pgTable(name: "schema_column") {
      description: String
      id: Int! @unique
      index: Int!
      name: String!
      table: Table! @pgRelation(column: "table")
      column_grants: [Column_grants!]!
      # column_obfuscation: [Column_obfuscation!]!
    }
    
    type Database_grants @pgTable(name: "database_grants") {
      database: Database! @pgRelation(column: "database")
      id: Int! @unique
      manual: Boolean!
      permission: String!
      user: User! @pgRelation(column: "user")
    }
    
    type Table_grants @pgTable(name: "table_grants") {
      id: Int! @unique
      manual: Boolean!
      permission: String!
      table: Table! @pgRelation(column: "table")
      user: User! @pgRelation(column: "user")
    }
    
    type Column_grants @pgTable(name: "column_grants") {
      column: Schema_column! @pgRelation(column: "column")
      id: Int! @unique
      manual: Boolean!
      permission: String!
      user: User! @pgRelation(column: "user")
    }
    
    type Column_obfuscation @pgTable(name: "column_obfuscation_grants") {
      # column: Schema_column! @pgRelation(column: "column")
      id: Int! @unique
      key: String!
      manual: Boolean!
    }
  • r

    ryannealmes

    06/14/2018, 12:34 AM
    hey guys I am trying to figure out how to use the graphql-cli
  • r

    ryannealmes

    06/14/2018, 12:34 AM
    specifically how to generate my schema
  • r

    ryannealmes

    06/14/2018, 12:35 AM
    I have added a hook to my prisma.yml file and it seems to be working
  • r

    ryannealmes

    06/14/2018, 12:35 AM
    Copy code
    hooks:
      post-deploy:
        - echo "Deployment finished"
        - graphql get-schema
        - graphql prepare
  • r

    ryannealmes

    06/14/2018, 12:35 AM
    first question is I don’t really knwo what the
    graphql prepare
    is and I can’t find any detailed info on it
  • r

    ryannealmes

    06/14/2018, 12:36 AM
    also the schema that is generated seems to not be valid graphql
    n
    • 2
    • 1
  • n

    Nick

    06/14/2018, 4:41 AM
    Anyone know if there is a graphql yoga and prisma course? Coding along with videos lessons(udemy, egghead or even teamtreehouse), Im trying to make my team get into this stuff
    n
    c
    • 3
    • 2
  • r

    ryannealmes

    06/14/2018, 5:50 AM
    with prisma-bindings, how does one use the OR operator?
    w
    • 2
    • 1
  • r

    ryannealmes

    06/14/2018, 5:50 AM
    right now I have tried something like
    n
    • 2
    • 1
  • r

    ryannealmes

    06/14/2018, 5:50 AM
    Copy code
    const exists = await ctx.connectors.userService.exists.User({
          email: args.email,
          OR: {
            username: args.username
          }
        });
  • r

    ryannealmes

    06/14/2018, 5:50 AM
    but this doesn’t seem to work
  • y

    yolen

    06/14/2018, 7:15 AM
    @channel any other experiencing: 504, message='Gateway Time-out'. Our site is offline because we can no longer update data. Any help is appreciated 🙂
    n
    • 2
    • 2
  • t

    thisismissem

    06/14/2018, 9:00 AM
    Does anyone know the state of the VS Code extension published by Prisma in the marketplace? The github repository link for it is broken (a 404)
    h
    n
    • 3
    • 6
  • b

    beeman

    06/14/2018, 9:28 AM
    Hey friends - is there a way to disable the sidebar in the GraphQL Playground?
  • r

    ronanyeah

    06/14/2018, 11:52 AM
    can i have multiple endpoints in my
    prisma.yml
    and use environment variables or flags or something to specifiy which one
    prisma deploy
    should use?
    a
    • 2
    • 4
  • r

    ronanyeah

    06/14/2018, 11:52 AM
    don't want to be frequently editing the file
  • l

    Lotafak

    06/14/2018, 12:25 PM
    Hey guys! I have a question. Is it normal, that prisma and graphql-yoga keeps ~30 open connections to DB (in this case MySQL)? Screenshot from AWS RDS
  • u

    user

    06/14/2018, 12:26 PM
    A file was commented on
  • n

    nilan

    06/14/2018, 12:27 PM
    @Lotafak, yes that's expected. what problems are you running into?
    l
    • 2
    • 11
  • h

    halborg

    06/14/2018, 12:39 PM
    Has anyone implemented geo searches in Prisma yet? There’s an open PR for framework support, but maybe there’s some workaround until they get around to it? (https://github.com/prismagraphql/prisma/issues/28) Or just have some tips or thoughts on how to go about it
  • c

    cschroeter

    06/14/2018, 1:26 PM
    Hey guys - hopefully someone can help me with this. We are planning to migrate to Prisma but I'm not sure how you can use subscription on the server side.
    Copy code
    this.apolloClient.subscribe({
            query: onUserUpdate
          })
          .subscribe({
            next: ({ data }) =>
               // process data
          });
    Using Prisma it is complaining that it musth ave a selection of subfields.
    Copy code
    const prisma = new Prisma();
    
      client.subscription
        .user()
        .then(response => response)
        .catch(e => console.log(e));
  • l

    lewebsimple

    06/14/2018, 1:39 PM
    Hello world, are there best practices for serving the frontend using graphql-yoga's express instance? I tried adding
    server.express.use(nuxt.render)
    but the graphql requests fall-through to Nuxt... is there a way to make graphql-yoga's endpoints call
    res.end()
    to prevent this? Thanks!
    b
    • 2
    • 6
  • s

    Simme

    06/14/2018, 1:49 PM
    Prisma cloud down? My requests are timing out.
  • z

    zonofthor

    06/14/2018, 1:51 PM
    same here
  • g

    Gomah

    06/14/2018, 1:52 PM
    Works for me (US1)
  • z

    zonofthor

    06/14/2018, 1:53 PM
    EU1
  • z

    zonofthor

    06/14/2018, 1:54 PM
    it's back
  • v

    veksen

    06/14/2018, 5:09 PM
    upgrading from Prisma 1.6 to 1.9 today… and trying to reuse my existing database.. how do I know the user/password that was used? (otherwise I don’t care too much about creating a new one, but kind of wondering what was the default user/password/schema name?) re: initiating a new database creates a prisma.yml that contains an endpoint different to my 1.6 endpoint: 1.9 -> http://localhost:4466 1.6 -> http://localhost:4466/backend/dev well 1.9 is not happy about PRISMA_MANAGEMENT_API_SECRET not matching cluster secret but I’ve set the same cluster secret everywhere 😞🤔
1...565758...637Latest