Replacing a REST API with a graph API backed by dgraph?

Hi,

I’m in the process of porting a system which currently uses a SQL Server backend to dgraph. The service is fronted by a REST API, and currently I’m replicating that with the dgraph version but it would be great to be able to offer a GraphQL type API interface to the users.

I’m struggling to understand how to do that, mainly because I can’t find any obvious examples, but maybe I’ve just not looked hard enough. I guess I could just allow whatever query the user sends to the API in the body of a POST request, but that doesn’t seem to gel with our GraphQL APIs, and then how do I deal with creates, updates, and deletes?

The service is written in Go by the way.

Does anyone have any pointers or examples they can share?

Thanks,

Adam

sorry, I can’t get what you’re facing…
but , I think this may help you

1 Like

Also you can take a look on this project GitHub - dpeek/dgraphql: DgraphQL: Build a GraphQL service from a schema