Supporto The Movie Database

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.

3 risposte (nella pagina 1 di 1)

Jump to last post

Hi, I don't think TMDB offers a GraphQL API. Are you using some sort of wrapper or translation layer? If so, which one?

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.

@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.

1 - http://api.themoviedb.org/3/movie/315723/casts?api_key=<<api_key>>
2 - https://api.themoviedb.org/3/movie/315723/credits?api_key=THE_KEY 

You use "casts", and the documented one is with "credits".

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi