【发布时间】:2017-08-28 11:35:02
【问题描述】:
如果我有这样的路线:
<Route path="/something/:id" component={Something} />
我有一个这样的查询
const somethingQuery = gql`query getSomething {
something(id:1) {
name
}
}`
export default compose(
graphql(somethingQuery),
)(Something)
现在这总是将something 与1 的id 拉在一起。
如何将url参数:id传入查询id?
【问题讨论】:
标签: reactjs react-apollo apollo-client