Closed anarerdene closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
Keeping this open to track with #5435
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
AWS AppSync based on Apollo. So it means i don't need Apollo client on my Next'js project ?. I'm really confusing with Apollo or without Apollo. Right now im using like this image.
`import App, {Container} from 'next/app'; import React, {Component} from 'react'; import {ApolloProvider, compose} from 'react-apollo'; import Link from 'next/link'; import Head from 'next/head';
// AWS Appsync Config import AWSAppSyncClient from 'aws-appsync'; import {Rehydrated} from 'aws-appsync-react'; import Amplify, {Auth} from 'aws-amplify'; import config from '../src/aws-exports';
const client = new AWSAppSyncClient({ url: config.aws_appsync_graphqlEndpoint, region: config.aws_project_region, auth: { type: config.aws_appsync_authenticationType, jwtToken: async () => (await Auth.currentSession()).getIdToken().getJwtToken() } });
Auth.currentCredentials() .then(d => console.log('data: ', d)) .catch(e => console.log('error: ', e));
// App Layout class MyApp extends App { static async getInitialProps({Component, router, ctx}) { let pageProps = {};
}
render() { const {Component, pageProps} = this.props;
} }
export default MyApp; `