https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# prisma1-community
  • s

    sasi

    07/15/2020, 5:19 AM
    these is prisma1
  • a

    Abhischek

    07/17/2020, 10:43 AM
    Hi my prisma 1.34 container keeps crashing with a MongoDB out of memory error: Has anyone seen this before?
  • a

    Abhischek

    07/17/2020, 10:45 AM
    is there a way to pass:
    allowDiskUse:true
    to the prisma mongo driver config?
  • a

    Amin Bakhtiari Far

    07/18/2020, 8:14 AM
    I'm using graphql-yoga@1.18.3 and prisma 1 I want to import a enum from generated schema file fetched from prisma into server schema but it seems to not work. This is my import statement:
    Copy code
    # import input UserOrderByInput from './src/generated/schema.graphql'
    # import input UserOrderByInput from './../../generated/schema.graphql'
    These are the two different ways I tried to no avail. Any suggestions would be highly appreciated. And by the way this is how i instanciate GraphQLServer:
    Copy code
    import mainSchema from "./gql/schema/schema.graphql"
    const server = new GraphQLServer({
        typeDefs: [mainSchema],
        resolvers,
        context(request) {
            return {
                request,
                prisma,
                Auth,
                Policy
            }
        },
        fragmentReplacements
    })
  • m

    Michael

    07/19/2020, 11:39 AM
    is it a reasonable choice to start a new project with prisma1? It's mainly two reasons that make me think about that: • I'm planning to use react-admin and the data provider for prisma1/opencrud seems to work more out of the box (not tested, I just realized that setting up the one for 2 is not as simple) • the rust binary make problems in my nix-based deployment process
    s
    • 2
    • 3
  • a

    Ashwin Kudva

    07/27/2020, 4:10 PM
    Hi guys, quick question - I have access to a database in a MySQL box that I want to have Prisma introspecting/connecting to, but don't have access to make new databases. However, it seems as though Prisma needs to make a new database called 'prisma' to store its metadata. Is there any way to change this or redirect the tables it needs to create to the database I do have access to?
  • a

    Ashwin Kudva

    07/27/2020, 8:17 PM
    here's the error:
    Exception in thread "main" java.sql.SQLSyntaxErrorException: (conn=4316845) Access denied for user '****'@'%' to database 'prisma'
  • a

    Ashwin Kudva

    07/27/2020, 8:17 PM
    which seems to be caused by this database creation query: `Query is: CREATE SCHEMA IF NOT EXISTS
    prisma
    DEFAULT CHARACTER SET latin1;`
  • s

    Suhail

    07/28/2020, 4:14 AM
    Hi. I am getting the following error from prisma very often now. I am using 
    prisma1
     + 
    mongo
    Copy code
    GraphQL Error: {
      "0": "<",
      "1": "h",
      "2": "t",
      "3": "m",
      "4": "l",
      "5": ">",
      "6": "\r",
      "7": "\n",
      "8": "<",
      "9": "h",
      "10": "e",
      "11": "a",
      "12": "d",
      "13": ">",
      "14": "<",
      "15": "t",
      "16": "i",
      "17": "t",
      "18": "l",
      "19": "e",
      "20": ">",
      "21": "5",
      "22": "0",
      "23": "2",
      "24": " ",
      "25": "B",
      "26": "a",
      "27": "d",
      "28": " ",
      "29": "G",
      "30": "a",
      "31": "t",
      "32": "e",
      "33": "w",
      "34": "a",
      "35": "y",
      "36": "<",
      "37": "/",
      "38": "t",
      "39": "i",
      "40": "t",
      "41": "l",
      "42": "e",
      "43": ">",
      "44": "<",
      "45": "/",
      "46": "h",
      "47": "e",
      "48": "a",
      "49": "d",
      "50": ">",
      "51": "\r",
      "52": "\n",
      "53": "<",
      "54": "b",
      "55": "o",
      "56": "d",
      "57": "y",
      "58": " ",
      "59": "b",
      "60": "g",
      "61": "c",
      "62": "o",
      "63": "l",
      "64": "o",
      "65": "r",
      "66": "=",
      "67": "\"",
      "68": "w",
      "69": "h",
      "70": "i",
      "71": "t",
      "72": "e",
      "73": "\"",
      "74": ">",
      "75": "\r",
      "76": "\n",
      "77": "<",
      "78": "c",
      "79": "e",
      "80": "n",
      "81": "t",
      "82": "e",
      "83": "r",
      "84": ">",
      "85": "<",
      "86": "h",
      "87": "1",
      "88": ">",
      "89": "5",
      "90": "0",
      "91": "2",
      "92": " ",
      "93": "B",
      "94": "a",
      "95": "d",
      "96": " ",
      "97": "G",
      "98": "a",
      "99": "t",
      "100": "e",
      "101": "w",
      "102": "a",
      "103": "y",
      "104": "<",
      "105": "/",
      "106": "h",
      "107": "1",
      "108": ">",
      "109": "<",
      "110": "/",
      "111": "c",
      "112": "e",
      "113": "n",
      "114": "t",
      "115": "e",
      "116": "r",
      "117": ">",
      "118": "\r",
      "119": "\n",
      "120": "<",
      "121": "h",
      "122": "r",
      "123": ">",
      "124": "<",
      "125": "c",
      "126": "e",
      "127": "n",
      "128": "t",
      "129": "e",
      "130": "r",
      "131": ">",
      "132": "n",
      "133": "g",
      "134": "i",
      "135": "n",
      "136": "x",
      "137": "/",
      "138": "1",
      "139": ".",
      "140": "1",
      "141": "4",
      "142": ".",
      "143": "0",
      "144": " ",
      "145": "(",
      "146": "U",
      "147": "b",
      "148": "u",
      "149": "n",
      "150": "t",
      "151": "u",
      "152": ")",
      "153": "<",
      "154": "/",
      "155": "c",
      "156": "e",
      "157": "n",
      "158": "t",
      "159": "e",
      "160": "r",
      "161": ">",
      "162": "\r",
      "163": "\n",
      "164": "<",
      "165": "/",
      "166": "b",
      "167": "o",
      "168": "d",
      "169": "y",
      "170": ">",
      "171": "\r",
      "172": "\n",
      "173": "<",
      "174": "/",
      "175": "h",
      "176": "t",
      "177": "m",
      "178": "l",
      "179": ">",
      "180": "\r",
      "181": "\n",
      "status": 502
    }
    I am stuck here. What could be the reason? If I wait, half an hour, and send no query, this error would usually go away. It just says GraphQL error :  
    bad gateway
    t
    j
    r
    • 4
    • 46
  • s

    Suhail

    07/28/2020, 4:48 AM
    Anyone?
  • s

    Suhail

    07/29/2020, 6:02 AM
    I am using
    prisma
    with
    mongo
    and seeing this error. What does this mean?
    Copy code
    {"key":"error/unhandled","requestId":"local:ckd6os1k9014w079041w6lx4y","clientId":"default_default","payload":{"exception":"com.mongodb.MongoSocketReadException: Exception receiving message","query":"query ($where: SubSiteVisitsWhereInput) {\n  subSiteVisitses(where: $where) {\n    id\n    websiteId\n    lang\n    nimpressions\n    day\n    first\n    last\n    impressions {\n      ts\n      ip\n    }\n  }\n}\n","variables":"{\"where\":{\"day\":\"2020-07-29T00:00:00.000Z\",\"lang\":\"ta\",\"websiteId\":32}}","code":"0","stack_trace":"com.mongodb.internal.connection.InternalStreamConnection.translateReadException(InternalStreamConnection.java:543)\\n com.mongodb.internal.connection.InternalStreamConnection.access$1200(InternalStreamConnection.java:74)\\n com.mongodb.internal.connection.InternalStreamConnection$5.failed(InternalStreamConnection.java:500)\\n com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.failed(AsynchronousSocketChannelStream.java:252)\\n com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.failed(AsynchronousSocketChannelStream.java:220)\\n sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:128)\\n sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishRead(UnixAsynchronousSocketChannelImpl.java:430)\\n sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:191)\\n sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213)\\n sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:293)\\n sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)\\n java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\\n java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\\n java.lang.Thread.run(Thread.java:748)","message":"Exception receiving message"}}
    [INFO] Opened connection [connectionId{localValue:49, serverValue:519612}] to 122.42.142.32:27017
    [WARNING] Got socket exception on connection [connectionId{localValue:48, serverValue:519450}] to 122.42.142.32:27017. All connections to 122.42.142.32:27017 will be closed.
    [INFO] Closed connection [connectionId{localValue:48, serverValue:519450}] to 122.42.142.32:27017 because there was a socket exception raised by this connection.
    r
    • 2
    • 9
  • s

    Suhail

    07/29/2020, 6:03 AM
    Any idea what does this mean? It occurs randomly.
  • s

    Suhail

    07/29/2020, 6:10 AM
    @Ryan @Thenesh
  • y

    yourethejudge

    07/29/2020, 7:35 AM
    Hi, I've been getting this message after deploying to a demo prod server hosted on heroku. Got any ideas what this could mean? Any insight would help. Thanks!
    Copy code
    Deploying service `myApplication` to stage `prod` to server `myApp` !
    
    ERROR: GraphQL Error (Code: 503)
    
    {
      "error": "<!DOCTYPE html>\n\t<html>\n\t  <head>\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t<meta charset=\"utf-8\">\n\t\t<title>Application Error</title>\n\t\t<style media=\"screen\">\n\t\t  html,body,iframe {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t  }\n\t\t  html,body {\n\t\t\theight: 100%;\n\t\t\toverflow: hidden;\n\t\t  }\n\t\t  iframe {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tborder: 0;\n\t\t  }\n\t\t</style>\n\t  </head>\n\t  <body>\n\t\t<iframe src=\"//www.herokucdn.com/error-pages/application-error.html\"></iframe>\n\t  </body>\n\t</html>",
      "status": 503
    }
    
    Get in touch if you need help: <https://slack.prisma.io>
    To get more detailed output, run $ export DEBUG="*"
     !    'ENAMETOOLONG': spawn ENAMETOOLONG
    r
    l
    • 3
    • 4
  • s

    Suhail

    08/04/2020, 4:21 AM
    I have the schema for one of my Mongo Collection defined as
    type TM {
    id: ID! @id
    url: String! @unique
    clientId: String!
    sourceHashes: [String]
    translations: [Translations!]!
    }
    Now when I use the Prisma query call such as (NodeJS)
    const urlData = await <http://prisma.tM|prisma.tM>({
    url: "some url"
    });
    It almost takes 7-11 seconds for Prisma to return results. This lag is not there if I directly connect to Mongo and query. What is happening here? @Ryan Anything additional I must be doing?
    r
    • 2
    • 23
  • j

    Jeanre Swanepoel

    08/04/2020, 1:25 PM
    anyone had success with multiple order by?
  • j

    Jeanre Swanepoel

    08/04/2020, 1:26 PM
    Or how I can execute raw sql
  • j

    Jeanre Swanepoel

    08/04/2020, 1:30 PM
    https://github.com/prisma/prisma1/issues/62
  • s

    Suhail

    08/06/2020, 4:02 AM
    How could one change the timestamp timezone with Prisma? For e.g. in
    createdAt
    ,
    updatedAt
    k
    • 2
    • 1
  • s

    Suhail

    08/07/2020, 5:48 AM
    Working with Prisma + mongo, I have a document sized around 25MB. For the following Prisma query, Prisma crashes and gives timeout issues. I have been facing a lot of issues with Prisma + Mongo. What should I do? I am already on 12 GB RAM, 8 GB Heap, 3 Cores. @Ryan
  • s

    Suhail

    08/07/2020, 6:08 AM
    @Ryan https://github.com/prisma/prisma1/issues/5105
  • j

    Jainam Mehta

    08/09/2020, 4:59 PM
    Creating stage default for service default ! ! 'ECONNREFUSED': request to http://192.168.99.100:4466/management failed, reason: connect ECONNREFUSED 192.168.99.100:4466
  • s

    Suhail

    08/10/2020, 6:52 AM
    [INFO] Opened connection [connectionId{localValue:232, serverValue:54910}] to xx.xx.xx.xx:27017
    [WARNING] Got socket exception on connection [connectionId{localValue:231, serverValue:54673}] to xx.xx.xx.xx:27017. All connections to xx.xx.xx.xx:27017 will be closed.
    [INFO] Closed connection [connectionId{localValue:231, serverValue:54673}] to xx.xx.xx.xx:27017 because there was a socket exception raised by this connection.
    com.mongodb.MongoSocketReadException: Exception receiving message
    at com.mongodb.internal.connection.InternalStreamConnection.translateReadException(InternalStreamConnection.java:543)
    at com.mongodb.internal.connection.InternalStreamConnection.access$1200(InternalStreamConnection.java:74)
    at com.mongodb.internal.connection.InternalStreamConnection$5.failed(InternalStreamConnection.java:500)
    at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.failed(AsynchronousSocketChannelStream.java:252)
    at com.mongodb.internal.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.failed(AsynchronousSocketChannelStream.java:220)
    at <http://sun.nio.ch|sun.nio.ch>.Invoker.invokeUnchecked(Invoker.java:128)
    at <http://sun.nio.ch|sun.nio.ch>.UnixAsynchronousSocketChannelImpl.finishRead(UnixAsynchronousSocketChannelImpl.java:430)
    at <http://sun.nio.ch|sun.nio.ch>.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:191)
    at <http://sun.nio.ch|sun.nio.ch>.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213)
    at <http://sun.nio.ch|sun.nio.ch>.EPollPort$EventHandlerTask.run(EPollPort.java:293)
    at <http://sun.nio.ch|sun.nio.ch>.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: <http://java.io|java.io>.IOException: Connection timed out
    at <http://sun.nio.ch|sun.nio.ch>.FileDispatcherImpl.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
    at <http://sun.nio.ch|sun.nio.ch>.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:197)
    at <http://sun.nio.ch|sun.nio.ch>.UnixAsynchronousSocketChannelImpl.finishRead(UnixAsynchronousSocketChannelImpl.java:387)
    ... 7 more
    Getting this from Prisma. Keeps on restarting
  • s

    Suhail

    08/10/2020, 6:52 AM
    @Ryan
  • j

    Jeanre Swanepoel

    08/13/2020, 11:48 AM
    Hi all
  • j

    Jeanre Swanepoel

    08/13/2020, 11:49 AM
    I have a type defined as
    Copy code
    type TeamGoalMeta {
      id: ID! @id
      goal: TeamMeasurement!
      upperTriggerFrom: Int,
      upperTriggerTo: Int,
      lowerTriggerFrom: Int,
      lowerTriggerTo: Int,
      company: Company!
    }
    and then in my graphQL I have
    Copy code
    teamGoalMeta(goalId: ID!): TeamGoalMeta!
    but when I query the API
    Copy code
    query {
      teamGoalMeta(goalId:"ckdrfe75227p70a355f2bmavk") {
       	id  
      }
    }
    I get the following
    Copy code
    Error: Variable '$where' expected value of type 'TeamGoalMetaWhereUniqueInput!' but got: {"goalId":"ckdrfe75227p70a355f2bmavk"}. Reason: 'goalId' Field 'goalId' is not defined in the input type 'TeamGoalMetaWhereUniqueInput'. (line 1, column 8):
    "Variable '$where' expected value of type 'TeamGoalMetaWhereUniqueInput!' but got: {\"goalId\":\"ckdrfe75227p70a355f2bmavk\"}. Reason: 'goalId' Field 'goalId' is not defined in the input type 'TeamGoalMetaWhereUniqueInput'. (line 1, column 8):\nquery ($where: TeamGoalMetaWhereUniqueInput!)
    r
    • 2
    • 28
  • j

    Jeanre Swanepoel

    08/13/2020, 11:51 AM
    I am however seriously tired and probably need sleep
  • j

    Jainam Mehta

    08/17/2020, 9:22 AM
    Creating stage default for service default ! ! 'ECONNREFUSED': request to http://192.168.99.100:4466/management failed, reason: connect ECONNREFUSED 192.168.99.100:4466 Get in touch if you need help: https://slack.prisma.io To get more detailed output, run $ export DEBUG="*"
    r
    • 2
    • 11
  • j

    Jainam Mehta

    08/17/2020, 9:22 AM
    How to solve this any idea??
  • j

    Jainam Mehta

    08/17/2020, 3:49 PM
    ERROR: Authentication token is invalid: Token can't be decoded: Invalid signature for this token or wrong algorithm.
12345...10Latest