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

    Gabriela

    06/12/2019, 2:23 PM
    Hello, I am having a hard time trying to refactor a code and I would like to know if anyone can help me I have a js fetch with a Rest api and I need to change it to GraphQL and Relay. But I've never used any of these technologies, I am trying to follow this code as example https://github.com/graphcool-examples/react-graphql/tree/master/quickstart-with-relay-modern But I cloned it and followed the steps and it is not working
    a
    • 2
    • 2
  • a

    Arnaud

    06/12/2019, 4:58 PM
    Hey there ! Anyone experienced issues in queries like this ?
  • a

    Arnaud

    06/12/2019, 4:58 PM
    "Cannot return null for non-nullable field "
  • a

    Arnaud

    06/12/2019, 4:59 PM
    it works perfectly on the Prisma server. but my graphql server fails to give me "linked" tables information. Any idea ?
    c
    p
    +2
    • 5
    • 83
  • c

    Cliff

    06/12/2019, 6:51 PM
    Anyone know when Prisma support for elastic search will be available?
    👀 1
  • j

    jasonmj

    06/12/2019, 10:43 PM
    So... has anyone here successfully deployed to Heroku? I've been having issues with it (trying all the advice I can find) and can't seem to make it happen. 😞
    h
    a
    h
    • 4
    • 19
  • j

    jasonmj

    06/12/2019, 10:54 PM
    I'm having the exact same issues mentioned here: https://github.com/prisma/prisma/issues/2753
  • m

    Matt Abrams

    06/13/2019, 1:20 AM
    I’m setting up Prisma with kubernetes; right now there are 4 microservices: DB, prisma, graphql server, and frontend. Currently only developing it locally, but I’m at the step right now where I’m setting up the graphql server, and I’m beginning to wonder how
    prisma.yml
    ,
    datamodel.prisma
    ,
    prisma deploy/generate
    should fit into the equation. Coming from a heroku background, typically the prisma deploy/generate step would be setup through a release step - my question is how and where this should fit into the picture as far as kubernetes goes. Current ideas: include prisma deploy/generate as a build step in the graphql server dockerfile, or maybe leverage an init container - any suggestions? Thanks!
    a
    h
    • 3
    • 5
  • h

    H

    06/13/2019, 1:38 AM
    in the prisma generated file, on queries do you have the parameter OR in the QueryInput for search bars? im the only one with this problem?
    • 1
    • 2
  • a

    Adam Ahrens

    06/13/2019, 5:32 AM
    Has anyone been getting an error like this when deploying on heroku? No matter what auth/order I link the accounts in it fails. Also did it in incognito mode, caching not really an issue.
    👍 1
    j
    • 2
    • 2
  • a

    Adam Ahrens

    06/13/2019, 6:15 AM
    oh and is it just me or is the admin panel not working at all
    o
    s
    • 3
    • 7
  • m

    Matt Abrams

    06/13/2019, 6:39 AM
    I’m trying to deploy the following datamodel:
    Copy code
    type Link {
      id: ID! @id
      createdAt: DateTime! @createdAt
      description: String!
      url: String!
    }
    but it’s resulting in following error:
    Copy code
    Link
        ✖ The field `id` is reserved and has to have the format: id: ID! @unique or id: UUID! @unique.
    Is the
    @id
    directive not supported anymore, or is something else going on here?
  • m

    Matt Abrams

    06/13/2019, 6:42 AM
    Update: looks like the issue was caused by a mismatch in version type between server and client
    👍 1
  • a

    Adam Ahrens

    06/13/2019, 7:16 AM
    also: does anyone have any advice on editing .prisma files and validating? the normal graphql editors won't work because of the custom directives
    h
    • 2
    • 1
  • p

    Peter Rogov

    06/13/2019, 12:16 PM
    Assume I have a data model like this:
    Copy code
    type CommodityVendor {
        id: Int! @id
        name: String!
        purchaseOrders: [CommodityPurchaseOrder!]!
    }
    
    type CommodityPurchaseOrder {
        id: Int! @id
        vendor: CommodityVendor!
    }
    I can now make queries with infinite recursion. Like this:
    Copy code
    query {
      commodityVendors {
        id
        name
        purchaseOrders {
          id
          vendor {
            id
            name
            purchaseOrders {
              id
              vendor {
                id
                name
              }
            }
          }
        }
      }
    }
    What should be the correct approach to limit such situations and only allow querying
    purchaseOrders
    under
    commodityVendors
    but not on nested levels?
  • y

    Yehonatan Levi

    06/13/2019, 12:16 PM
    hi i'm truing to understand how to use prisma, what about persmissions?
    p
    • 2
    • 1
  • a

    antoineg

    06/13/2019, 12:18 PM
    Hey guys, trying prisma and graphql these days to try if can fit our org new stack. Trying to see if it would be a good fit at the microservice level or not. How do you manage ACL and permission stuff ?
  • p

    Peter Rogov

    06/13/2019, 12:20 PM
    @antoineg I followed the well-described approach from guides/docs and use graphql-yoga + graphql-shield + prisma. So far works good but still researching and looking for some edge cases where it might not shine
    a
    • 2
    • 3
  • a

    antoineg

    06/13/2019, 12:43 PM
    I also read this article where the author speaks about rabbitmq for pubsub, how is rabbitmq connected to prisma and where can I read more about this ? RabbitMQ is my go to choice for events in our stack and it would be great to be able to subscribe to mutations https://techblog.commercetools.com/prisma-horizontal-scaling-a-practical-guide-3a05833d4fc3
    t
    d
    • 3
    • 11
  • y

    Yehonatan Levi

    06/13/2019, 1:02 PM
    all i am asking, prisma creates a graphql service which allows everything, how do i make it only work if i want it to work according to user permissions etc.?
    n
    • 2
    • 1
  • o

    Olaf

    06/13/2019, 1:19 PM
    I'm second guessing my prisma set up so far. I have a data model file and saw prisma generated the graphql resolves etc in a schema file. I then went on to make custom resolvers (graphql-yoga) that meant the prisma generated stuff is no longer used. However most of my custom code isn't as thorough as what prisma already generated for me (e.g. pagination, sorting etc). Furthermore, I have custom functions that are triggered when a mutation is called (e.g. send email when user registers). That is obviously not something I can include in the generated prisma schema as the file is overwritten upon prisma deploy/generate. Wanting the level of detail prisma generates in the schema file (mine is about 4500 lines) AND the ability to customise my resolvers, what do I do? May I also add that locally (localhost) prisma seems to run my own resolvers but at the cloud endpoint run it's own from the schema file. I swear I've read and tried every article/dock out there, any help is greatly appreciated. I guess I'm lost on how it all fits together in the end. Also wish to add permissions to queries mutations and fields (@Yehonatan Levi?) but -2 weeks into prisma - I'm in way over my head.
    c
    p
    +2
    • 5
    • 8
  • m

    Mike Stecker

    06/13/2019, 5:03 PM
    I have a datamodel setup with Prisma that I'd like to do but I don't know the right way to go about it, can someone give me a quick example of what a mutation might be that could solve this? I'm new to all this so forgive me if this is a newbie question... I want to have 3 tables/types:
    User
    (id, email, password, role),
    Profile
    (all the profile fields) and
    Account
    (for user settings/preferences)... The reason for this is because I've been reading that the User table should be as simple as possible. Is that correct? I'll also have other My question is: can I create a record for all 3 of these in the same mutation when the user signs up or do I need to run 3 separate mutations? Also... for the user's
    Profile
    , I want to have moderation on the admin side, so I'm thinking there will also be a "draft" type function I'll have to add too. Not sure if that information is needed but I thought I'd throw it out there
    o
    a
    • 3
    • 4
  • p

    Peter Rogov

    06/13/2019, 5:10 PM
    I've been reading that the User table should be as simple as possible
    Depends on your project architecture and requirements. I don't think it has anything to do with Prisma and/or datamodel. This is more a design consideration.
  • p

    Peter Rogov

    06/13/2019, 5:11 PM
    Try just making three types as you explain, generate a schema by prisma and try it in playground. See if it works for you. If not - make changes to the datamodel. With regard to how to implement moderation, etc. - this is again more a question of your system design, not exactly a data-layer related problem
  • h

    Hasen

    06/13/2019, 6:24 PM
    Hi all, I am wondering if anyone has something setup to get the generated schema from prisma dynamically like when your api server boots up? I want to be able to deploy prisma changes without redeploying my app to keep them in sync. Any suggestions or advice is welcome
    a
    • 2
    • 1
  • h

    H

    06/14/2019, 12:15 AM
    can you deploy several times into the same stage with heroku? im getting the error ENAMETOOLONG if i dont change every single time the stage. Any help would be awesome
  • a

    Adam Ahrens

    06/14/2019, 3:04 AM
    we're all getting it too
  • s

    Somteey

    06/14/2019, 5:45 AM
    Hello guys I am new to Prisma, is there any detailed tutorial to help me get settled in
  • a

    Adam Ahrens

    06/14/2019, 6:31 AM
    anyone know what the deal with this is? https://marketplace.visualstudio.com/items?itemName=Prisma.prisma&ssr=false#overview
    d
    i
    • 3
    • 8
  • c

    CCBCodeMonkey

    06/14/2019, 6:32 AM
    I launched my site I built in my free time based on prisma! https://www.pickmojo.com
    🚀 4
    👍 3
1...280281282...637Latest