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

    Jordan

    12/05/2018, 5:23 PM
    hello
    ๐Ÿ‘‹ 4
  • j

    Jordan

    12/05/2018, 5:26 PM
    I wrote some middleware to block banned users, but it seems as though it's getting called five times on every call:
    Copy code
    export const blockBannedUserMiddleware = async (resolve: any, parent: any, args: any, context: Context, info: any) => {
      // check if user is banned based on context, if so throw forbidden error
      return resolve(parent, args, context, info);
    };
    j
    • 2
    • 1
  • j

    Jordan

    12/05/2018, 5:26 PM
    any clue what might cause this sort of thing to happen?
  • j

    Jordan

    12/05/2018, 5:46 PM
    @JustinR not sure I can show you the code directly, but we have an array of middleware that is of types
    (IMiddleware | IMiddlewareGenerator<any, any, any>)[];
    , we're applying the middleware via
    applyMiddleware(schema, middlewares)
    and feeding that into a new
    ApolloServer
    instance
  • j

    Jordan

    12/05/2018, 5:46 PM
    Copy code
    const schemaWithMiddleware = applyMiddleware(schema, ...this.graphqlMiddlewares);
        this.server = this.createServer(schemaWithMiddleware);
  • j

    Jordan

    12/05/2018, 5:47 PM
    I'm thinking this actually may be caused by dataloaders
  • j

    Jordan

    12/05/2018, 5:48 PM
    So it was actually 6 times it was getting called before - just re-counted. The query is returning 3 users and then pulling additional data from a nested field.
    h
    • 2
    • 4
  • j

    Jordan

    12/05/2018, 5:49 PM
    If I change the query to not return that nested data it happens only 3 times
  • j

    Jordan

    12/05/2018, 5:53 PM
    only happens once if one result
  • j

    jamesmbowler

    12/05/2018, 9:33 PM
    i'm trying to make prisma work with relay. here's my repo: https://github.com/jamesmbowler/prisma-relay-todo . Specifically, I can't get the todo list to update when a new todo is added.
  • l

    lastmjs

    12/06/2018, 3:00 AM
    Is there a way to change the username and password for the prisma cloud demo server mysql database? The default username and password are both prisma, and I've deployed using that username and password. Does that mean anyone who knows the default can access my database?
  • l

    lastmjs

    12/06/2018, 3:02 AM
    Also, I've already deployed to a demo server without the managementApiSecret set, and now I'd like to set it. I'm trying to deploy with the managementApiSecret set, and it seems to have no effect
  • d

    doums

    12/06/2018, 10:49 AM
    Hi all ! Just to be sure, the new Datamodel v2 (new annotation
    @id
    ,
    @createdAt
    etc..) is currently only available for MongoDB Right ? So the new 1.22 release changes nothing for others db ? Also in the future, will the embedded type be available for other underlying db than Mongo ?
    n
    • 2
    • 2
  • r

    Rowland

    12/06/2018, 11:15 AM
    Hi All. Is it possible to deploy fullstack graphql react application to zeit without dockerizing the application?
  • i

    Industrial

    12/06/2018, 11:27 AM
    -.txt
  • i

    Industrial

    12/06/2018, 11:27 AM
    Hi. I'm getting this error using the latest prisma:
    UnhandledPromiseRejectionWarning: Error: GraphQL error: Cannot query field 'executeRaw' on type 'Mutation'. (line 2, column 3):
    • 1
    • 6
  • h

    Hyo

    12/06/2018, 12:52 PM
    Hi everyone. I am new to
    prisma
    today and hope to get engaged in this community.
  • h

    Hyo

    12/06/2018, 12:52 PM
    Could anyone look on [this](https://www.prisma.io/forum/t/setting-mysql-database-in-docker-compose/5261) one and give me some advice?
    ๐Ÿ‡ฐ๐Ÿ‡ท 1
    d
    c
    • 3
    • 19
  • r

    rooneyK

    12/06/2018, 2:43 PM
    we are now attempting to move from subscriptions to
    $subscribe
    in the
    prisma-client
    . This seems to work great, except that if the prisma-backend is not reachable at the time when we set up the subscription, it will not give us any feedback, and no reconnect if the connection drops. Is there a way to access
    onDisconnected
    etc to attempt to reconnect?
  • l

    leafyshark

    12/06/2018, 3:19 PM
    hey guys, does Prisma negate the concept of 'Models' in MongoDB?
    n
    • 2
    • 7
  • s

    sven

    12/06/2018, 3:25 PM
    I am starting a small side project and would like to start with prisma. I am a little lost on where to start though. Can I use prisma cloud to host data? Do I need a hosted database somewhere? I used to use graph.cool back in the days. Can you point me in a direction?
    l
    n
    • 3
    • 4
  • c

    Coe

    12/06/2018, 4:01 PM
    Hello! When trying to authenticate ( prisma login ) OS X, an error is returned in the browser: "Network error: JSON Parse error: Unrecognized token '<'" Does anyone have any insight as to what the problem may be?
    m
    d
    • 3
    • 3
  • l

    Luis Cervantes

    12/06/2018, 6:36 PM
    Hello!
    ๐Ÿ‘‹ 2
    parrotwave1 1
  • t

    Tony

    12/06/2018, 8:48 PM
    Is this where I can ask a simple question about serverless-plugin-typescript?
  • r

    roberto.guerra

    12/06/2018, 8:49 PM
    I think you want to ask that in the serverless slack
  • t

    Tony

    12/06/2018, 9:02 PM
    Thanks
  • l

    leafyshark

    12/06/2018, 9:27 PM
    -.js
  • l

    leafyshark

    12/06/2018, 9:28 PM
    How does this connection query work? I am trying to get the following to return a list of items but above code doesn't seem to work. Any ideas on this error? Cannot return null for non-nullable field ItemConnection.aggregate
  • l

    leafyshark

    12/06/2018, 9:28 PM
    -.php
  • l

    leafyshark

    12/06/2018, 10:11 PM
    What even is this error: Cannot return null for non-nullable field ItemConnection.aggregate
1...172173174...637Latest