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

    agustif

    06/25/2018, 6:46 PM
    Or would the prisma/forum be better suited for further discussion of collaborating with documentation
  • a

    agustif

    06/25/2018, 6:46 PM
    Any chance we could get a #documentation channel to help you build docs/examples and stuff?
    ✔️ 1
  • a

    agustif

    06/25/2018, 6:48 PM
    I’m currently trying to make NextJS+Prisma work based on the react fullstack advanced example, and think maybe other’s would love to see it added as another example instead of Vanilla react, you Know SSR /SEO benefits and such, also I guess VueJS would be a good example, in Gql-eu there was a great talk about vuejs and apollo working nicely, I’m sure prisma-bindings and graphql-yoga would work with it too
  • j

    jay.araujo

    06/25/2018, 7:41 PM
    hey guys, does prisma require docker even when using the hosted demo server?
  • j

    jay.araujo

    06/25/2018, 7:41 PM
    right now I’m using a 2009 mac that does not support docker
  • r

    rwatts3

    06/25/2018, 7:54 PM
    Happy Monday everyone, Wondering if anyone can give me some pointers. Is there a recommended CMS platform out there or GUI that can be used to connect with PRISMA? Either framework or some auto generating cms approach
    c
    • 2
    • 12
  • v

    Vinnie

    06/25/2018, 8:04 PM
    So, I’ve come back after a long time (it was still graphcool when I last was here!)
  • v

    Vinnie

    06/25/2018, 8:05 PM
    I am going through the tutorial for Auth/Permissions
  • v

    Vinnie

    06/25/2018, 8:05 PM
    but I keep getting this error at the first deploy of the service:
    Copy code
    User
        ✖ You are creating a required field but there are already nodes present that would violate that constraint.
    c
    n
    • 3
    • 25
  • j

    jay.araujo

    06/25/2018, 8:36 PM
    Hi I’m getting this error even thou I’m not using any tildes in my workspace name or service name:
  • j

    jay.araujo

    06/25/2018, 8:36 PM
    -.txt
  • j

    jay.araujo

    06/25/2018, 8:37 PM
    my workspace name is 5era and my project name is sescon… so what’s with the tilde that is being added?
    n
    • 2
    • 2
  • p

    pettanko

    06/25/2018, 8:44 PM
    Anyone else having a hard time loading https://app.prisma.sh/ ?
    j
    n
    • 3
    • 9
  • a

    anton-b

    06/25/2018, 10:59 PM
    How exactly does this
    refreshTokenFn()
    work here other than making sure that the token has not expired: https://github.com/graphql-boilerplates/react-fullstack-graphql/blob/23e47d49640384121550cef044551680734af143/advanced/src/components/RootContainer.js#L41
  • d

    Devin

    06/26/2018, 12:20 AM
    Could anyone tell me the proper way to have an account with an owner on the account type and also users like so?
    Copy code
    type Account {
      id: ID! @unique
      createdAt: DateTime!
      updatedAt: DateTime!
      archivedAt: DateTime
      owner: User!
      vessels: [Vessel!]!
      name: String!
      users: [User!]!
    }
    
    type User {
      id: ID! @unique
      createdAt: DateTime!
      updatedAt: DateTime!
      archivedAt: DateTime
      email: String! @unique
      password: String!
      name: String!
      posts: [Post!]!
      role: Role! @default(value: "CUSTOMER")
      customerType: CustomerType! @default(value: "FREE")
      account: Account
    }
    Do I really need to use relations on both the account and user type?
    n
    • 2
    • 2
  • i

    iamclaytonray

    06/26/2018, 1:14 AM
    I’m trying to deploy a server to EBS/EC2 but
    prisma
    (the dep) seems to be breaking npm installs. Anyone have this issue and want to give me some much needed advice? 🙂
    n
    • 2
    • 2
  • g

    Gorodov Maksim

    06/26/2018, 4:35 AM
    could somebody help me with writing mutation for this?
    Copy code
    type Action {
      id: ID! @unique
      title: String!
      date: String!
      description: String!
      karma: String!
      executors: String!
      members: [ActionMember!]!
      author: User!
    }
    
    type ActionMember {
      person: Person!
      side: String!
    }
    now I have such code but it doesn't work:
    Copy code
    createAction: (_, args, context, info) => {
          return context.prisma.mutation.createAction(
            {
              data: {
                title: args.title,
                date: args.date,
                description: args.description,
                karma: args.karma,
                executors: args.executors,
                members: args.members.map((member) => {
                  return {
                    person: {
                      connect: {
                        id: member.personId,
                      },
                    },
                    side: member.side,
                  };
                }),
                author: {
                  connect: {
                    id: args.authorId,
                  },
                },
              },
            },
            info,
          );
        },
    I have such error:
    Field "1" is not defined by type ActionMemberCreateManyInput at value.members.
    n
    • 2
    • 1
  • q

    qsys

    06/26/2018, 8:28 AM
    I'd like to do a query with a filter, which checks if the value of an attribute is
    null
    or an empty array... How can I do that?
    Copy code
    {"OR" [{"attribute...?": ...?}]}
    how do I filter properly?
  • a

    Alessio

    06/26/2018, 10:28 AM
    since_the_upgrade_to_v_1_10_I_get_the__Whoops_server_error__message__but_only_when_making_the_request_from_the_frontend__From_the_playground_it_s_working_correctly__Here_s_the_docker_stack_trace_.txt
  • c

    CHaBou

    06/26/2018, 10:29 AM
    Hi all! I'm trying to use ForestAdmin (that uses
    sequelize
    as ORM directly plugged to Prisma db). But I have some difficulties, especially to create an entity (and generate an ID). I suppose that we are not supposed to directly access/modify Prisma db?
  • u

    user

    06/26/2018, 10:36 AM
    A file was commented on
  • j

    Jim

    06/26/2018, 10:55 AM
    How can I add a middleweare function to my graphql yoga setup?
    Copy code
    function myMiddle(req, res, next) {
      next()
    }
    
    const server = new GraphQLServer({
      typeDefs: './src/schema.graphql',
      resolvers,
      middlewares: [myMiddle],
      context: req => ({
        ...req,
        db: new Prisma({
          typeDefs: 'src/generated/prisma.graphql', // the auto-generated GraphQL schema of the Prisma API
          endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma API (value set in `.env`)
          debug: true, // log all GraphQL queries & mutations sent to the Prisma API
          // secret: process.env.PRISMA_SECRET, // only needed if specified in `database/prisma.yml` (value set in `.env`)
        }),
      }),
    });
    
    server.start(() => console.log('Server is running on <http://localhost:4000'>));
    c
    a
    n
    • 4
    • 23
  • t

    tomhut

    06/26/2018, 12:26 PM
    Graphcool down for anyone else?
    😞 1
    ✋ 1
  • t

    tomhut

    06/26/2018, 12:28 PM
    Seems to be back up 😄
    parrotwave1 2
    parrotwave5 1
    parrotwave2 1
    parrotwave6 1
    parrotwave7 1
    parrotwave3 1
    parrotwave4 1
  • a

    alloy

    06/26/2018, 12:42 PM
    @divyendu Hi 👋 Is the vscode-graphql extension already supposed to work with a Relay Modern code-base? I see in the README that you only mention
    gql
    tags being recognized, which would seem to indicate that it doesn’t? However, even if I change
    graphql
    tags in my
    .tsx
    file to
    gql
    tags the extension doesn’t seem to be giving me any intellisense
    d
    • 2
    • 2
  • b

    blackxored

    06/26/2018, 12:56 PM
    where can i find docs about file uploads?
    t
    • 2
    • 1
  • p

    pettanko

    06/26/2018, 1:31 PM
    Can someone explain to me this error and how to solve it? I assume its because my profile uses user(id: '') and it have queried loggedInUser's id there.
    Copy code
    Error! Network error: Error writing result to store for query: query me { me { received { id from { id name avatar __typename } __typename } __typename } } Store error: the application attempted to write an object with no provided id but the store already contains an id of User:cjifvqd5i000o0728qrffx3y1 for this object. The selectionSet that was trying to be written is: me { received { id from { id name avatar __typename } __typename } __typename }
    n
    • 2
    • 3
  • s

    siyfion

    06/26/2018, 1:36 PM
    Is there any support currently in / upcoming in Prisma to support different DB endpoints for read vs write access. As this is the way most DBs seem to scale cross-region, it would be good to be able to specify a “local” read-replica and a “master” write DB endpoint.
    👍 1
  • s

    siyfion

    06/26/2018, 2:01 PM
    As (for instance) I’m using AWS RDS to host all my data, in eu-west-1, but we need to support users in the west coast of america, with the same dataset. So it makes sense to create a read-replica in us-west-1, and then have low-latency for the read operations.
  • s

    siyfion

    06/26/2018, 2:01 PM
    Clearly the writes still need to hit the master, but in most apps, and ours, it’s perfectly acceptable to have a slight delay on writes.
1...656667...637Latest