Кажется, что порядок определения имеет значение.
До:
// - 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
})
)
После:
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
})
)
// - item
const item_schema =
require("./graphql/creator/items")
app.use(
"/creator/item",
graphqlHTTP({
schema:
item_schema,
graphiql:
env !== "production",
formatError
})
)