Hello, I would like to create `Advice` and connect...
# prisma-whats-new
m
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
  }
}
@nilan This is something many people would do. Why there is not tutorial or documentation about it :< im running into errors all the time and can't resolve them as there is no info on it
m
@nilan Reported as new issue as this does not work https://github.com/graphcool/prisma/issues/2204