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

137
Visualizações
Graph QL request AWS Amplify

I am trying to query Amplify to get data from a graphQl endpoint. I am sending the data to the backend successfully. Below is the request from GraphQL

  const getFixtures = async () => {
    const clubProfile = await DataStore.query(ClubProfile, c => c.id(userUuid));
    setFixturesListData(clubProfile.fixtures);
    console.log('fixtures here', clubProfile);
  };

The output of the console is: fixtures here [] (just an empty array)

The model is:

export declare class ClubProfile {
  readonly id: string;
  readonly club_email?: string | null;
  readonly club_name?: string | null;
  readonly club_number?: string | null;
  readonly club_description?: string | null;
  readonly club_website?: string | null;
  readonly club_teams?: string | null;
  readonly createdAt?: string | null;
  readonly updatedAt?: string | null;
  constructor(init: ModelInit<ClubProfile, ClubProfileMetaData>);
  static copyOf(source: ClubProfile, mutator: (draft: MutableModel<ClubProfile, ClubProfileMetaData>) => MutableModel<ClubProfile, ClubProfileMetaData> | void): ClubProfile;
}

I am trying different options and getting no success.

When I send the data to the backend:

    const clubInfo = async () => {
      let uuid = customerInfo.customerInfo.attributes.sub;
      const newClub = {
        id: uuid,
        club_name: clubName,
        club_email: clubEmail,
        club_number: clubPhone,
        club_location: clubLocation,
        club_website: 'https://www.clubWebsite.com',
        club_teams: {clubTeams},
        club_description: 'clubDescription',
      };
      await DataStore.save(new ClubProfile(newClub));
      console.log('newClub', newClub);
      setNewClub(newClub);
    };
    clubInfo();
  }
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