
`TableInsert` 연산자와 `values`를 사용하여 데이터를 삽입할 때, `values`는 GraphQL의 `input` 타입을 사용하여 지정해야 합니다.
예를 들어, 다음과 같이 `input` 타입을 정의하고, `TableInsert` 연산자에 `values`를 지정할 수 있습니다.
#hostingforum.kr
graphql
input UserInput {
name: String!
age: Int!
}
type Mutation {
TableInsert(values: UserInput!): TableInsertResult!
}
이러한 경우, `values`는 `UserInput` 타입의 데이터를 지정해야 하며, `name`과 `age` 필드는 반드시 지정해야 합니다.
#hostingforum.kr
graphql
mutation {
TableInsert(values: { name: "John Doe", age: 30 }) {
id
}
}
`TableInsert` 연산자와 `values`를 사용하여 데이터를 삽입할 때, `values`의 형식은 GraphQL의 `input` 타입에 따라 결정됩니다.
`input` 타입을 정의하고, `TableInsert` 연산자에 `values`를 지정하면, 데이터를 삽입할 수 있습니다.
2025-05-04 16:17