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

    noahdavis

    07/03/2018, 2:23 AM
    Or a better question would be - if I reset my masteruser password in AWS RDS, what happens to prisma cloud?
    n
    • 2
    • 1
  • g

    Gorodov Maksim

    07/03/2018, 5:17 AM
    I have a subscription for deleting
    Person
    , but after deleting I get
    null
    in data. Why?
  • g

    Gorodov Maksim

    07/03/2018, 5:17 AM
  • g

    Gorodov Maksim

    07/03/2018, 5:17 AM
    that's how my subscription look like:
    Copy code
    personDeleted: {
          subscribe: (parent, args, context, info) => {
            return context.prisma.subscription.person({ where: { mutation_in: ['DELETED'] } }, info);
          },
        },
    Copy code
    personDeleted: PersonSubscriptionPayload!
  • g

    Gorodov Maksim

    07/03/2018, 5:18 AM
    I have subscriptions for creating and updating
    Person
    but they work fine
  • g

    Gorodov Maksim

    07/03/2018, 5:19 AM
    that's how my subscription look like on frontend:
    Copy code
    export const DELETE_PERSON_SUBSCRIPTION = gql`
      subscription personDeleted {
        personDeleted {
          node {
            id
            name
            position
            description
            karma
            author {
              nickname
            }
          }
        }
      }
    `;
    (same as creating or deleting, just another name (
    personCreated
    ,
    personUpdated
    ,
    personDeleted
    ))
  • g

    Gorodov Maksim

    07/03/2018, 5:37 AM
    okay, i found out how i had to write my subscription on frontend:
    Copy code
    export const DELETE_PERSON_SUBSCRIPTION = gql`
      subscription personDeleted {
        personDeleted {
          previousValues {
            id
          }
        }
      }
    `;
  • s

    Seppe Snoeck

    07/03/2018, 7:56 AM
    https://prisma.slack.com/archives/CA491RJH0/p1530193347000509
    j
    • 2
    • 5
  • c

    codepunkt

    07/03/2018, 8:12 AM
    can anyone help me getting started implementing a feature? 😀
  • h

    halborg

    07/03/2018, 8:33 AM
    Hey all 🙂 I’m interested in monitoring my local Docker DB a bit, in order to see how many DB hits my different resolvers create. How would I go about that?
    👍 2
    d
    j
    • 3
    • 19
  • a

    Arnab

    07/03/2018, 9:14 AM
    Interesting. I am looking at the logs for my postgres container and I find the same SQL query being run for two different graphql queries. These are the SQL queries:
    Copy code
    2018-07-03 09:10:47.389 UTC [58] LOG:  execute <unnamed>: SELECT * FROM "default$default"."Department" AS "Alias" WHERE TRUE ORDER BY  "Alias"."id"  asc
    2018-07-03 09:10:54.081 UTC [58] LOG:  execute <unnamed>: SELECT * FROM "default$default"."Department" AS "Alias" WHERE TRUE ORDER BY  "Alias"."id"  asc
    These are the GraphQL queries:
    Copy code
    query {
      departments {
        description
        name
      }
    }
    
    query {
      departments {
        name
      }
    }
    Shouldn't these queries be selective about what fields are queried in the database instead of just doing a wildcard on both? Maybe there is some kind of lower threshold (say less than 3 cols in the table) where prisma just does wildcard?
    n
    • 2
    • 2
  • c

    codepunkt

    07/03/2018, 9:24 AM
    I'm trying to add @default to an array field, like this:
    Copy code
    type User {
      id: ID! @unique
      email: String! @unique
      name: String!
      roles: [UserRole!] @default(value: ["User"])
    }
    
    enum UserRole {
      Admin
      User
    }
    When i create a new user without explicitly defining roles, roles winds up being empty. What is the correct syntax for this?
    a
    • 2
    • 1
  • c

    codepunkt

    07/03/2018, 9:33 AM
    Seems it's not possibe, which is a bummer. Currently searching for an issue that reflects this 🙂
    a
    • 2
    • 2
  • m

    Moritz

    07/03/2018, 10:27 AM
    Hi all, we are quite happy to launch or first prisma backend in production soon. Preparing the apps launch, our management has been asking questions about the GDPR compliance. So I was wondering: Is there any information on how data storage in the prisma cloud in a private workspace is GDPR compliant? Does anyone have any experience with this or can you point me to a read? Thanks in advance!
    h
    • 2
    • 5
  • d

    dmce

    07/03/2018, 11:13 AM
    Hi, i have a question re the answer on this forum post: https://www.prisma.io/forum/t/different-method-of-importing-content-types-into-schema-graphql/3475 is it ever acceptable to only use the generated schema from prisma when using graphgql-yoga?
    Copy code
    const server = new GraphQLServer({
      typeDefs: JUST USE GENERATED/PRISMA.GRAPHQL?,
      resolvers,
      mocks: process.env.MOCKS === 'true' ? mocks : null,
      context: req => ({
        req,
        prisma: new Prisma({
          typeDefs: './src/generated/prisma.graphql',
          endpoint: process.env.PRISMA_ENDPOINT,
          debug: true,
        }),
      }),
    });
    c
    • 2
    • 3
  • n

    Nick

    07/03/2018, 12:39 PM
    Sometimes
    prisma deploy
    don't generate a new schema really annoying got stuck on chapter Authentication(node.js backend). It ended up with me copying the entire generated schema from the finish app https://github.com/howtographql/graphql-js/blob/master/src/generated/prisma.graphql Doing this tutorial, all of the issues I had so far has to do with prisma package
    j
    h
    • 3
    • 5
  • j

    Jim

    07/03/2018, 1:02 PM
    Anyone else getting this in their Prisma Cloud?
  • n

    nilan

    07/03/2018, 1:05 PM
    I haven't this error before. Could you create an issue for this here, @Jim? 🙂 https://github.com/prismagraphql/prisma-cloud-feedback
    👌 1
  • n

    Nick

    07/03/2018, 1:07 PM
    Invalid signature is this suppose to happend. I'm guessing it has to do with JWT
  • n

    nilan

    07/03/2018, 1:09 PM
    Can you share more about your server setup, @Nick? 🙂
    h
    n
    • 3
    • 56
  • j

    Jim

    07/03/2018, 1:32 PM
    I’ve created a new service in Prisma Cloud and deployed to Heroku following this: https://www.prisma.io/blog/heroku-integration-homihof6eifi/ Am I right in thinking Ive only deployed my Prisma service and I still need to deploy my API server?
    n
    • 2
    • 1
  • n

    Nick

    07/03/2018, 1:42 PM
    @nilan Here is the project
    hackernews-node.zip
  • d

    Darryl

    07/03/2018, 2:59 PM
    Can anyone help me with an issue? I created a thread in the forum for the long-form version (https://www.prisma.io/forum/t/looking-for-help-with-relations-in-my-schema/3886) but basically, I want to know how to set something up in my schema. I have recipes and I have individual _ingredient_s stored in the database. Each ingredient has nutritional information per default value, e.g. x calories per 100g, x fat per 100g, etc. Standard stuff, I guess. When creating a recipe, I want to be able to connect to the desired _ingredient_s and I’ve managed that but what I want to be able to do, when creating a recipe, is specify a quantity of each ingredient. That way, in the createRecipe resolver, I can calculate the full nutrition for the recipe (based on x number of each ingredient). I’ve been banging my head against the wall with this for a couple of days now so I’d really appreciate some support. There’s more information in the thread (link above). Thank you!
    👌 1
  • d

    Darryl

    07/03/2018, 3:00 PM
    Also, I just watched the Prisma demo/talk at Berlin’s AWS Dev Day. Cool stuff!
    🙌 1
    👋 1
    n
    • 2
    • 2
  • d

    Darryl

    07/03/2018, 3:02 PM
    One more bit of info about my situation. I figured I could do this for the create recipe mutation:
    Copy code
    mutation CreateRecipe {
      createRecipe(
        name: "..."
        instructions: [
          "Step 1"
          "Step 2"
          "Step 3"
        ]
        ingredients: [
          {
            name: "Rolled Oats"
            quantity: 1
          }
          {
            name: "Oat Milk"
            quantity: 3
          }
        ]
      ) {
        id
        name
      }
    }
    Once that’s fired, it’d grab query for those ingredients, get their nutritional information, multiply it by the quantity (this is the part I’m stuck on with relations), and then add a nutrition object to the stored recipe (containing the totals).
  • d

    Darryl

    07/03/2018, 3:07 PM
    (updated the post with the above mutation)
  • g

    Gorodov Maksim

    07/03/2018, 3:39 PM
    Does anybody know why
    .graphqlconfig.yml
    doesn't see variables in .env? https://www.prisma.io/forum/t/set-up-environment-with-env/3844
  • a

    artindaniel

    07/03/2018, 4:39 PM
    Does anybody know a good tutorial on integrating Algolia in Prisma?
    n
    p
    • 3
    • 3
  • c

    checkmatez

    07/03/2018, 5:59 PM
    Can somebody explain to me what is going on here: https://github.com/prismagraphql/graphql-server-example/blob/master/src/resolvers/Home.ts#L5 This is the first time I see that resolver can be an object instead of function (except subscriptions). Is it documented somewhere? I feel it might be very useful to me, as I am working on a kinda similar problem.
    n
    • 2
    • 4
  • c

    checkmatez

    07/03/2018, 6:02 PM
    Also, generated types through Prisma-bindings 2.0 suggest that there is a 3d argument to queries: db.query.something(args, info, options). Where options look like this:
    Copy code
    export interface Options {
        transforms?: Transform[];
        context?: Context;
    }
    I wonder what transforms actually do?
    n
    • 2
    • 3
1...717273...637Latest