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

    Jidé

    02/01/2019, 11:08 AM
    @do4gr said this feature is being promoted to beta here https://github.com/prisma/prisma/issues/2036#issuecomment-452622564 (hope it’s okay to mention you)
    h
    d
    • 3
    • 19
  • i

    impowski

    02/01/2019, 1:47 PM
    @channel how good is Prisma-Nexus performance right now?
    👍 1
  • d

    dan

    02/01/2019, 3:02 PM
    Has anyone setup a testing environment with its own prisma / mongo container initialization?
    u
    d
    • 3
    • 84
  • e

    Emil Forsmann

    02/01/2019, 4:26 PM
    is prisma dev down again?
    ➕ 2
    m
    • 2
    • 1
  • j

    Jack Toumey

    02/01/2019, 9:04 PM
    Just read this: https://www.prisma.io/blog/the-problems-of-schema-first-graphql-development-x1mn4cb0tyl3/ and I'm curious what we could use in Javascript other than graphql-js
    👍 1
    h
    b
    +3
    • 6
    • 8
  • m

    Michael Freeman

    02/01/2019, 11:17 PM
    hello
  • m

    Michael Freeman

    02/02/2019, 12:07 AM
    when I run graphql create my-app --boilerplate node-advanced I get an error, Unknown argument: boilerplate
  • m

    Michael Freeman

    02/02/2019, 12:58 AM
    is that deprecated?
  • m

    Michael Freeman

    02/02/2019, 3:27 AM
    nevermind
  • m

    Michael Freeman

    02/02/2019, 3:27 AM
    docs are all outdated..
  • d

    Daniel

    02/02/2019, 3:12 PM
    Hi everyone...is there anything going on with an MS SQL connector?
  • m

    Mitchell

    02/02/2019, 7:54 PM
    I'm working in the Howtographql React + Apollo tutorial. I'm on Filtering: Searching the List of Links section. When I implement the change to server/src/resolvers/Query.js I get a GraphQL error: Error: GraphQL error: Cannot read property 'query' of undefined. This error is captured at src/Components/LinkList.js:33. Reverting to the previous version of the
    feed()
    function in Query.js solves the error. Seems the problems is in this change:
    Copy code
    async function feed(parent, args, ctx, info) {
      const { filter, first, skip } = args // destructure input arguments
      const where = filter
        ? { OR: [{ url_contains: filter }, { description_contains: filter }] }
        : {}
    
      const queriedLinks = await ctx.db.query.links({ first, skip, where })
    
      return {
        linkIds: queriedLinks.map(link => link.id),
        count
      }
    }
    https://www.howtographql.com/react-apollo/7-filtering-searching-the-list-of-links/ This looks suspect to me. The original code queries Links as:
    await context.prisma.links(...)
    . While the new change queries links with:
    await ctx.db.query.links(...)
  • m

    Mitchell

    02/02/2019, 8:01 PM
    Changing
    await ctx.db.query.links(...)
    to
    await ctx.prisma.links(...)
    fixes the problem above but now has an error where
    count
    is undefined, it doesn't seem to be referenced anywhere in this code block?
  • m

    Mitchell

    02/02/2019, 8:03 PM
    I tried
    count: queriedLinks.length,
    but still see a GraphQL error: > Error: GraphQL error: Cannot return null for non-nullable field Feed.links.
  • m

    Mitchell

    02/02/2019, 8:34 PM
    Looking at what is returned as
    queriedLinks
    the array contains object with
    id
    ,
    createdAt
    ,
    description
    ,
    url
    . The schema shows
    postedBy
    and
    votes
    where
    votes
    is
    [Vote!]!
    making it required. Could this be the problem?
  • m

    Mitchell

    02/02/2019, 8:47 PM
    Wait strike that. Seems the real problem is:
    Error: Cannot return null for non-nullable field Link.id.
    . Seems there is something in the change to the feed function made at step 7 of the tutorial that loses Link.id. The results look the same for both. Maybe the problem is at the Query in LinkList.js...
  • m

    Mitchell

    02/02/2019, 8:49 PM
    Not sure if this is correct with the intention of the tutorial but it seemed to work.
    Copy code
    return {
        linkIds: queriedLinks.map(link => link.id),
        links: queriedLinks,
        count: queriedLinks.length,
      }
    links were not returned as a field.
  • d

    Daniel Clough

    02/02/2019, 9:51 PM
    I am having trouble with $exists https://www.prisma.io/forum/t/typeerror-context-prisma-exists-vote-is-not-a-function/5901
  • m

    matt

    02/03/2019, 12:09 AM
    Hi everyone. I’m really enjoying learning Prisma, it’s really powerful! I’m a little confused about how to handle transactions though. I have posted in the forum and would be grateful for any thoughts / advice. Thanks. https://www.prisma.io/forum/t/transactions-when-the-business-logic-requires-more-than-just-a-nested-insert/5904
  • m

    michael.glitzos

    02/03/2019, 5:37 AM
    Need some help getting started on AWS. Trying to use ECS to deploy docker-compose to aws and connect to Mongo Atlas. Having problems connecting to Atlas. Log dump and docker-compose file are attached
    • 1
    • 1
  • m

    michael.glitzos

    02/03/2019, 5:37 AM
    docker-compose.1.yml
  • r

    Roy Derks

    02/03/2019, 12:43 PM
    Hi all! Im doing a lot of talks at meetups and conferences about GraphQL. Who can I contact at Prisma to see how I can best use their software in the slides? And maybe to get some cool stickers for my machine as well 😎
    h
    • 2
    • 1
  • z

    Zowpi

    02/03/2019, 2:55 PM
    can i use prisma with https://github.com/Shopify/shopify-node-app/ ?
  • z

    Zowpi

    02/03/2019, 3:00 PM
    it use knex for authentication
  • a

    alex h

    02/03/2019, 4:57 PM
    hey gang! i'm getting the error
    Copy code
    TypeError: Cannot read property 'startsWith' of undefined
        at GenereateCommand.<anonymous> (/usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core/src/commands/generate/generate.ts:99:39)
    when following the learngraphql tutorial and running the
    generate prisma
    command for the first time.
  • a

    alex h

    02/03/2019, 4:57 PM
    i'm pretty sure my files look exactly like the tutorials files. any ideas on what might be causing the issue?
  • a

    alex h

    02/03/2019, 4:58 PM
    datamodel.prisma
    Copy code
    type Link {
      id: ID! @unique
      createdAt: DateTime!
      description: String!
      url: String!
    }
  • a

    alex h

    02/03/2019, 4:58 PM
    prisma.yml
    Copy code
    endpoint: <https://us1.prisma.sh/***/hackernews-node/dev>
    datamodel: datamodel.prisma
    
    generate: 
      - generator: javascript-client
      - output: ../src/generated/prisma-client
  • e

    E

    02/04/2019, 5:02 AM
    How may I use the GraphQL Playground for local development? I installed the desktop app. When I enter "http://localhost:8080" as the URL endpoint, there's an error "Server cannot be reached." My curl requests succeed.
    c
    c
    • 3
    • 3
  • c

    Cihad Turhan

    02/04/2019, 8:31 AM
    Hello folks, Any guides on how I can filter unique entries on a collection? i.e. I have a UserHistory which has User and Article Fields inside.
    Copy code
    graphql
    type ReadHistory {
        id: ID! @unique
        user: User!
        article: Article!
    }
    I need unique user id and article id pairs on that. What I currently have is
    Copy code
    context.prisma.readHistories({
            where: {
              user: { id: args.userId },
              article: { authors_some: { isPOC: true } }
            },
            orderBy: 'createdAt_DESC'
          })
1...202203204...637Latest