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

326
Visualizações
Proxying an Apollo server websocket through API Gateway

I have a GraphQL Apollo server running in AWS Fargate (ECS), I'm using API Gateway (HTTP proxy integration) on top. The purpose of that API is to make use of Cognito Authorizer in addition to secure SSL (HTTPS).

This is working fine as far as Graphql HTTP operations are involved (query and mutation)

However Graphql subscriptions are using websockets. The Proxy integration doesn't seem to handle the upgrade to the websocket protocol.

I've tried to define a new websocket API following this documentation: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html

But nothing seems to work for me. I've tried defining $connect, $disconnect and $default with an HTTP proxy integration to the Apollo server endpoint, but I keep getting:

Error during WebSocket handshake: Unexpected response code: 400

Is it possible to proxy an existing websocket API using Amazon API Gateway? Is HTTP proxy integration the correct integration to use?

Note: The client implementation is fine, as my subscriptions works if I put the direct url to the Apollo server websocket endpoint.

over 4 years ago · Santiago Trujillo
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