1.1.0 • Published 6 years ago
@front.build/supertypes v1.1.0
Supertypes aims to solve the problem of modeling data for ORMs. It was inspired by Ruby on Rails, GraphQL, MongoDB, SQL, Neo4j, Gremlin, and others.
Supertypes allows you to define your data independent of whether it's in a SQL database, graph database, or document database, then validate and shape your data based on those specifications.
Usage
var types = new Supertypes()
types.field('Comment/children[]', { type: 'Comment' })
types.field('Comment/message', { type: 'String' })
types.field('User/email', { type: 'String' })
types.field('User/profile/backgroundColor', { type: 'String' })
types.field('User/comments[]', { type: 'Comment' })