G
G
gemcave2019-07-31 13:14:41
MongoDB
gemcave, 2019-07-31 13:14:41

How to properly connect MongoDB to GraphQL server?

There are no errors in the code. On the server, it shows that the data is being sent to the application, but it is not in the application. This is a training project, I am doing it out of interest in new technologies.
5d416a02572c2774863627.png
Screenshots with data on MongoDB server Atlas
db directors collection - https://i.imgur.com/NeVO4O2.png
db movies collection - https://i.imgur.com/P4VhBOv.png
db movies collection - https://i .imgur.com/P4VhBOv.png
Files:
pastebin.com/nsaQrAuA - GraphQL Schema
pastebin.com/LrFL17bj - Data Models(director and movie)
pastebin.com/atRcZZUj - Express/Mongo Configuration File

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gemcave, 2019-07-31
@gemcave

Found an error, it was necessary to specify the name of the database in the connection link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question