我正在学习GraphQL,并看到以下JavaScript语句here:
directory
然后在server.js文件中:
for /f
问题:
%%a
和npm init
npm i graphql --save
来声明变量是什么意思?var { graphql, buildSchema } = require('graphql')
和var { foo } = require('bar')
是特殊保留关键字吗?第二个问题的原因是:
var foo = require('bar')
此语句返回“它们相同”:
graphql
buildSchema
随后我在运行GraphQL查询时收到错误if (graphql === buildSchema) {
console.log("they are the same")
} else {
console.log("there are differences")
}
:
var {
x,
y
} = function () {
console.log('hello')
}
if (x === y) {
console.log("they are the same")
} else {
console.log("there are differences")
}