hello I'm trying to import some data, it's an eco...
# prisma-whats-new
j
hello I'm trying to import some data, it's an ecommerce, I'm trying to import the products, they have a field where they have multiple images I have an array of their ids that are stored in graph.cool but when I do
Copy code
const result = await client.mutate(`
  {
    createProduct(
      name: "${product.name}"
      price: ${product.price}
      regularPrice: ${product.regular_price}
      imagesIds: ${product.images}
      statusId: ${product.status}
      stockStatusId: ${product.stock_status}
      userId: ${product.user}
    ) {
      id
    }
  }
`)
I get
Copy code
GraphQL Error: Argument 'imagesIds' expected type '[ID!]' but got: cj7kjj9v9001n0168yljnge4v. Reason: '[0]' String or Int value expected (line 6, column 22):
          imagesIds: cj7kjj9v9001n0168yljnge4v
n
could you bring this up in the forum: https://graph.cool/forum/c/questions?
j
@nilan awesome, didn't know there was a forum, sorry! will do in future questions as I have figured it out doing
Copy code
const result = await client.mutate(`
  {
    createProduct(
      name: "${product.name}"
      price: ${product.price}
      regularPrice: ${product.regular_price}
      imagesIds: ["${product.images}"]
      statusId: "${product.status}"
      stockStatusId: "${product.stock_status}"
      userId: "${product.user}"
    ) {
      id
    }
  }
`)
💚 1
k
I think if you could send the schema could be better!