gsvclass
Joined 9 years ago
Joined 9 years ago
Shameless plug but this was my motivation behind building GraphJin a GraphQL to SQL compiler and it's my single goto force multipler for most projects. https://github.com/dosco/graphjin
Here's an example of a relatively complex query that you'd need when building something like a blog. GraphJin will compile this nested query into a single efficient SQL statement.
https://gist.github.com/dosco/f604c47c1d643fb62072f62c4f6f70...
Here's an example https://pkg.go.dev/github.com/dosco/graphjin/core#example-pa...
And here's an example of a Redis custom resolver to join with data from Redis. https://pkg.go.dev/github.com/dosco/graphjin/core#Resolver
Here's a quick example of using it as a library in your own code.
https://gist.github.com/dosco/2422006fe322bd81c00988570f50a5...
https://github.com/dosco/super-graph