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

    Andrei Bacescu

    05/16/2019, 6:22 AM
    Hello, This link: https://www.prisma.io/features/databases advertise that Prisma supports full-text search, but in the docs, I don't find anything about this feature. In addition, I found this open issue related to the full-text search: https://github.com/prisma/prisma/issues/1183. Can anyone tell me about the availability of this feature? Thanks!
    h
    b
    • 3
    • 3
  • o

    Olaf

    05/16/2019, 6:54 AM
    Hello, I would like to connect Prisma to a MySQL database on AWS but have only found how to do it via the docker implementation. Is there a way to define the AWS database endpoint directly and will I still have access to Prisma Admin?
    b
    h
    n
    • 4
    • 3
  • t

    taikn

    05/16/2019, 7:55 AM
    For some reason metrics stopped working for my self-hosted server connected to prisma cloud, in logs I can see following messages:
    akka.stream.scaladsl.TcpIdleTimeoutException: TCP idle-timeout encountered on connection to [<http://metrics-eu1.prisma.io:443|metrics-eu1.prisma.io:443>], no bytes passed in the last 30 seconds
    Has this happened to anyone already?
    h
    • 2
    • 3
  • n

    Nelson Pecora

    05/16/2019, 2:13 PM
    So, I'm thinking about versioned data, and figured out an easy way to do it (using an abtraction that has a 1:m relation to Version records) BUT now mutations are weird. Sending partial data to the API means I need to resolve all relations in my most recent Version, then merge that data with the data I want to save, then create a new version. All of that is really starting to feel like an antipattern in GraphQL, so I'm worried it's a bad approach. How have other people solved for versioned data? (googling mostly gets me results about versioned APIs 😐 )
    • 1
    • 3
  • n

    Nelson Pecora

    05/16/2019, 2:15 PM
    e.g. Article (whose ID I reference in my API) -> ArticleVersion (which has all of the data like
    title
    ,
    author
    , etc -> Tag or RelatedArticle or similar relations from ArticleVersion
  • t

    Taylor

    05/17/2019, 2:18 PM
    How does one handle case sensitivity when it comes to search queries in Prisma?
    t
    • 2
    • 2
  • j

    Jonathan Demirgian

    05/17/2019, 7:18 PM
    is it accurate to think about about prisma's crud functions as a huge collection of implemented resolvers for the various fields in the datamodel?
  • c

    Craig

    05/17/2019, 7:43 PM
    @Jonathan Demirgian I like to think so. It’s basically a graphQL API that fully exposes the underlying data model (which is probably not what you want in a final implementation but it gives you the building blocks to easily implement a more scaled down/customized API)
    👌 1
    🙌 2
  • r

    rdc

    05/18/2019, 8:35 AM
    where can I find a react implementation tutorial? Please
  • r

    rdc

    05/18/2019, 9:27 AM
    how to enter nested data on apollo-boost gql:
    Copy code
    export const UPDATE_CAMPAIGN = gql`
        mutation updateCampaign(
            $campaignName: String
            $startDate: String
            $duration: Int
            $approvedDate: String
            $CAMPAIGNSTATUS: CAMPAIGNSTATUS
            $ARTWORKSTATUS: ARTWORKSTATUS
            $contentStatusDeclineCause: String #for our reference
            $artworkComment: String
            $artworkSVGFiles:{
                $create:[
                    {
                        $bucket: String!
                        $region: String!
                        $key: String!
                    },
                    {
                        $bucket: String!
                        $region: String!
                        $key: String!
                    }
                ]
            }
    $artworkSVGFiles is not working!!! 😭 Any suggestions pls? Thanks
  • g

    Gaurav

    05/18/2019, 9:53 AM
    I am having trouble with prisma admin and playground after renaming a required field. I have renamed
    emailId: string! @unique
    to
    email: string! @unique @rename(oldName: "emailId")
    . Now playground and admin don't give me
    email
    field to query with, but only
    emailId
    . And, if I use
    emailId
    field, I get this error in AWS logs:
    Copy code
    {"key":"error/unhandled","requestId":"local:cjvtbwikjdlacjoicq6mx","clientId":"my-prisma@dev","payload":{"exception":"java.sql.SQLSyntaxErrorException: (conn=17632) Unknown column 'Alias.emailId' in 'field list'","query":"query GetUsers
    All the trouble remains even after I have reset the data and deployed again (without
    rename
    directive this time) (I assume since it's not resetting schema). How do I fix this? Thanks! 🙂
    d
    • 2
    • 6
  • s

    Slackbot

    05/18/2019, 11:06 AM
    This message was deleted.
    b
    • 2
    • 1
  • a

    A A

    05/19/2019, 7:11 AM
    I'm trying to add a
    scopes
    field to my user object, so that I can have permission scopes on fields and mutators like "read:users" or "write:media" or things like that using custom directives (
    @hasScope(scope: ["read:users"])
    . I've tried to add a
    scopes: [String]!
    field to my
    datamodel.prisma
    field, and when I try to
    prisma deploy
    it gets stuck with an error that ✖️ Valid values for the strategy argument of
    @scalarList
    are: RELATION. which I assume means that I can't have lists of scalars like `String`s in my Prisma schema for some reason. Does anybody know of a good way to work around this limitation?
    b
    b
    • 3
    • 4
  • d

    Darryl

    05/19/2019, 1:12 PM
    Can anyone help me with an issue I’m having while migrating to nexus-prisma? I’ve posted a question in Spectrum: https://spectrum.chat/prisma/general/migrated-to-nexus-prisma-and-im-having-trouble-with-a-mutation~e4973a83-dedb-4d4d-ae46-af87035b72b6
    b
    • 2
    • 2
  • k

    Kianoosh

    05/19/2019, 5:13 PM
    hey guys, How can i add an extra object to the data object that returned by prisma ? the main purpose is to find out about the existence of next page for pagination, Just like the photo that is attached.
    b
    • 2
    • 3
  • b

    Bjoern

    05/19/2019, 6:21 PM
    How would I conditionally add a conditional for a query? I have this but it queries with the conditional or not at all:
    Copy code
    query GET_MESSAGES($community: ID, $isGeneral: Boolean!) {
      messages
      (where: {community: {id: $community}}) @skip(if: $isGeneral)
      {
        text 
        id
      }
    }
  • b

    Bjoern

    05/19/2019, 6:22 PM
    then I have this, but the name of the message is different depending on the conditional and it doesn't feel very clean:
    Copy code
    query GET_MESSAGES($community: ID, $isGeneral: Boolean!) {
      messages
      (where: {community: {id: $community}}) @skip(if: $isGeneral) 
      {
        text 
        id
      }
       unfiltered: messages @include(if: $isGeneral) {
        id
        text
      }
    }
  • m

    Morten Bo Rønsholdt

    05/20/2019, 11:37 AM
    hi! I have the following query:
    Copy code
    query Test {
      business(where: { id: "93f13" }) {
        publicationBatches {
          publications(first: 1) {
            id
            localeCode
            paged {
              id
              pages {
                pageNumber
                image {
                  url(width: 700)
                }
              }
            }
          }
        }
      }
    }
    what essentially happens is: 1) fetch business 2) fetch publication batches (there's 3) 3) fetch publications for publication batches (there's 1 for each) 4) fetch pages for each publication (there's around 100 for each) 5) fetch image for each page that's at least 600 objects that need to be fetched and it takes 5-10s with the above query. I was under the impression that Prisma had an efficient dataloader but I can't launch with these response times. what can I do to improve loading times?
    d
    • 2
    • 17
  • l

    Luke Taylor

    05/20/2019, 1:16 PM
    I'm getting an error where it looks like the Prisma admin dashboard is trying to query a field that I've deleted from the datamodel. I've redeployed and restarted the server multiple times
    m
    d
    • 3
    • 3
  • l

    Luke Taylor

    05/20/2019, 1:16 PM
    Any ideas?
  • l

    lewisedc

    05/20/2019, 1:34 PM
    anyone know why my dev sever isn't case sensitive but my prod server is. For example
    Copy code
    query {
      products(where: {name_contains: "logo"}) {
        name
      }
    }
    matches 'Logo Distressed Hoodie' on my dev server but not on my prod server
    f
    • 2
    • 1
  • d

    David Allen

    05/20/2019, 5:20 PM
    Is it at present possible to pass an auth token header when using graphql-cli? I was attempting to follow what I found here: https://github.com/graphql-cli/graphql-cli/issues/283 which suggests that you can just say
    --header Authorization="Bearer: $TOKEN"
    but that appears not to be respected and passed to the server (at least not for get-schema) and other operations like ping complain of it as an unrecognized option. So I can't quite tell if some operations just aren't checking for the presence of ignored / foreign flags, or if it's not functioning correclty
  • c

    captaindaylight

    05/20/2019, 5:36 PM
    I just deployed a prisma server with fargate and I have the endpoint exposed with a public IP, which makes it easy to do
    prisma deploy
    but clearly is not secure. I want to make it only accessible to my api server internally, but then I don’t know how to run the deploy command. How have other solved this?
    t
    j
    n
    • 4
    • 32
  • r

    Rodrigo Gross López

    05/20/2019, 6:00 PM
    Hi guys!
  • r

    Rodrigo Gross López

    05/20/2019, 6:02 PM
    I´m suddenly getting this errors when deploying to demo server: 'One field of the type
    User
    must be marked as the id field with the
    @id
    directive.' , and so for all models, Last time I checked this project deploying worked just fine with current setup. Hope someone know something about it
    s
    n
    • 3
    • 4
  • r

    Rodrigo Gross López

    05/20/2019, 6:03 PM
    Thanks!
  • r

    Rodrigo Gross López

    05/20/2019, 6:09 PM
    Don´t mind me, just found an answer here, sorry to bother, I am almost new using slack
  • d

    dan

    05/20/2019, 8:02 PM
    Hey guys, we are deploying a new instance of our prisma server onto Atlas with multiple regions. But we are receiving this error, any ideas?
  • d

    dan

    05/20/2019, 8:02 PM
    No server chosen by ReadPreferenceServerSelector
  • d

    dan

    05/21/2019, 12:46 AM
    Is anyone connecting to a mongo cluster with multiple regions and replicas?
1...270271272...637Latest