Preguntas de la comunidad: explore o envíe la suya.
Aún no hay preguntas publicadas.
Correos cuando publiquemos nuevos artículos.
GraphQL API Development with Apollo Server
Buckky Moral
Publicado:
Este artículo aún no se ha traducido. Se muestra en su idioma original.
Resumen
Build efficient and type-safe APIs using GraphQL and Apollo Server.
Why GraphQL?
GraphQL provides a complete description of your API data.
Setup Apollo Server
import { ApolloServer } from '@apollo/server';
import { startStandaloneServer } from '@apollo/server/standalone';
const typeDefs = `#graphql
type Book {
title: String
author: String
}
type Query {
books: [Book]
}
`;
const resolvers = {
Query: {
books: () => books,
},
};
const server = new ApolloServer({ typeDefs, resolvers });
const { url } = await startStandaloneServer(server);
Comentarios
Cargando comentarios…