Commit 825a1766 authored by alexlbr's avatar alexlbr

adds books mock

parent e50effbd
const fetch = require("node-fetch"); const fetch = require("node-fetch");
const { ApolloServer, gql } = require("apollo-server"); const { ApolloServer, gql } = require("apollo-server");
// This is a (sample) collection of books we'll be able to query
// the GraphQL server for. A more complete example might fetch
// from an existing data source like a REST API or database.
const books = [
{
title: "Harry Potter and the Chamber of Secrets",
author: "J.K. Rowling"
},
{
title: "Jurassic Park",
author: "Michael Crichton"
}
];
// Type definitions define the "shape" of your data and specify // Type definitions define the "shape" of your data and specify
// which ways the data can be fetched from the GraphQL server. // which ways the data can be fetched from the GraphQL server.
const typeDefs = gql` const typeDefs = gql`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment