尝试在我的 graphql 查询中为长而复杂的 Id 使用别名:
编译失败:graphql 标签中不允许字符串插值:
const query = graphql` query MyQuery { wordpress { menu(id: "${wordpress("mainMenu")}") { ...rest of query } } } `
javascript interpolation reactjs graphql gatsby
gatsby ×1
graphql ×1
interpolation ×1
javascript ×1
reactjs ×1