-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: GraphQL Server #2379
Comments
Maybe think of using existing graphql server implementations? Strawberry takes 'THE' best graphql approach I've known in the ecosystem. They are planning to move most of the graphql server related code interface from python -> rust using FFI. A similar RUST based backend would be one of Puff Rs. |
In evitaDB we solve the same problem: https://evitadb.io/documentation/use/connectors/graphql We maintain a strict typed schema that allows us to automatically generate a GraphQL schema with all necessary information (including documentation, optional/mandatory field settings, etc.) on demand based on the actual database schema. The generated schema tries to mimic the GraphQL that would be created by application developers - so it uses the business names of entities, fields and relations. Front-end developers (consumers of the GQL API) are very positive about it and understand the content well. Try it yourself and play with the auto-completion based on the GQL schema in the editor: https://demo.evitadb.io/lab?demoSnippetRequest=eyJicmFuY2giOiJkZXYiLCJwYXRoIjoiZG9jdW1lbnRhdGlvbi91c2VyL2VuL3F1ZXJ5L3JlcXVpcmVtZW50cy9leGFtcGxlcy9mZXRjaGluZy9yZWZlcmVuY2VDb250ZW50T3JkZXIuZ3JhcGhxbCJ9 We'd love to hear what you think and maybe even help inspire makers of SurrealDB too. |
Hello! We are building an open source ORM for typeDB (https://github.com/Blitzapps/blitz-orm) which is conceived to accept graphQL-like queries for multiple databases. We would love to find somebody to help us building the adapter for surrealDB, that would enable using graphQL to communicate with surrealDB. |
Hasura v3 has been reimplemented in Rust, and the new version provides an official API for data connectors: Hasura's Native Data Connectors. |
While this isn't a bad idea, it would have the down side of running yet another service on top of Surreal and the PR #3266 already has a working version of the GraphQL server, which is amazing to see thanks to @RaphaelDarley |
Is your feature request related to a problem?
Note this is a tracking issue for GraphQL implementation.
There is a huge disconnect between a Surreal backend and a client (whether a Web App or another form of client) in terms of DX, quite frankly this has always been the case over the decades with database interfacing. Since then, we've had ORMs developed - a noteable one that changed the scene was Prisma, while this was great it still meant extra work / abstractions are needed to really extract value from it, thereafter, we've come across Hasura and Supabase as data platforms, this is where we've bridged the gap. GraphQL Codegen tools are widely available noteably Apollo GraphQL Client, GQty for JS runtimes.
To reiterate here are the issues:
Describe the solution
With a GraphQL server built-in to Surreal, we're able to provide a type-safe way interface to query our data, across any language and runtime, where live queries are concerened one could use WebSockets or WebTransport (preferred) protocols.
The GraphQL resolver needs to be powerful enough to handle all the functionality Surreal offers, since Surreal tables can both be schemaful and schemaless, this plays a huge role in what the GraphQL schema would look like.
Some queries that maybe edge cases for the implementation are:
The end goal should be that Surreal acts as the source of truth for your data model.
Resources:
Alternative methods
As GraphQL is already on the Surreal Roadmap, this issue is simply to bring attention, spark discussion and for tracking of the GraphQL implementation. Would prefer if the implementation is with async-graphql as it seems to be better maintained.
SurrealDB version
N/A
Contact Details
No response
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: