This is a simple Node.js server built with Express and GraphQL. The server provides an API to query a list of books and authors using GraphQL.
- Query Books: Fetch a list of books or get details of a specific book by its ID.
- Query Authors: Fetch a list of authors or get details of a specific author by their ID.
- GraphiQL: A built-in interactive GraphQL IDE for testing and exploring the API.
server.js: The main entry point for the server. Defines the GraphQL schema, resolvers, and sets up the Express server.books: An array of book objects withidandnameproperties.authors: An array of author objects withidandnameproperties.
Make sure you have the following installed on your local development environment:
- Node.js (version 14 or above)
- npm (Node Package Manager)
Clone the repository:
git clone https://github.com/hadisa/nodeGraphql-Project cd graphql-express-serverfor running the project
npm install npm run dev