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

202
Visualizações
Esquema GraphQL con objetos anidados

Cómo escribir un esquema para este tipo de respuesta.

 { "adult": false, "backdrop_path": "/dnaitaoCh8MftfYEVnprcuYExZp.jpg", "belongs_to_collection": { "id": 256322, "name": "The Purge Collection", "poster_path": "/nP3c8mTSxlis4vfg0UjlkK8LRG9.jpg", "backdrop_path": "/quFWGOA4I5KCTsyDbvLh6PHNZwv.jpg" }, "budget": 13000000, "genres": [ { "id": 28, "name": "Action" }, { "id": 27, "name": "Horror" }, { "id": 878, "name": "Science Fiction" }, { "id": 53, "name": "Thriller" } ] }
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

const typeDefs = ` type BelongsToCollectionType { id: ID! name: String poster_path: String backdrop_path: String } type GenreType { id: ID! name: String } type SomeType { adult: Boolean backdrop_path: String belongs_to_collection: BelongsToCollectionType budget: Int genres: [GenreType]! } `;
over 4 years ago · Santiago Trujillo Relatório

0

Poco después de hacer esta pregunta lo descubrí. Aquí está el esquema:

 const MovieType = new GraphQLObjectType({ name: 'Movie', fields: () => ({ id: { type: GraphQLString }, adult: { type: GraphQLBoolean }, backdrop_path: { type: GraphQLString }, belongs_to_collection: { type: BelongsToCollection }, budget: { type: GraphQLInt }, overview: { type: GraphQLString }, popularity: { type: GraphQLInt }, poster_path: { type: GraphQLString }, production_companies: { type: new GraphQLList(CompaniesType) }, genres: { type: new GraphQLList(GenreType) }, release_date: { type: GraphQLString }, tagline: { type: GraphQLString }, title: { type: GraphQLString }, vote_average: { type: GraphQLInt }, vote_count: { type: GraphQLInt } }) }); const CompaniesType = new GraphQLObjectType({ name: 'ProductionCompanies', fields: { id: { type: GraphQLInt }, name: { type: GraphQLString }, logo_path: { type: GraphQLString }, original_country: { type: GraphQLString } } }); const GenreType = new GraphQLObjectType({ name: 'Genre', fields: () => ({ id: { type: GraphQLInt }, name: { type: GraphQLString } }) }) const BelongsToCollection = new GraphQLObjectType({ name: 'BelongsToCollection', fields: () => ({ id: { type: GraphQLInt }, name: { type: GraphQLString }, poster_path: { type: GraphQLString }, backdrop_path: { type: GraphQLString } }) });
over 4 years ago · Santiago Trujillo Relatório
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