Reputation: 527
So I gather GraphQL is a layer which sits in front of your RESTful API and can condense multiple requests down into one. Do you always have to go through a REST API, or can GraphQL talk directly with your MongoDB instead? Or it that what things like AWS Appsync and Hasura do, in that they use GraphQL and talk directly to a DB?
Thank in advance.
Upvotes: 0
Views: 195
Reputation: 2053
It can do either.
https://github.com/Soluto/graphql-to-mongodb
Appsync is a general purpose plugin framework so will need other API's to consume.
Here is a talk given this week about GraphQL vs REST:
https://github.com/MiyamotoAkira/grapqhl-presentation-round1
Upvotes: 1