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

    timwis

    05/18/2018, 10:26 AM
    Hey, how do I create a column of a special postgres type,
    ltree
    ?
    n
    • 2
    • 9
  • s

    senorcodecat

    05/18/2018, 11:39 AM
    Would it be possible to use this functionality with graphcool-framework shared-cluster deployed functions? https://docs.aws.amazon.com/lambda/latest/dg/with-scheduled-events.html
    n
    • 2
    • 1
  • r

    ryannealmes

    05/18/2018, 11:41 AM
    Is there a way to see what the dockerfile looks like for prisma? Right now I run docker-compose up, which is simple and quick, but it would be great to see what the images pulled down actually have on them. Maybe I am missing something?
    n
    s
    • 3
    • 2
  • r

    rein

    05/18/2018, 11:55 AM
    is anyone else experiencing problems when trying to incorporate fieldMiddleware through graphql-yoga?
    Copy code
    const server = new GraphQLServer({
      typeDefs: './src/schema.graphql',
      resolvers,
      fieldMiddleware: [algoliaMiddleware],
      context: req => ({ ...req, db }),
    });
    this makes my server crash, saying fieldMiddleware is not a valid property, but thats what the documentation provides as boilerplate
  • r

    rein

    05/18/2018, 11:57 AM
    seems it is now just called
    middlewares
    , might have to update the docs of graphql-middleware
    n
    • 2
    • 2
  • m

    matic

    05/18/2018, 12:18 PM
    Hey @rein thanks for pointing this out! I’ve just updated the docs. Yes, it’s exactly as you’ve said. We have changed
    fieldMiddleware
    to
    middlewares
    . Yoga’s docs was in sync but we must have forgotten to update this one as well. Thanks again!
    👍 1
    r
    • 2
    • 6
  • c

    Christian

    05/18/2018, 12:21 PM
    I have the following resolver to fetch the "current user"-related Company data
    Copy code
    const companyQuery = `
      {
        company {
          id
        }
      }
    `
    
    export const companies = {
      async company(parent, args, ctx: Context, info) {
        const userId = getUserId(ctx)
    
        const userCompanyId = await ctx.db.query.user(
          { where: { id: userId } },
          companyQuery,
        )
        return ctx.db.query.company(
          { where: { id: userCompanyId.company.id } },
          info,
        )
      },
    }
    I would like to get the Company data directly with the user query though, but for this I need to transform the info object (wrapping the SelectionSet for a Company into one suitable for User)... what is the best way to do this?
    a
    n
    • 3
    • 6
  • r

    rpeterson

    05/18/2018, 12:54 PM
    Is there by chance a way to do negative permissions? I have a use case where I want to allow someone to only vote once in a poll and to not allow them to create a vote if they have created one already. My assumption is I need to do this in the custom function via the API but wanted to see if there was any way to do it inside the permissions system.
    n
    • 2
    • 2
  • r

    Renyuan

    05/18/2018, 2:27 PM
    Hello here 👋 , is there any examples or libraries that wrapping existing REST Api to relevant graphql schema like Prisma does for databases? I found Prisma too powerful but we can't easily migrate to a whole new system but step by step will be possible. Anyway, good job for creating a cool project like this!
    🙌 2
    m
    n
    • 3
    • 3
  • n

    noahdavis

    05/18/2018, 2:37 PM
    hi @oguzgelal
  • w

    weakky

    05/18/2018, 4:09 PM
    Anyone ever managed to get https://github.com/marmelab/react-admin working with prisma ?
    👍 3
    v
    c
    n
    • 4
    • 8
  • h

    hez

    05/18/2018, 7:28 PM
    Hi guys! Having some difficulty getting prisma 1.8 deployed to EC2 using docker-compose and docker-machine. There are some docs that I've found, but they are all for 1.7 and below. Is there any resource you can direct me to?
    n
    • 2
    • 1
  • b

    bartimaeus

    05/18/2018, 8:07 PM
    @hez are you using docker-compose.yml on your EC2 instance? Would the latest examples work: https://github.com/prismagraphql/prisma/blob/master/examples/postgres/docker-compose.yml
  • j

    Julian

    05/18/2018, 8:22 PM
    Hello i have a problem with a mutation can anyone help me ? This the error message
    Copy code
    Variable "$answers" of type "AnswerCreateManyWithoutQuestionInput" used in position expecting type "[AnswerCreateWithoutQuestionInput!]
    n
    • 2
    • 1
  • e

    emrah

    05/18/2018, 11:43 PM
    Hi. Is there any roadmap for prisma?
    n
    • 2
    • 1
  • r

    rein

    05/19/2018, 9:46 AM
    if I have some titles I need full text search on, is it worth it to use Algolia for that? I don't really see how I could combine Algolia with the filtering/caching/updating that prisma/apollo provides. Plus it would become rather pricey I guess?
    👍 2
    c
    n
    • 3
    • 2
  • c

    claudiu.ceia_1

    05/19/2018, 10:36 AM
    Algolia is awesome :) how many operations (updates, creations, deletions) do you expect on your indices? Algolia doesn't limit QPS in their free plan.
  • t

    terion

    05/19/2018, 1:19 PM
    Anyone faced multiple imports problem? https://github.com/prismagraphql/graphql-import/issues/175
  • t

    timwis

    05/19/2018, 3:30 PM
    Hey, is it possible to use raw SQL to query my database via the prisma server? Or should I just query the DB directly, outside of prisma?
    n
    • 2
    • 2
  • z

    zonofthor

    05/19/2018, 4:08 PM
    now this is very basic once you understand the jungle that deploying is... but can Prisma cloud be used as production without 3rd party database service like AWS? (obviusly in a pricing model)
    a
    • 2
    • 13
  • p

    philch

    05/19/2018, 5:02 PM
    Auth question, has anyone been able to implement a Schema directive for something like @auth(isOwner: true) with prisma bindings. For example this would handle if a user is the owner of a particular resource for say publishing a post. Basically need a way to pass in the type of the resource to ctx.db.exists[typeFromResource](...etc). In this case typeFromResource would need to be Post but I’m not sure where to get that value. Is this even possible or should this use case be delegated to being done in the resolver like in the example. Schema directives are potentially very powerful and can keep your resolvers thin.
    m
    l
    • 3
    • 11
  • d

    dennisko

    05/19/2018, 6:16 PM
    how do I access the db inside docker?
  • d

    dennisko

    05/19/2018, 6:18 PM
    ah got it
  • a

    Aubron Wood (ScoreShots)

    05/19/2018, 7:24 PM
    @nilan - any plan to offer a yoga hosting opportunity, or some kind of authorization paradigm through you all? Currently running RDS and some yoga EC2 instances, would love to have everything under one roof
    n
    • 2
    • 4
  • c

    csamu

    05/19/2018, 11:19 PM
    Hello. I am getting Javascript errors when I try to login to Prisma Cloud... Is this the place to report such bugs? Right now I am locked out of Prisma Cloud.
    h
    n
    • 3
    • 3
  • m

    Michael Jones

    05/19/2018, 11:53 PM
    Hello, is there another way to self-host my Prisma server without using Docker? Personally, $99 is a bit too expensive for the start for Prisma Cloud 😞
    n
    • 2
    • 1
  • s

    Sam Jackson

    05/20/2018, 12:30 AM
    Hi all. I am creating a schema as shown below. I am getting an error that the Content union type does not exist. Any thoughts on why?
    Copy code
    union Content = Post | Comment
    
    interface ContentInterface {
      id: ID! @unique
      createdAt: DateTime!
      updatedAt: DateTime!
      author: User!
      body: String!
    }
    
    type Post implements ContentInterface {
      id: ID! @unique
      createdAt: DateTime!
      updatedAt: DateTime!
      author: User!
      body: String!
      comments: [Comment!]!
    }
    
    type Comment implements ContentInterface {
      id: ID! @unique
      createdAt: DateTime!
      updatedAt: DateTime!
      author: User!
      body: String!
      parent: Content!
    }
    
    type User {
      id: ID! @unique
      email: String! @unique
      password: String!
      name: String!
      posts: [Post!]!
      content: [Content!]!
    }
    d
    n
    • 3
    • 7
  • h

    HarryC

    05/20/2018, 4:00 AM
    Hi everyone, I'm having issue with subscriptions in the graphcool playground on us-west-2
    n
    • 2
    • 1
  • h

    HarryC

    05/20/2018, 4:02 AM
    I'm creating subscription like this, and it says it's listening, but doesn't fire when doing related queries like createUser, deleteUser, etc
  • u

    user

    05/20/2018, 4:02 AM
    A file was commented on
1...343536...637Latest