繁体   English   中英

将AWS-AppSync与NextJS连接

[英]Connect aws-appsync with nextjs

我正在尝试将aws-appsync与nextjs应用程序连接。 我不知道如何有效地做到这一点。

我尝试在github上的下一个js示例中使用apollo示例,但未成功。 我很困惑,因为appsync在其文档的示例中未使用内存缓存。

任何帮助将不胜感激。

您可以将Apollo与Next一起使用吗? 如果是这样,则可以通过将disableOffline设置为true来尝试禁用AWS AppSync客户端的离线功能:

const client = new AWSAppSyncClient({
  disableOffline: true,
  url: appSyncConfig.graphqlEndpoint,
  region: appSyncConfig.region,
  auth: {
    type: appSyncConfig.authenticationType,
    apiKey: appSyncConfig.apiKey,
  }
});

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM