这是预期的行为。
GraphQL Playground 向您的服务器发出一个自省查询。它使用该查询的结果为查询提供验证和自动完成。Playground会将该查询重复发送(默认情况下每2秒发送一次)到您的服务器,这样,如果您的架构发生更改,这些更改可以立即反映在UI中(尽管此功能目前存在问题)。
您可以调整相关设置(单击Playground UI右上角的设置图标)以更改轮询频率或将其完全关闭:
'schema.polling.enable': true, // enables automatic schema polling 'schema.polling.endpointFilter': '*localhost*', // endpoint filter for schema polling 'schema.polling.interval': 2000, // schema polling interval in ms
但是,您看到的行为仅与Playground有关,因此它是无害的,不会影响连接到服务器的任何其他客户端。



