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

    Brian Speer

    11/20/2018, 4:56 PM
    I made a huge blunder. I had deleted my default$default in my db thinking it was not needed. (noob move). I can still access the 4466 playground but can not in 4000 playground. What is my best course of action? Do I delete Prisma (to remove the cluster) in the it's root directory and re-init or is there a better way?
  • r

    Ramin B

    11/20/2018, 5:14 PM
    question about the
    PRISMA_ENDPOINT
    url. Can someone explain what the different parts of the URL mean and how they map to the prisma server and databse? for example, this URL:
    <https://my-prisma-server.herokuapp.com/prisma-heroku-dev/dev>
    when I do a
    prisma deploy
    , what information is looking for? how does
    default
    play into all of this? if I deployed to
    <https://my-prisma-server.herokuapp.com/default/default>
    instead, would that essentially create my tables in the
    default
    schema in my db?
    n
    • 2
    • 4
  • k

    Kevin S

    11/20/2018, 10:48 PM
    @sorenbs I'm still having issues with the GraphCool hosted service. Console not loading, queries failing, etc.
  • k

    Kevin S

    11/20/2018, 10:49 PM
    Anyone else having issues?
  • k

    Kevin S

    11/20/2018, 10:57 PM
    @nilan Is there any way to contact anyone about this? It's extremely frustrating.
    i
    • 2
    • 3
  • k

    Kevin S

    11/20/2018, 11:04 PM
    And it's back online. It's been up and down twice in the last 8 minutes.
  • h

    huv1k

    11/20/2018, 11:06 PM
    Please use threads thx ❤️
    🦜 1
  • k

    Kevin S

    11/20/2018, 11:24 PM
    And it's down again.
  • b

    Bruna Aleixo

    11/20/2018, 11:55 PM
    Can anyone help me: I am trying to run the following mutation:
    Copy code
    mutation {
      updateOrder(
        id: "cjoq8c91d0nb701103qy545x3",
        orderItems: [{
          quantity: 1,
          itemId: "cjollwnqt06o90179wzsqbm7d",
        }]
      ) {
        id
      }
    }
    My data schema is:
    Copy code
    type Order @model {
      createdAt: DateTime!
      id: ID! @isUnique
      table: Int!
      orderItems: [OrderItem!]! @relation(name: "OrderItems")
    }
    
    type OrderItem @model {
      id: ID! @isUnique
      quantity: Int!
      item: Item! @relation(name: "OrderItem")
      order: Order! @relation(name: "OrderItems")
    }
    And I keep getting the following error:
    Copy code
    "message": "Argument 'orderItems' expected type '[OrderorderItemsItem!]' but got: [{quantity: 1, itemId: \"cjollwnqt06o90179wzsqbm7d\"}]. Reason: '[0].quantity' Field 'quantity' is not defined in the input type 'OrderorderItemsItem'. (line 4, column 17):\n orderItems: [{\n ^\n (line 5, column 7):\n quantity: 1,\n ^",
    r
    • 2
    • 1
  • s

    shawnmmatthews

    11/21/2018, 12:11 AM
    Has anyone built any kind of revisioning history model in Prisma? Curious about how you went about it. Trying to build an app that has one small piece that needs an editorial workflow, and am trying not to lean on an existing CMS if possible
  • r

    Roman Z.

    11/21/2018, 7:30 AM
    Hi there! a bit new to graphql and prisma and so far struggling with querying data by nested property field values. My schema:
    Copy code
    type User @db(name: "users")
    {
      id: ID! @id
      name: String! @unique
      property: Property! @relation(link: INLINE)
    }
    
    type Property @db(name: "properties")
    {
      id: ID! @id
      createdAt: DateTime! @createdAt
      updatedAt: DateTime! @updatedAt
      propertyName: String!
      users: [User!]! @relation(strategy: EMBED)
    }
    Currently I have this query that allows me to query users by name:
    Copy code
    query {
      user(where: {name: "john"}) {
        id,
        name,
        property {
          propertyName
        }
      }
    }
    But what I need is: to extend it to include
    filter
    by
    propertyName
    and seems like prisma's generator is not creating relational filters for me as in this example: https://www.prisma.io/forum/t/graphql-query-structure-how-can-i-return-a-deeply-nested-array-up-top/455/2 pls halp 🙏
    n
    • 2
    • 6
  • p

    prilutskiy

    11/21/2018, 8:18 AM
    Guys, Is there somewhere a changelog for prisma? I'm now on 1.19 and I wanna know what's new in 1.20
    e
    • 2
    • 1
  • i

    Industrial

    11/21/2018, 8:55 AM
    Hi
  • i

    Industrial

    11/21/2018, 8:56 AM
    I have a Prisma server running with my data model and I have a TypeScript React SSR app running on top of that. What I was looking for was a way to generate TypeScript types based on the Prisma Data model. I see that
    graphqlgen
    has been released but I have some problems with it.
    n
    • 2
    • 3
  • l

    Lobo

    11/21/2018, 9:40 AM
    Hi everyone!! another newbie playing with Prisma/GraphQL... 😅 I'm struggling with one thing... it doesn't have to be that difficult... I'm missing something Basically I have my model Video
    Copy code
    type Video {
      id: ID! @unique
      title: String!
      tags: [Tag!]!
    }
    with the mutation:
    Copy code
    createVideo(
        title: String!, 
        tagsIds: [ID!],
      ): Video!
    and this is what I have right now in the resolver... I've tried several things
    Copy code
    createVideo: (root, args, context, info) => {
          return context.db.mutation.createVideo({
            data: {
              title: args.title, 
              tags: {
                connect: {
                  id: args.tagsIds
                }
              },
            },
          }, info)
        },
      },
    This is what I'm sending, the two IDs I'm sending are tags that exist on database:
    Copy code
    mutation {
      createVideo(
        title: "Neehar Venugopal - A Beginner's Guide to Code Splitting Your React App - React Conf 2017"
        tagsIds: ["cjoopece2000a0899n8jsjkr4", "cjoo9e0eq004d0824nibmtzl2"],
      ) {
        id
      }
    }
    probably missing something basic... but I haven't found much information about how to send a group of IDs related to another table any help will be appreciated 🙂 and this is the error I'm getting, by the way...
    Expected type ID at value.id; ID cannot represent value: ["cjoopece2000a0899n8jsjkr4", "cjoo9e0eq004d0824nibmtzl2"]
    n
    • 2
    • 12
  • n

    Nick

    11/21/2018, 10:14 AM
    Is there an official example using cookies with prisma?
  • t

    theom

    11/21/2018, 11:25 AM
    OS: Windows 10 Pro apollo-boost: "^0.1.16" apollo-client: "^2.4.2" react": "^16.5.2", react-adopt": "^0.6.0", react-apollo": "^2.2.1", react-dom": "^16.5.2", So, I'm getting the following error (see attached image) when attempting to run a mutation, as follows:
    Copy code
    const UPDATE_ITEM_MUTATION = gql`
    mutation updateItem_mutation($id: ID!, $quantity: Int){
      updateItem(
        data: {
          quantity: $quantity
        }
        where: {
          id: $id
        }
      ) {
        id
        quantity
      }
    }
    `;
    
        const { client } = this.props;
    
        const updateItemMutation = (itemID, quantityValue) => {
          const id = itemID;
          const quantity = quantityValue;
    
          console.log('item id = ', id);
          console.log('quantity = ', quantity);
    
          client.mutate({
            mutation: UPDATE_ITEM_MUTATION,
            variables: {
              id,
              quantity,
            },
          }).catch(this.handleSubmitError);
        }
    What am I overlooking here?
    n
    n
    • 3
    • 14
  • j

    jdoyle112

    11/21/2018, 2:44 PM
    Hi has anyone here implemented google or facebook auth on their prisma servers? Just looking for an example of how that might be done
  • j

    Jørgen V

    11/21/2018, 2:56 PM
    @jdoyle112 https://github.com/prisma/templates/tree/master/auth/facebook
  • j

    Jørgen V

    11/21/2018, 2:56 PM
    I’m new to GraphQL, but I just saw this earlier today. Hope it covers what you are looking for.
  • j

    jdoyle112

    11/21/2018, 3:11 PM
    Thank you!
  • a

    andrux

    11/21/2018, 6:08 PM
    hi, any word on when we will be able to choose an AWS database provider in Prisma? or anything else other than Heroku
    👍 1
    s
    r
    • 3
    • 2
  • o

    onePunchMan

    11/21/2018, 6:15 PM
    is there a reason why prisma made docker required ?
    n
    s
    • 3
    • 2
  • n

    notrab

    11/21/2018, 6:16 PM
    Hey everyone! Diving back into Prisma after a long break. I have 10+ microservices that listen to server side subscriptions, and inside these I’d like to update some data that lives in Prisma. Is there anyway to bring prisma-client to these? I’m thinking that I’d need to roll it into a npm package I can share amongst the services but this feels overkill. Currently I use
    graphql-request
    but I really want to reduce some of the mutations that are only really used by the microservices/background jobs.
    n
    • 2
    • 17
  • m

    Michael

    11/21/2018, 6:21 PM
    Is this is better channel to post to over #deployment when it comes to issues?
  • r

    rwatts3

    11/21/2018, 7:16 PM
    Hello everyone and happy holidays. Can someone please tell me what database is shown in the list on the home page of the main site. It is the 3rd database and I'm not familiar with the icon.
  • r

    rwatts3

    11/21/2018, 7:24 PM
    Nvm I figured it out, it looks like it's Amazon RDS and the last one is Amazon Dynamo DB. I'd like to suggest that maybe the web devs at prisma add alt and title tags to the images/svgs so that for logos that may not be commonly seen can be easily distinguished
    t
    • 2
    • 1
  • k

    KrisTemmerman

    11/21/2018, 8:50 PM
    Hi, I'm looking for a way to setup prisma without using docker-compose as my host only supports docker,
  • o

    onePunchMan

    11/21/2018, 8:57 PM
    I have an existing database with the a field called user_id if I run
    prisma deploy
    it is telling me that id is required
  • o

    onePunchMan

    11/21/2018, 8:58 PM
    can I somehow tell prisma that my field called user_id is the required id ?
    e
    • 2
    • 1
1...162163164...637Latest