https://www.prisma.io/ logo
Join Slack
Powered by
# prisma-whats-new
  • m

    michal.tomsia

    04/07/2018, 12:31 PM
    Currently I am doing something like this
    Copy code
    function createCategory(parent, { input }, ctx, info) {
        const category = ctx.db.mutation.createCategory({ data: input });
    
        return {
            edge { node: category }
        }
    }
    If I am passing
    info
    to
    ctx.db.mutation.createCategory
    I am getting error about subselection
    n
    • 2
    • 10
  • a

    Adam Pavlisin

    04/07/2018, 4:12 PM
    Hi, what is the best practice to keep track of ordering/positioning/ranking in relations? Example:
    Copy code
    type List @model {
      id: ID! @isUnique
      name: String!
      tasks: [Task!]! @relation(name: "ListOnTask")
    }
    
    type Task @model {
      id: ID! @isUnique
      list: [List!]! @relation(name: "ListOnTask")
      name: String!
    }
    Given I can have one task in multiple lists how can I define order/position/rank of the task within each list separately?
    n
    • 2
    • 1
  • i

    igm

    04/07/2018, 8:41 PM
    Is graph.cool deprecated? Should I be using prisma?
    n
    • 2
    • 1
  • i

    igm

    04/07/2018, 8:42 PM
    Also something's wrong with the docs
    💯 1
    🐛 1
    n
    • 2
    • 1
  • i

    igm

    04/07/2018, 8:51 PM
    ugh now the site is down
  • i

    igm

    04/07/2018, 8:51 PM
    nvm it's just laggy
  • p

    pasa

    04/07/2018, 10:50 PM
    @nilan Is there a way to remove unwanted resolvers (or define them completely myself), without leaving the graph.cool ecosystem (graph.cool, prisma)? What I basically want, is to remove all but one of the default query resolvers for security reasons and hock up a database to store the data and make it accessible to other systems. Thanks in advance! 👍
    n
    • 2
    • 6
  • d

    digitaltopo

    04/07/2018, 11:46 PM
    Is the graphcool cloud service still supported?
    h
    i
    n
    • 4
    • 7
  • d

    digitaltopo

    04/07/2018, 11:53 PM
    Sounds like no
  • e

    eloff

    04/08/2018, 12:00 PM
    docs are messed up, the navigation menu changes the url but not the contents
    n
    • 2
    • 1
  • r

    Raviv

    04/08/2018, 12:45 PM
    Hi all, I have migrated from the graph.cool service to Prisma, everything went well and i have deployed the Types and Enums into my development cluster. How can i export all the data from graph.cool (for each type) and import it into the new schema?
    n
    • 2
    • 1
  • y

    Yannick

    04/08/2018, 4:20 PM
    Just to make sure I understand it correctly. Graphcool runs mysql as database by default?
    h
    s
    • 3
    • 5
  • p

    pasa

    04/08/2018, 4:43 PM
    Hello there, noob question incoming... I'm new to prisma and just tried to create a mutation resolver. I added it to schema.graphql:
    Copy code
    type Mutation {
      createDraft(title: String!, text: String): Post
      deletePost(id: ID!): Post
      publish(id: ID!): Post
      createSite(urlhash: String!): Site
    }
    and to index.js:
    Copy code
    Mutation: {
        createSite(parent, { urlhash }, ctx, info) {
          return ctx.db.mutation.createSite(
            {
              data: {
                urlhash
              },
            },
            info,
          )
        },
      },
    But I still get the error "Unknown argument 'urlhash' on field 'createSite'", if I call the mutation like this:
    Copy code
    mutation{
      createSite(urlhash: "dqwda")
      {id}
    }
  • p

    pasa

    04/08/2018, 4:45 PM
    What am I doing wrong?
  • p

    pasa

    04/08/2018, 5:09 PM
    Okay, am I correct with the assumption, that I can only access the created mutations from the localhost:4000 and not the playground?
  • e

    eloff

    04/08/2018, 5:12 PM
    you should be able to access them in your local playground
  • p

    pasa

    04/08/2018, 5:25 PM
    Well I don't, but funny enough, I can access them, when I connect my application to localhost:4000.
  • e

    eloff

    04/08/2018, 5:26 PM
    it runs at http://localhost:4466/server/dev by default
    p
    h
    • 3
    • 7
  • h

    huv1k

    04/08/2018, 5:27 PM
    Guys try to stick to threads pls 💚
    👍 1
  • p

    pasa

    04/08/2018, 6:40 PM
    How can I access the local mysql db running on docker with heidisql or any other mysql editor/viewer?
    n
    • 2
    • 1
  • d

    Devin

    04/08/2018, 7:01 PM
    I'm using the node advanced boilerplate with authentication. I just upgraded prisma and now when I have an Authorization header set to a user in the graphql playground it tells me that
    no Node for the model User with value ...
    except when I query me I get back the correct token
  • d

    Devin

    04/08/2018, 7:01 PM
    any ideas on what could be causing this?
    n
    • 2
    • 2
  • k

    Kat

    04/08/2018, 8:15 PM
    hey everyone 🙂
  • k

    Kat

    04/08/2018, 8:15 PM
    has anyone here deployed their backend to aws using the fargate blog tutorial recently? 🙂 https://blog.graph.cool/how-to-deploy-a-prisma-cluster-to-aws-fargate-using-docker-cloudformation-293aa8727b89
  • k

    Kat

    04/08/2018, 8:16 PM
    i'm having an issue deploying the fargate template 😞
  • k

    Kat

    04/08/2018, 8:16 PM
    "Unable to assume the service linked role. Please verify that the ECS service linked role exists."
  • m

    mcierpicki

    04/08/2018, 8:32 PM
    Hello, I would like to create
    Advice
    and connect to it, already created, tags, categories, videos and images. Yet for some reason this this setup does not work - i don't know how to set tags, categories, videos and images inputs so that it does not throw error.
    Copy code
    type Mutation {
      createAdvice(params: CreateAdviceParams!): Advice
    }
    Copy code
    type Advice {
      id: ID!
      name:String!
      value: Int!
      description: String!
      tags: [AdviceTag]!
      categories: [AdviceCategory]!
      videos: [VideoAsset!]!
      images: [ImageAsset!]!
    }
    
    input CreateAdviceParams {
      name:String!
      value: Int!
      description: String!
      tags: [AdviceTag]
      categories: [AdviceCategory]
      videos: [VideoAsset]
      images: [ImageAsset]
    }
    Copy code
    Mutation: {
            createAdvice(parent, {params}, ctx, info) {
                return ctx.db.mutation.createAdvice({data: params}, info)
            },
        },
    Copy code
    mutation {
      createAdvice(params:{
        name: "Saraasdh"
        value: 1,
        description: "Jakis tam description",
        tags: { connect: [{
          id : "cjfr8wmere6bt0a422693ql94"
        }]},
        categories: { connect: []},
        videos: { connect: []},
        images: { connect: []}
      }) {
        id,
        name
      }
    }
    n
    • 2
    • 3
  • k

    Kat

    04/08/2018, 8:55 PM
    hi @nilan @sorenbs any ideas about the error with fargate blog tutorial 😄
    n
    • 2
    • 1
  • p

    pasa

    04/08/2018, 9:02 PM
    Could someone show me an example, how a resolver for a deletion of a node and it's (via id) related children should look like?
    n
    • 2
    • 1
  • m

    mcierpicki

    04/08/2018, 10:12 PM
    Prisma should generate Mutations by itself? Is it possible? Im tired of trying to define proper mutations with nested mutations... There is no examples that are advanced (like "create Object and connect to it other already created objects of different type") 😕
    n
    • 2
    • 1
1...631632633...637Latest