List of integer


#1

Dears,

I have define a type named “Book” that contains a list of integer field named page:

type Book {
id: ID! @unique
title: String!
page: [Int!]!
}

And also use the following code to save it into database:

createBook(parent, { title, page }, ctx, info) {
return ctx.db.mutation.createPost({
data:{ title,
page:{ set: page}
}
})
}

But when I used playground to test it:

mutation {
createBook(
title: "A test title"
page: [1,2,3]
) {
title
page
}
}

The Page return value is Null.

Would you please help?

Thank you in advance.

David


#2

oh…i also have this problem…did you solve~???