小编jsa*_*san的帖子

有嵌套突变的Graphql?

我试图找出如何使用graphql突变变异嵌套对象,如果可能的话.例如,我有以下架构:

type Event {
    id: String
    name: String
    description: String
    place: Place
}

type Place {
    id: String
    name: String
    location: Location
}

type Location {
    city: String
    country: String
    zip: String
}

type Query {
    events: [Event]
}

type Mutation {
    updateEvent(id: String, name: String, description: String): Event
}

schema {
    query: Query
    mutation: Mutation
}
Run Code Online (Sandbox Code Playgroud)

如何在我的updateEvent变异中添加地点信息?

graphql graphql-js

2
推荐指数
2
解决办法
1万
查看次数

标签 统计

graphql ×1

graphql-js ×1