As dgraph already is Graphql I want to have custom queries and mutation for 3rd party endpoint.
like login to third party services have data in our dgraph. Kinda hybrid approach so that only the queries and mutation for 3rd party will have extra layer of graphql other data will directly be fetched and responded from dgraph.
For ex I need mutation on salesforce login and do fetch data and dump it to dgraph and than deliver it to client. It’s because I may need to sync back some data to salesforce at some point.
Yes but still had a question on third party auth using custom resolvers. Do you think I will need middlelayer for that or just making custom resolvers in schema it self should work?
Using Auth0 like service, we can have hooks/rules that trigger queries or mutations pre/post-login.
I think custom resolvers will be sufficient. Not very sure though, @abhimanyusinghgaur do you know if this would work?
Also, @dgandhi17, can you please elaborate on your use case?
Third party service data fetch using custom resolvers and than insert those data in dgraph. Also need to post data to third party service from querying dgraph
Hi @dgandhi17
Dgraph is not a process orchestration engine, so if the sync process between salesforce and dgraph has several steps + error handling, you should consider a middleware or at least some kind of microservice.
However, Dgraph can support orchestration needs elegantly. I have posted this video where a series of process steps are executed in a master data management context. This might be a helpful design pattern, hence sharing this.
But without this schema in ratel how can i query it from client ? I tried with graphql schema it works but as my schema is in ratel I need option for this