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

    cRUSHER

    09/22/2018, 1:19 PM
    im new in the slack and i want to ask if graph.cool was the first release and then they build out of graph.cool the prisma framework?
  • c

    cRUSHER

    09/22/2018, 1:25 PM
    what is the best compination for the best performance? golang + graphql + nosql or mysql/mariadb or nodejs + graphql + nosql or mysql/mariadb
  • a

    Anders

    09/22/2018, 3:26 PM
    I’m having problem with post deploy hook…getting my schema back error ````
  • a

    Anders

    09/22/2018, 3:26 PM
    Copy code
    post-deploy:
    spawnSync graphql ENOENT
    Running graphql get-schema -p prisma ✖
  • a

    Anders

    09/22/2018, 3:27 PM
    prisma.yml
    Copy code
    endpoint: ${env:PRISMA_ENDPOINT}
    datamodel: datamodel.graphql
    # secret: ${env:PRISMA_SECRET}
    
    hooks:
      post-deploy:
        - graphql get-schema -p prisma
  • a

    Anders

    09/22/2018, 3:27 PM
    any thoughts?
  • g

    Gustavo Britto

    09/22/2018, 6:47 PM
    Hi, Buddy.
  • g

    Gustavo Britto

    09/22/2018, 6:47 PM
    Can you please help me with that issue? I cannot authorize CLI.
  • s

    Sh4reef

    09/22/2018, 10:22 PM
    What is the appropriate implementation of the subscription using Prisma Client I’m getting null all the time ?
  • s

    Sh4reef

    09/22/2018, 10:22 PM
    message has been deleted
  • i

    itaied

    09/23/2018, 7:11 AM
    Hello, can someone explain to me why do I need the prisma authentication? Why should I configure the
    secret
    ? As I see it, I want to disable the access to the general prisma service (the one with all the data access), and allow access only to my filtered service. If I set the secret and set it (or pass it) to the client, anyone can use it later, it doesn't solve any authentication issue
  • e

    Entrepreneur3

    09/23/2018, 1:29 PM
    Hey guys, I would really like to refer to my question over here in order to get help. I hope this is ok: https://prisma.slack.com/archives/CCWDULGUW/p1537708380000100
    r
    • 2
    • 12
  • h

    hinsxd

    09/23/2018, 6:52 PM
    Hi everyone! I am trying to start a new project with GraphQL and prisma recently. But there are some issues in getting a "good" modelling of my data. Basically I want to let people register with google login, and they can choose to be either
    student
    or
    teacher
    . Student can only
    createQuestion
    and teachers can only
    answerQuestion
    . As I come from the REST world, when I first constructed the data model, I started with
    Copy code
    type Question {
       student: User! @relation(name:"ask")
       teacher: User @relation(name:"answer")
    }
    type User {
       askedQuestions: [Question!]! @relation(name:"ask")
       answeredQuestions: [Question!]! @relation(name:"answer")
       role: Role! // enum Role { New Student Teacher }
    }
    Quickly I found that a lot of post-query logic has to be done (on choosing which variable to process on
    getUser
    for example) on the client side, which should not happen. I thought of two roles sharing the same variable
    questions
    because their functions are exclusive, but this would be SO confusing for further development. Then I learnt
    implements
    feature of GraphQL and tried the following in `datamodel.graphql`:
    Copy code
    type Question {
       student: Student!
       teacher: Teacher
    }
    interface User { role: Role! }
    type Student implements User { askedQuestions: [Question!]! }
    type Teacher implements User { answeredQuestions: [Question!]! }
    I omitted the repeated fields for simplicity. I learnt this from https://graphql.org/learn/schema/ , and that is actually what I want: role-based fields. Then I found out that prisma will flatten all
    implements
    and give me different types. I started to realize that I should put this in
    schema.graphql
    rather than
    datamodel.graphql
    . But then, how can I construct my
    datamodel.graphql
    ? Should I first make a
    User
    type like the first paragraph of code, then implement a schema like the second one, followed by resolvers to fetch from
    ctx.db.Users
    ? Please let me know if I am on the right track! Thanks so much!
  • d

    DBabel

    09/23/2018, 9:11 PM
    Hey there, did anyone knows how to use supertest with graphql-yoga ? I don't know how to access the classic "Express" object to map it in supertest. https://www.npmjs.com/package/supertest
  • j

    jjaybrown98

    09/24/2018, 12:50 PM
    Would love some feedback on my recent article “Production ready Prisma” @jjaybrown98 https://medium.com/@jjaybrown98/production-ready-prisma-2da868a407dd
    👀 4
    👏🏻 4
    🎉 5
    fast parrot 2
    d
    a
    • 3
    • 15
  • h

    hez

    09/24/2018, 1:42 PM
    Any tips for running prisma/apollo on EC2 with an external database? Attempting currently to deploy schema files to EC2 and build prisma on the instance... not sure if that's the right approach, as it does not seem to be panning out so far...
    • 1
    • 1
  • j

    Julien Goux

    09/24/2018, 2:15 PM
    hello, is it possible to declare an autoincrement sequence using prisma?
  • j

    Julien Goux

    09/24/2018, 2:15 PM
    If not, is there any downside of doing it manually inside postgres?
  • j

    Julien Goux

    09/24/2018, 2:18 PM
    example, I declare something like : "sequence Int!" in the datamodel, and I manually deal with the sequence inside postgres by altering the column with DEFAULT nextval('table_name_id_seq')
    l
    • 2
    • 1
  • j

    jdoyle112

    09/24/2018, 3:20 PM
    When I run prisma deploy, the api endpoints are automatically generated. WHen I deploy to a server (zeit.now) they are not. What do I need to do to have those endpoints generated when deploying to now?
    n
    p
    • 3
    • 30
  • a

    Andres Montoya

    09/24/2018, 3:46 PM
    Hi, someone know how can I save some text or image automatically in the database like Google drive? I mean, if I have a input where I put some text, or I upload some image, I want to save that text or image in the database automatically.... I've found something called "blob" of javascript, it's this enough for what I need? Or someone has another idea? Thanks :)
  • g

    go4cas

    09/24/2018, 4:48 PM
    Hi. In the Tutorials section of the docs, the "Connect to Prisma from the frontend" link is not working ...
  • j

    jdoyle112

    09/24/2018, 4:51 PM
    ^ https://www.prisma.io/docs/tutorials/connect-to-prisma-from-the-frontend-fbgaeyrou7/
  • x

    xiaoqf10

    09/25/2018, 4:38 AM
    How to define a field with resolver with GraphQL SDL?
  • x

    xiaoqf10

    09/25/2018, 4:38 AM
    const ProductType: GraphQLObjectType = new GraphQLObjectType({ name: 'Product', fields: () => ({ name: { type: new GraphQLNonNull(GraphQLString), resolve: async ({ name }) => { return `${name}.....`; }, }, }), });
  • x

    xiaoqf10

    09/25/2018, 4:38 AM
    e.g the name field above
  • x

    xiaoqf10

    09/25/2018, 5:45 AM
    😯 I know. In resolvers, the save as Query.
  • l

    Lucas Munhoz

    09/25/2018, 7:36 AM
    Hey folks, the answer for this is still valid? https://www.prisma.io/forum/t/append-to-info-to-get-additional-fields-back/3972
  • s

    silkyland

    09/25/2018, 9:20 AM
    Prisma Client enum bug? https://github.com/prisma/prisma/issues/3174
    n
    • 2
    • 1
  • l

    Lotafak

    09/25/2018, 12:14 PM
    Hello 👋 I am using prisma cloud service to serve the files for our application. We can read in the documentation
    Files are secured using a unique and unguessable secret. You can protect this secret by using the read permissions on the File type as with any other type. For example, you can restrict access to a file’s secret to authenticated users.
    File downloads however are currently not governed by permissions on the File type. As such, everyone with a file’s secret and the project id can download a file. Please reach out in the Forum or Slack if you have any questions about this.
    So, basically I need to restrict download itself. As it says, I’m reaching the slack to ask for a possible solutions to this
    n
    • 2
    • 4
1...123124125...637Latest