4

I have a backend service with Gremlin and Amazon Neptune. I would like to provide a GraphQL endpoint to execute queries in Neptune. I found an old hackathon project that might works. But, I would like to know if there is a better way to achive it.

codetiger
  • 2,650
  • 20
  • 37
cmaluenda
  • 2,099
  • 1
  • 14
  • 15
  • 1
    If you are looking for a direct gremlin to graphQL API translator, I am also looking for the same type of library. Finally ended up writing a NodeJS Lambda function that uses gremlin javascript package and wrote my own graphQL functions needed for my use case. My search for direct API tool failed to fetch any such tool – codetiger Jul 31 '20 at 13:43
  • @codetiger I think I am in the same boat. I will need to create my own implementation in Java. – cmaluenda Aug 02 '20 at 20:59
  • @cmaluenda where did you end up with the requirement, we are also looking for a similar solution. – Ameya Oct 22 '21 at 08:41
  • @Ameya We didn't use GraphQL. The project was a POC. – cmaluenda Oct 25 '21 at 16:12
  • Anyway, we found what we were looking for in the document using a dynamic graph we can even separately store the data in different servers per the requirement of the tenant. https://docs.janusgraph.org/operations/dynamic-graphs/ but https://docs.janusgraph.org/operations/configured-graph-factory/ is to make a graph at runtime does not work with Cassandra (https://stackoverflow.com/questions/69630622/configuredgraphfactory-open-on-janusgraph-returned-cassandra-drivertimeoutexce). – Ameya Oct 26 '21 at 03:30

1 Answers1

4

The way I have done it is to define a schema using AWS AppSync and to have AppSync call Lambda resolvers that use Gremlin Python. AppSync provides a fully managed GraphQL server environment. The Lambda Python code makes Neptune calls and returns the data to AppSync. For my use case it worked very well. I am aware of several other people using the same approach.

Kelvin Lawrence
  • 14,674
  • 2
  • 16
  • 38
  • We have a service running already. We want to avoid to add a new endpoint for every new vertex that we add to Neptune. We want to provide the flexibily to the users to create any query. We can not use AppSync because our testing environment uses Janusgraph. – cmaluenda Aug 02 '20 at 20:56