Details
-
New Feature
-
Status: To Do
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Support for vertex / label schema generation via schema definition language (SDL)
SDL is a concise way of specifying the GraphQL schema.
It is an official specification of GraphQL and has a well-defined syntax.
If it can specify a part of the S2Graph Management function through SDL, it is expected to improve usability a lot.
Below is an example that supports GraphQL SDL in NEO4J (another graph db).
In this example, it is assumed that each type is a `ServiceColumn` and the name(ACTED_IN, IN_GENRE) defined in `@relation` is defined as `Label`.
type Movie { id: ID! title: String year: Int imdbRating: Float actors: [Actor] @relation(name: "ACTED_IN", direction: "in") genres: [Genre] @relation(name: "IN_GENRE", direction: "out") } type Actor { id: ID! name: String } type Genre { id: ID! name: String }
link: https://www.prisma.io/blog/graphql-sdl-schema-definition-language-6755bcb9ce51/
link: https://blog.grandstack.io/five-common-graphql-problems-and-how-neo4j-graphql-aims-to-solve-them-e9a8999c8d43