Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor 阿波罗/GraphIQL秀;Apollo Server仅支持POST请求";?_Meteor_Graphql_Apollo Server - Fatal编程技术网

Meteor 阿波罗/GraphIQL秀;Apollo Server仅支持POST请求";?

Meteor 阿波罗/GraphIQL秀;Apollo Server仅支持POST请求";?,meteor,graphql,apollo-server,Meteor,Graphql,Apollo Server,我已经安装了Apollo/GraphQL。在访问GraphiQL时,我看到以下消息,而不是GraphiQL用户界面: Apollo服务器仅支持POST请求 我已经安装了Apollo Server 0.2.x代码,该代码由以下文档指定: 如何显示GraphiQL用户界面 非常感谢大家的任何想法或信息 如果您按照说明操作,graphiql将在/graphiql上运行(请注意额外的“i”)对于任何像我这样偶然发现此问题的人,graphiql服务器中都有一个临时文件 这就是为什么在给定以下代码的情况下

我已经安装了Apollo/GraphQL。在访问GraphiQL时,我看到以下消息,而不是GraphiQL用户界面:

Apollo服务器仅支持POST请求

我已经安装了Apollo Server 0.2.x代码,该代码由以下文档指定:

如何显示GraphiQL用户界面


非常感谢大家的任何想法或信息

如果您按照说明操作,graphiql将在
/graphiql
上运行(请注意额外的“i”)

对于任何像我这样偶然发现此问题的人,graphiql服务器中都有一个临时文件

这就是为什么在给定以下代码的情况下,您目前无法在/graphql(您指定的端点URL)访问graphiql的原因:

app.use('/graphql', bodyParser.json(), graphqlExpress({ schema }));
app.use('/graphiql', graphiqlExpress({ endpointURL: '/graphql' }));

我之所以在这里发帖,是因为这个问题会导致与原始问题完全相同的问题(因此,在我进行故障排除时,这个线程仅作为几个搜索结果之一出现)。

非常感谢!文档中的示例代码位于
http://docs.apollostack.com/apollo-server/migration.html
登录到控制台,
GraphQL服务器现在正在运行http://localhost:${GRAPHQL\u PORT}/GRAPHQL
——这就是我得到错误URL的原因。是的,它告诉您API所在的URL。如果您愿意,您可以对文档进行PR,以添加一行,说明graphiql正在运行/graphiql听起来不错,@helfer。你能为这些文档发布一个github链接,这样我就可以提交PR了吗?以下是链接: