我在GraphQL/Spring Boot API中实现了Oauth2身份验证,我想使用Apollo客户端从VueJS应用程序中使用它,目前,我可以使用Postman来实现。但是我在Chrome中有一个关于CORS的错误: Access to fetch at 'https://server/as/authorization.oauth2?redirect_uri=http://localhost:5000/login/oauth2/
这是我的存储模块的定义。getters: _GETTERS上面是我的user-store模块,我得到了一个Uncaught TypeError: getters.getName is not a function错误。当我将代码更改为使用访问state而不是getters的版本时,一切都正常。下面是我作为模块添加上述内容的主要存储对象。getters, mutations: _mutations, u