Using databases in GraphQL
GraphQL is a protocol for sending and receiving data. Apollo is one of the many libraries that you can use to implement that protocol. Neither GraphQL (in its specifications) nor Apollo works directly on the data layer. Where the data that you put into your response comes from, and where the data that you send with your request is saved, are up to the developer to decide.
This logic indicates that the database and the services that you use do not matter to Apollo, so long as the data that you respond with matches the GraphQL schema.
As we are living in the Node.js ecosystem in this project and book, it would be fitting to use MongoDB. MongoDB offers a great client library for Node.js and uses JavaScript as its native choice of language for interactions and querying.
The general alternative to a database system such as MongoDB is a typical MySQL server with proven stability and global usage. One case that I encounter frequently involves systems and...