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

    mrboutte

    05/11/2018, 1:41 AM
    thanks @ryanmagoon you made me realize my issue
    🎉 2
    n
    • 2
    • 3
  • j

    Jim

    05/11/2018, 3:01 AM
    Ive added a picture field to Users which shows up fine in the Prisma playground but in React it always comes back null, but if I query other fields its fine. Im really confused why this isnt working, have I made a syntax error? datamodel.graphql:
    Copy code
    type User {
      id: ID! @unique
      picture: String
    }
    schema.graphql:
    Copy code
    type User {
      id: ID!
      picture: String
    }
    
    
    type Query {
      user(id: ID!): User
    }
    My resolver:
    Copy code
    async user(parent, args, ctx, info) {
        const { id } = args;
        const result = await ctx.db.query.user({ where: { id } }, info);
        return result;
      },
    React component:
    Copy code
    export const USER_QUERY = gql`
      query UserQuery($userId: ID!) {
        user(id: $userId) {
          id
          picture
        }
      }
    `;
    
    export default compose(
      graphql(USER_QUERY, {
        name: 'USER_QUERY',
        options: props => {
          return {
            variables: {
              userId: 'cjgylfv6y004h0958tx9d8j9v',
            },
          };
        },
      }),
    )(UserPic);
  • l

    Lotafak

    05/11/2018, 6:31 AM
    Anyone experiencing random ‘Socket hangs up’ errors while running server with gaphql-yoga?
    n
    • 2
    • 4
  • u

    Uy Quoc Ton Tran

    05/11/2018, 7:53 AM
    Hi I'm trying to find out how to debug my GraphQL backend in Intellij (using Express GraphQL). Is there a guide that would help me with this?
    d
    • 2
    • 1
  • r

    rein

    05/11/2018, 8:30 AM
    Hi guys, Im trying to add a digital-ocean cluster via
    prisma cluster add
    , which works fine but the cluster does not appear in my options when I want to deploy a new service. Am I missing something? Just following the Digital Ocean tutorial on prisma.io
  • k

    Khoa Huynh

    05/11/2018, 9:27 AM
    hi guys, how can we execute multiple queries at the same time and get them into a result?
    j
    a
    • 3
    • 4
  • p

    picosam

    05/11/2018, 10:52 AM
    Hello, did anyone run into this error before when running
    graphql get-schema --project prisma
    or
    graphql prepare
    :
    Copy code
    ✖ Syntax Error: Expected Name, found }
    h
    • 2
    • 7
  • p

    pettanko

    05/11/2018, 1:15 PM
    Anyone having a search bar made? Can this be done without example elastic search? I need to make a users search. I have tried to google, but I dont find anything. (I might be searching wrong)
    h
    w
    • 3
    • 6
  • g

    Gudmund

    05/11/2018, 1:45 PM
    Hey. I'm looking to set up an application with next.js, prisma, graphql-yoga and possibly some custom routes. Would it make sense to bake this into one express server, or should graphql-yoga rather be on it's own?
    j
    p
    • 3
    • 8
  • v

    Vakrim

    05/11/2018, 2:02 PM
    I updated
    prisma-binding
    to 2.0.0, a I think there is a issue with it
    exists
    . It looks like it needs
    where
    key now (
    exists.Project({where: {id }})
    instead of
    exists.Project({id})
    ) Can someone confirm it?
    n
    • 2
    • 2
  • w

    wesbos

    05/11/2018, 3:01 PM
    hello - for
    prisma deploy
    - is it possible to specify the name of the
    .env
    file?
    h
    n
    • 3
    • 5
  • w

    wesbos

    05/11/2018, 3:01 PM
    I always use this:
    require('dotenv').config({ path: 'variables.env' });
  • w

    wesbos

    05/11/2018, 3:02 PM
    but since prisma deploy internally checks for
    .env
    im not sure how to change that
  • j

    jangerhofer

    05/11/2018, 3:18 PM
    Edit: Typing out the question gave me a new search term which led me to answer my own question via: https://prisma.slack.com/archives/C0MQJ62NL/p1522538986000060 I'm having trouble wrapping my mind around a slightly sophisticated query with Prisma. If I implement a type
    Place
    as such:
    Copy code
    type Place {
      id: ID! @unique
      city : String!
      ...
    }
    and subsequently wish to retrieve a list of unique cities, is there a way to do this without writing a one-off query like the following?
    Copy code
    Query : {
     cities : [String]
    }
    i.e. Is there a built-in method for querying distinct values? The closest functionality I could find is the as-of-yet un-implemented
    group by
    query in this ticket. https://github.com/graphcool/prisma/issues/1312
    👍 1
  • w

    wesbos

    05/11/2018, 3:35 PM
    Is this the correct config for the new prisma.yml file?
    Copy code
    endpoint: <https://us1.prisma.sh/wesbos/sick-fits/${env:PRISMA_STAGE}>
    datamodel: datamodel.graphql
    secret: ${env:PRISMA_SECRET}
    I’m getting `Error: No Prisma endpoint found. Please provide the
    endpoint
    constructor option.`
    n
    • 2
    • 2
  • s

    steveb

    05/11/2018, 4:04 PM
    Are there any favorite testing frameworks that work well with Prisma? For testing resolvers, etc
    n
    • 2
    • 2
  • p

    pettanko

    05/11/2018, 4:18 PM
    How do I make Prisma generate new prisma.graphql? :s When I add new fields to User, I can't query them.
    d
    h
    +2
    • 5
    • 23
  • a

    awoyotoyin

    05/11/2018, 5:15 PM
    Hello all, I have gone through a few tutorials and I am considering GraphQL for my next project. It is essentially based on the Uber model and revolves around e-hailing Taxis. I am researching GraphQL and Prisma and I am currently stuck on working with coordinates. How do I set driver's and rider's coordinates as well as look up drivers within a certain mile radius (or something similar)? Any pointers in the right direction is greatly appreciated.
    k
    • 2
    • 2
  • j

    jeffbski

    05/11/2018, 5:29 PM
    Hey all, I am trying to get started with the basic tutorial and I am running into the same issue as listed here deploy just times out. This is a fresh install using the latest prism from npm. I tried both mysql and postgres db's and got same result. https://github.com/graphcool/prisma/issues/2400 Would anyone have any ideas on what I should do to get started? Should I try an older version of prisma or what?
    n
    • 2
    • 2
  • j

    jeffbski

    05/11/2018, 5:30 PM
    I was just trying to follow these steps exactly https://www.prisma.io/docs/quickstart/
  • j

    jeffbski

    05/11/2018, 5:38 PM
    I went back to 1.7.4 and it appears to be working, so it is something related to the latest 1.8.2 version
  • m

    mehdyouras

    05/11/2018, 6:03 PM
    Hello, any of you knows how to debug a typescript graphql yoga server ? (in vscode) Any help would be appreciated 🙂
  • v

    virtualirfan

    05/11/2018, 6:13 PM
    @nilan Hi, is there a playground on prisma cloud that supports relay?
    n
    • 2
    • 13
  • v

    virtualirfan

    05/11/2018, 7:31 PM
    Are these the supported docker images? https://hub.docker.com/u/prismagraphql/ What's the difference between the two listed docker images? There is no documentation so it's hard to tell without asking 🙂
    n
    • 2
    • 2
  • p

    Pieter

    05/11/2018, 7:32 PM
    Copy code
    "errors": [
        {
          "message": "Cannot read property 'args' of undefined",
          "locations": [
            {
              "line": 2,
              "column": 3
            }
          ],
  • p

    Pieter

    05/11/2018, 7:32 PM
    I keep hitting that error
  • p

    Pieter

    05/11/2018, 7:32 PM
    but I can't figure out what's causing it. It's like it can't find my mutation
  • p

    Pieter

    05/11/2018, 7:33 PM
    When I look at the prisma.graphql file that's generated, it still shows posts and stuff
    d
    n
    • 3
    • 4
  • d

    danielrasmuson

    05/11/2018, 7:46 PM
    Anyone know where I can find the dockerfile for https://hub.docker.com/r/prismagraphql/prisma/tags/?
    n
    • 2
    • 1
  • s

    Stephen Jensen

    05/11/2018, 7:57 PM
    Has anyone played around with how to return errors with graphql-yoga lambda? I've been trying to throw auth errors in
    context
    but they return as 500 errors with serverless.
    d
    n
    • 3
    • 8
1...262728...637Latest