I'm playing with the GraphQL server and I've got this error in the NodeJS module:
{
url: {
url: 'http://api.themoviedb.org/3/movie/315723/casts?api_key=<<api_key>>'
},
error: Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
},
res: null,
response: undefined,
body: undefined,
callback: [Function (anonymous)]
}
So the API reset the connection. Maybe I used too many requests. This is my GraphQL query:
{
movies {
title
cast {
id
name
character
movies {
title
cast {
character
}
}
}
}
}
The first request is to search for the movies "matrix" then for each movie it request the cast and for each cast, it requests movies and again it requests the cast of each movie.
I'm just testing the API, both TMDB and my GraphQL server let me know if this is too many requests or is this some kind of error. I'm still learning GraphQL.
Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.
Vous souhaitez évaluer ou ajouter cet élément à une liste ?
Pas encore membre ?
RĂ©ponse de Leon
le 28 septembre 2022 Ă 15h28
Hi, I don't think TMDB offers a GraphQL API. Are you using some sort of wrapper or translation layer? If so, which one?
RĂ©ponse de jcubic
le 29 septembre 2022 Ă 03h59
I'm using REST API i and I have my own GraphQL server. Because I'm learning GraphQL. The whole point is to create my own GraphQL server.
Réponse de ticao2 🇧🇷 pt-BR
le 30 septembre 2022 Ă 09h55
@jcubic
I don't know if this is the cause.
You are using an API Request that I didn't know about.
But it works. Maybe it's one of the undocumented ones.
The first is yours, the second is documented.
You use "casts", and the documented one is with "credits".