Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created December 17, 2018 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianhall/6f29077016d88a73bfbb29fcfa63db81 to your computer and use it in GitHub Desktop.
Save adrianhall/6f29077016d88a73bfbb29fcfa63db81 to your computer and use it in GitHub Desktop.
import gql from 'graphql-tag';
import AWSAppSyncClient, { AUTH_TYPE } from 'aws-appsync';
import aws_config from './aws-exports';
import App from './src/App';
const client = new AWSAppSyncClient({
url: aws_config.aws_appsync_graphqlEndpoint,
region: aws_config.aws_appsync_region,
auth: {
type: aws_config.aws_appsync_authenticationType,
apiKey: aws_config.aws_appsync_apiKey,
}
});
const WithProvider = () => (
<ApolloProvider client={client}>
<Rehydrated>
<App />
</Rehydrated>
</ApolloProvider>
)
export default WithProvider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment