You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "Daewon Jeong (JIRA)" <ji...@apache.org> on 2018/09/19 06:57:00 UTC

***UNCHECKED*** [jira] [Created] (S2GRAPH-241) Support for vertex/label schema generation via SDL(schema definition language)

Daewon Jeong created S2GRAPH-241:
------------------------------------

             Summary: Support for vertex/label schema generation via SDL(schema definition language)
                 Key: S2GRAPH-241
                 URL: https://issues.apache.org/jira/browse/S2GRAPH-241
             Project: S2Graph
          Issue Type: New Feature
            Reporter: Daewon Jeong


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`.

{code}
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
}
{code}

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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)