Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

216
Visualizações
Unable to run react application using AppSync

I am configuring my React application to consume GraphQL APIs from the AppSync, I am using vite as a bundler for my application. Though I created the AppSync client but it is unable to run the application and producing such errors, I have looked over the internet but couldn't found anything related to it? Did anybody encountered that errors?

Errors

import AppSync from './AppSync';
import { ApolloProvider } from 'react-apollo';
import AWSAppSyncClient from 'aws-appsync';
import { Rehydrated } from 'aws-appsync-react';

const client = new AWSAppSyncClient({
  url: AppSync.aws_appsync_graphqlEndpoint,
  region: AppSync.aws_appsync_region,
  auth: {
    type: 'API_KEY',
    apiKey: AppSync.aws_appsync_apiKey,
  },
});

<React.StrictMode>
    <Provider store={store}>
      <ApolloProvider client={client}>
        <Rehydrated>
          <App />
        </Rehydrated>
      </ApolloProvider>
    </Provider>
  </React.StrictMode>

This code is written in v2 version, However the apollo-react has been deprecated. The v3 can be used using the @apollo-client. I have that code as well but the error remains the same. I believe it more related to the vite bundler incompatibility with aws-sdk.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda