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

    Gaurav

    02/17/2019, 11:04 AM
    Hello all, anybody else getting this on `prisma deploy`:
    Copy code
    ERROR: GraphQL Error (Code: 403)
    
    {
      "error": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"<http://www.w3.org/TR/html4/loose.dtd\>">\n<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n<TITLE>ERROR: The request could not be satisfied</TITLE>\n</HEAD><BODY>\n<H1>403 ERROR</H1>\n<H2>The request could not be satisfied.</H2>\n<HR noshade size=\"1px\">\nRequest blocked.\n\n<BR clear=\"all\">\n<HR noshade size=\"1px\">\n<PRE>\nGenerated by cloudfront (CloudFront)\nRequest ID: F1p-BRhgUCswG9FdqFidDtmAFH-H3lVravSJgC19jz9xykxTxP_1ew==\n</PRE>\n<ADDRESS>\n</ADDRESS>\n</BODY></HTML>",
      "status": 403
    }
    
    Get in touch if you need help: <https://www.prisma.io/forum/>
    To get more detailed output, run $ export DEBUG="*"
    ✔️ 1
    ☝️ 1
  • z

    Zyon

    02/17/2019, 1:25 PM
    Hey all! When I call this query inside my application
    context.prisma.query.user()
    , the results don't include properties of @embedded or INLINE relation types. How can I have the query return all properties no matter what type it is (String, Boolean, @embedded, INLINE)
  • l

    lewisedc

    02/17/2019, 1:39 PM
    In my prisma.yml if I try to use env variables then my requests using prisma client don't work does anyone know why?
    d
    • 2
    • 16
  • m

    mikkelsl

    02/17/2019, 1:43 PM
    How do you prevent spam signups/usage? Any resources on this subject?
  • p

    Perlkönig

    02/17/2019, 8:53 PM
    Question about
    graphql-cli
    and
    graphql-config
    . Anybody around? I see this is a much more general forum.
    h
    • 2
    • 1
  • a

    andrux

    02/17/2019, 10:18 PM
    can anyone help me understand how {type}_some, {type}_none, and {type}_every work in a query?
  • a

    andrux

    02/17/2019, 10:19 PM
    for example, this query:
    Copy code
    query {
      posts(where: {
        comments_every: {
          text: "testing post comment reply"
        }
      }) {
        id
        text
        comments {
          text
        }
      }
    }
  • a

    andrux

    02/17/2019, 10:20 PM
    I would guess it would get me all posts that have a comment where the text is “testing post comment reply”, but it seems to get every post in the db
    i
    • 2
    • 8
  • i

    iago

    02/17/2019, 10:54 PM
    this is pretty simple and doesn't seem to work on the latest betas. is this me? any pointers? I'm set up with mongo:
    Copy code
    mutation {
      createUser(
        data: {
          provider: { connect: { domain: "this.exists" } }
          email: "email"
        }
      ) {
        email
      }
    }
    It's an internal prisma error, and the mongo error is
    Copy code
    Unrecognized field in update operation: arrayFilters
    FYI connecting though an
    @id
    fails as well.
    h
    d
    • 3
    • 29
  • s

    sscotth

    02/18/2019, 12:13 AM
    Can someone with typescript try creating a
    Subscription
    type in their schema
  • s

    sscotth

    02/18/2019, 12:13 AM
    Copy code
    [ERROR] 17:53:57 ⨯ Unable to compile TypeScript:
    src/generated/prisma-client/index.ts(120,58): error TS2304: Cannot find name 'SubscriptionPromise'.
    src/generated/prisma-client/index.ts(232,58): error TS2304: Cannot find name 'SubscriptionPromise'.
    src/generated/prisma-client/index.ts(236,9): error TS2304: Cannot find name 'SubscriptionPromise'.
    src/generated/prisma-client/index.ts(245,9): error TS2304: Cannot find name 'SubscriptionPromise'.
    src/generated/prisma-client/index.ts(248,8): error TS2304: Cannot find name 'SubscriptionPromise'.
    src/generated/prisma-client/index.ts(2489,14): error TS2304: Cannot find name 'SubscriptionPromise'.
    src/generated/prisma-client/index.ts(2496,14): error TS2304: Cannot find name 'SubscriptionSubscription'.
  • s

    sscotth

    02/18/2019, 12:14 AM
    When I rename my
    Subscription
    type to
    Sub
    it works
  • s

    sscotth

    02/18/2019, 12:17 AM
    I had a similar issue with my
    defaultResolvers
    not populating in graphqlgen.ts
    h
    • 2
    • 1
  • v

    vdiaz1130

    02/18/2019, 1:18 AM
    Hello. I'm trying out Nexus and taking advantage of
    extendType({...})
    . this of course is causing my number of imports to grow substantially. Is there a way to load types from glob?
    Copy code
    const schema = makePrismaSchema({
      types: [__dirname + './resolvers/**/*.resolver.ts'] // <---- I'd like to load types from glob
      ...
    })
  • d

    darrindickey

    02/18/2019, 5:54 AM
    I’m getting this very unspecific error and I’m not sure how to troubleshoot it. I’ve seen a few other people have had it and I’ve tried their solutions to no avail. /Users/me/Development3/my-api/node_modules/graphql/language/lexer.js:316 throw (0, _error.syntaxError)(source, pos, unexpectedCharacterMessage(code)); ^ GraphQLError: Syntax Error: Cannot parse the unexpected character “.”. Specifically, I was missing:
    Copy code
    - generator: graphql-schema
        output: ../src/generated/graphql-schema/
    Now, I have /generated/schema.graphl and /generated/graphql-schema/prisma.graphql. I added this to my data model.graphql:
    Copy code
    # import User from '.,/../../database/datamodel.graphql'
    I still get this error. Any further suggestions on what I can do to track down this issue?
    d
    • 2
    • 8
  • r

    Raviv

    02/18/2019, 8:28 AM
    Hi all, i have looked in the Docs and could not find a solution. Is there a way to query a Json scalar?? lets say i have a sample Type of this structure:
    type buttonStyle {id: ID! border: Json}
    the Json content is something like:
    {"style": "solid", "width": "1", "color": "#000000"}
    I want to fetch all nodes that border.style = solid Is that possible?
    m
    • 2
    • 1
  • d

    dferber90

    02/18/2019, 10:57 AM
    I’m trying to create rolling updates of our web app, but I ran into a very specific issue: When a new prisma schema is deployed with breaking changes (e.g. a field was removed), the prisma-client of the previously deployed frontend server will no longer be able to fetch that type as its field changed (old prisma client querying already updated service). This breaks production until the new frontend servers with the updated prisma-client have spun up. Has anybody faced this problem before? How did you deal with it? Any links, pointers or advice?
    v
    • 2
    • 6
  • a

    arthur

    02/18/2019, 12:10 PM
    Hello, I have a question that may be a beginner question but I can’t figure out a simple answer. I use (and love) the prisma api with a prisma service, connected to a react app via apollo. The problem is that when a go into my browser console and in the network tab, I can see the URL apollo is making the request against and, by just copy pasting it, anyone can do so and do whatever they want. I found ways to use a custom server to proxy the requests but is there a simpler way? Thanks 🙂
    i
    j
    • 3
    • 15
  • m

    michael.glitzos

    02/18/2019, 3:35 PM
    Following the guide on the Prisma documentation page, I created a web client, a GraphQL server, and stood up Prisma in Docker. Ultimately my goal is to run the web client (HTML/CSS/JS), the GQL server, and the Prisma instance inside of containers on Kubernetes. So far I've figured out how to get the Prisma instance on Kubernetes. What I'm having trouble with is how you connect the GQL server to Prisma and deploy the data model to your Prisma server without having to manually do it. Can these steps be automated? If so where can I find good examples on how to do it?
    h
    • 2
    • 2
  • m

    Mihaita Ivli

    02/18/2019, 3:43 PM
    Hey guys, we keep getting this error every 2-3 mins
    Copy code
    [31m[SubscriptionSessionActor] Received unknown message: com.prisma.subscriptions.protocol.SubscriptionProtocolV07$Requests$GqlConnectionTerminate$@336f4824[0m
    any ideea what might be wrong? We are not terminating the subscription, we’re just getting disconnected after a while We’re on Prisma 1.24 atm and running on EB
    h
    • 2
    • 1
  • j

    joan

    02/18/2019, 3:56 PM
    How can I prevent
    events
    from loading
    places
    from other events? ATM, when I create a new
    place
    , it also shows in other events 😮
  • j

    joan

    02/18/2019, 3:56 PM
    these are my resolvers:
    Copy code
    const resolvers = {
     Query: {
       events: (parent, args, context) => {
         return context.prisma.events();
       },
       event: (parent, { slug }, context) => {
         return context.prisma.event({ slug });
       }
     },
     Event: {
       places: (parent, args, context) => {
         return context.prisma.places();
       }
     },
     Mutation: {
       createEvent(parent, { title, slug }, context) {
         return context.prisma.createEvent({ title, slug });
       },
       updateEvent(parent, { id, title, slug, description, dates, menus }, context) {
         return context.prisma.updateEvent({
           where: { id },
           data: { title, slug, description, dates: { set: dates }, menus: { set: menus } }
         });
       },
       deleteEvent(parent, { id }, context) {
         return context.prisma.deleteEvent({ id });
       },
       createPlace(parent, { name, url, event }, context) {
         return context.prisma.createPlace({
           name,
           url,
           event: { connect: { id: event } },
         });
       },
       deletePlace(parent, { id }, context) {
         return context.prisma.deletePlace({ id });
       }
     },
    }
  • j

    joan

    02/18/2019, 3:56 PM
    and my schema:
    Copy code
    type Query {
      events: [Event!]!
      event(slug: String!): Event
      places: [Place!]!
    }
    
    type Mutation {
      createEvent(title: String!, slug: String!): Event
      deleteEvent(id: ID!): Event
      updateEvent(id: ID!, title: String!, slug: String!, description: String, dates: [String], menus: [String]): Event
      createPlace(name: String!, url: String, event: ID!): Place
      deletePlace(id: ID!): Place
    }
    
    type Event {
      id: ID!
      slug: String!
      title: String!
      description: String
      dates: [String]
      places: [Place]
      menus: [String]
    }
    
    type Place {
      id: ID!
      name: String!
      url: String
      event: Event!
    }
    l
    h
    • 3
    • 4
  • j

    joan

    02/18/2019, 4:06 PM
    @Harshit any idea? ^
  • j

    JoeE

    02/18/2019, 6:11 PM
    Any one using Prisma with a mongo db
    h
    z
    c
    • 4
    • 6
  • s

    serum

    02/18/2019, 7:50 PM
    is there a way to rename my automatically deployed heroku instance?
  • i

    iago

    02/18/2019, 8:51 PM
    is there an alternative for this kind of code (grabbing the id of the embedded doc (which have no directly exposed crud methods))?:
    Copy code
    const subscription = await db
          .updateSubscription({
            data: {
              playlists: {
                update: {
                  sections:{
                    create:{
                      name,
                    },
                  },
                },
              },
            },
            where: { id: subscription_id },
          })
          .$fragment(graphql`
            {
              id
              playlists {
                sections {
                  id
                  name
                  # updatedAt
                }
              }
            }
          `)
      )
      
      const { id } = find(subscription.playlists.sections, ({ name: name_ })=> name_ === name)
      // orderBy(subscription.playlists.sections, 'updatedAt', 'desc')[0]
    h
    • 2
    • 1
  • n

    Nick

    02/19/2019, 6:06 AM
    When will Yoga2 replace the current graphql-yoga server?
    h
    • 2
    • 2
  • r

    rawriclark

    02/19/2019, 6:43 AM
    @Nick why would it replace? yoga2 is ruby and graphql-yoga is typescript/node
    h
    • 2
    • 1
  • r

    rein

    02/19/2019, 9:48 AM
    Is there a guide somewhere on how to connect Prisma to an external db like the new hosted db on digital ocean?
    m
    • 2
    • 2
1...212213214...637Latest