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

    terion

    05/23/2018, 10:03 AM
    Ok, I've figured out that this can be achieved in a clean way with transformers https://github.com/AEB-labs/graphql-transformer
  • m

    matus.congrady

    05/23/2018, 10:08 AM
    Hello, I can't generate typescript definitions (using graphql-cli/codegen) from prismq.graphql schema. Anybody had the same issue? https://github.com/graphql-cli/graphql-cli/issues/307
    c
    • 2
    • 3
  • m

    marco

    05/23/2018, 10:40 AM
    Hi all, has someone the link to the graphcool email tutorial, the link provided in the docs doesn't seem to work? ~ https://www.graph.cool/docs/reference/auth/authentication/!alias-cu3jah9ech ~
  • s

    stephen

    05/23/2018, 11:20 AM
    Hi, Im getting 503 Errors for both app.prisma.io and my GraphQL Playgrounds. Any known issues?
    ✋ 3
    g
    • 2
    • 1
  • m

    Moritz

    05/23/2018, 11:25 AM
    Same here
  • m

    Moritz

    05/23/2018, 11:26 AM
    https://status.prismagraphql.com/ does not reflect any issues yet.
    😞 1
  • s

    stephen

    05/23/2018, 11:27 AM
    Wonder what the polling frequency on those is.
  • d

    dpetrick

    05/23/2018, 11:33 AM
    EU1 is down, we’re working on it.
    😭 2
    fast parrot 1
    🚒 2
  • g

    Gridley123

    05/23/2018, 11:50 AM
    Has anyone deployed Prisma to AWS Fargate? I’m a bit confused about the pricing.
  • g

    Gridley123

    05/23/2018, 11:50 AM
    I assume that if the Prisma server is deployed, it will use its resources all the time for the whole month
  • g

    Gridley123

    05/23/2018, 11:51 AM
    Or will it only use those resources when it receives a request?
    d
    • 2
    • 3
  • d

    dpetrick

    05/23/2018, 12:10 PM
    EU1 is up.
    🙌 1
    🚀 2
    👍 3
  • t

    terion

    05/23/2018, 1:00 PM
    Added a code snippet to automate file uploads type conversion, may be useful. https://www.prisma.io/forum/t/proper-datamodel-for-file-uploads/3569/2?u=terion
    👍 2
  • m

    mekwall

    05/23/2018, 1:11 PM
    I currently have a PostgreSQL db based on Django models. I am planning on breaking out of Django and move to microservices and would really like to use Prisma in some way but not really sure where to start. Any pointers?
    s
    n
    • 3
    • 7
  • s

    Sam Jackson

    05/23/2018, 1:37 PM
    I was following the
    Adding Authentication
    tutorial (https://www.howtographql.com/graphql-js/6-authentication/) but I am getting this error:
    Copy code
    Error: Directive `unique`: Couldn't find type `unique` in any of the schemas.
    Has anyone seen this before?
    n
    • 2
    • 18
  • s

    Sam Jackson

    05/23/2018, 2:26 PM
    I was trying to extend a Post model to include an optional attribute
    parent
    . My resolver for creating a new post has become:
    Copy code
    async function addPost (parent, args, context, info) {
      const userId = getUserId(context)
      const parentId = args.parentId ? args.parentId : null
      return context.db.mutation.createPost({
        data: {
          body: args.body,
          parent: {
            connect: {
              id: parentId
            }
          },
          author: {
            connect: {
              id: userId
            }
          }
        }
      }, info)
    }
    However, I am getting an error when firing this mutation that reads:
    You provided an invalid argument for the where selector on Post.
    I think this is because I am attempting to write a post without a parent. How can I handle cases where that value is not provided; should it just be an empty string?
    n
    • 2
    • 52
  • h

    hez

    05/23/2018, 2:31 PM
    Has anybody deployed Prisma 1.8 to Fargate using this link? https://github.com/prismagraphql/prisma/blob/master/docs/1.8/03-Tutorials2/06-Deploy-Prisma-Servers/05-AWS-Fargate.md
    n
    s
    n
    • 4
    • 17
  • m

    Moritz

    05/23/2018, 2:52 PM
    Hi everyone, since upgrading to the latest prisma version I ah getting an error as such:
    Copy code
    Type '{ users: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; profiles: (pare...' is not assignable to type 'GraphQLScalarType'.
                Property 'name' is missing in type '{ users: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; profiles: (pare...'. (2345)
    in the initialisation of my Prisma server. It is complaining about a file as such:
    Copy code
    export const Query = {
      users: forwardTo("db"),
      profile(parent, { id }, ctx: Context, info) {
        return ctx.db.query.profile({ where: { id } }, info);
      },
    }
    What is the reason for this? Has the query format changed? Thanks!
    n
    • 2
    • 22
  • p

    patrick_madx

    05/23/2018, 2:58 PM
    Hi! Is it possible to filter on an enum which is part of the <Model> with the <Model>WhereInput ? We see filter options on other properties, but not on the enum
    s
    n
    w
    • 4
    • 5
  • m

    max

    05/23/2018, 3:30 PM
    Might be a stupid question... what's the likelihood of getting Golang working with Prisma? i.e. prisma-bindings for Golang
    🔜 1
    prisma cool 1
    n
    l
    • 3
    • 4
  • s

    Sam Jackson

    05/23/2018, 3:35 PM
    I am trying to define a Post type that has two optional fields:
    parent
    for a parent Post, and
    children
    for Posts with that Post as its parent. Right now when I define a Post with a parent, the parent gets the newly-created Post as its parent as well. Any thoughts on what might be going on?
    Copy code
    type Post {
      id: ID! @unique
      body: String!
      author: User! @relation(name: "UserPosts")
      parent: Post @relation(name: "PostParent")
      children: [Post!]! @relation(name: "PostChildren")
    }
    n
    • 2
    • 1
  • s

    Soma Deaki

    05/23/2018, 4:24 PM
    hey everyone, I've been getting a new error when trying to deploy
  • s

    Soma Deaki

    05/23/2018, 4:24 PM
    Copy code
    ERROR: Service with name 'marketmuse-gql' and stage 'production' already exists
    
    {
      "data": {
        "addProject": null
      },
      "errors": [
        {
          "locations": [
            {
              "line": 2,
              "column": 9
            }
          ],
          "path": [
            "addProject"
          ],
          "code": 4005,
          "message": "Service with name 'marketmuse-gql' and stage 'production' already exists",
          "requestId": "mmx_marketmuse:management:____________________"
        }
      ],
      "status": 200
    }
    n
    • 2
    • 2
  • h

    halfnibble

    05/23/2018, 5:07 PM
    Is there anywhere, a very basic and simple tutorial that provides a solution for the basic User + Posts scenario? I see a lot of references to the User and Post data types in the docs, but can’t find a guide that shows: 1) Setup User with graph.cool authentication, 2) Modify Post to relate to User, and 3) Setup permissions and mutations to only allow User to create/edit their Post. Just curious if something like this exists and I’m failing to find it with google.
    s
    • 2
    • 3
  • s

    Sam Hulick

    05/23/2018, 5:10 PM
    if we plan on having dev/staging/production environments for our app, what's the conventional way to use prisma init & deploy? do we init separate services for dev/staging/prod?
  • s

    Sam Jackson

    05/23/2018, 5:18 PM
    Anyone ever have
    prisma deploy
    hang on "Applying changes" ?
    • 1
    • 1
  • s

    Sam Hulick

    05/23/2018, 6:28 PM
    what's the roadmap look like for DynamoDB support? I know it's more complicated because the table structure is totally different from traditional RDBMS and even MongoDB.
  • s

    Sam Jackson

    05/23/2018, 6:38 PM
    From what I've read, attributes
    createdAt
    and
    updatedAt
    are built into each Prisma type. Is there a way for me to access that in a query? Or do I have to duplicate that information?
    m
    • 2
    • 7
  • n

    nilan

    05/23/2018, 6:45 PM
    .
    m
    • 2
    • 1
  • a

    Adam

    05/23/2018, 6:47 PM
    I'm wondering how you can filter a variable for Json field type within a gql template literal. Here's an example:query getWorkforce ( $labour: Json! ){ labour: _allMembersMeta(filter: {occupation: $labour}) { count } firstAid: _allMembersMeta(filter: { hasFirstaid: true }) { count } whmis: _allMembersMeta(filter: { hasWhmis: true }) { count } dangerousGoods: _allMembersMeta(filter: { hasDangerousGoods: true }) { count } confinedSpaces: _allMembersMeta(filter: { hasConfinedSpaces: true }) { count } constructionSafety: _allMembersMeta(filter: { hasConstructionSafety: true }) { count } groundDisturbances: _allMembersMeta(filter: { hasGroundDisturbances: true }) { count } goodHost: _allMembersMeta(filter: { hasGoodHosting: true }) { count } allMembers { id } }
1...383940...637Latest