所以我有以下路线:/creator/item
和/creator/item/price
。两条路由的两种模式都有一个称为updateOne
的变异。但是,当我调用/creator/item/price
的路由时,它将匹配/creator/item
。
这是故意的吗?是否有解决方法,或者我必须为其创建一个完全唯一的路径名?
答案 0 :(得分:0)
似乎定义顺序很重要。
之前:
Application.Wait Now + #12:00:06 AM#
IE.Visible = True
'IE.document.getElementById("fileOnlineReturnTaxType").Value = "EVR"
'IE.document.getElementsByName("taxType").Value = "84"
'Set oSelect = IE.document.getElementById("fileOnlineReturnTaxType")
' oSelect.Focus
' oSelect.selectedIndex = 1
' oSelect.FireEvent "onchange"
'IE.document.getElementById("fileOnlineReturnTaxType").Click
'Set Link3 = IE.document.getElementsByTagName("span")
' For Each t In Link3
' If t.innerText = "Select a tax type..." Then
' MsgBox (t.innerText)
' t.Click
' Exit For
'End If
'Next t
之后:
// - item
const item_schema =
require("./graphql/creator/items")
app.use(
"/creator/item",
graphqlHTTP({
schema:
item_schema,
graphiql:
env !== "production",
formatError
})
)
const item_price_schema =
require("./graphql/creator/item/prices.js")
app.use(
// "/creator/updateOne/price",
"/creator/item/price",
graphqlHTTP({
schema:
item_price_schema,
graphiql:
env !== "production",
formatError
})
)