Skip to content

Enigmatis/polaris-schema

Repository files navigation

Small Logo

polaris-schema

Build Status NPM version

Install

npm install polaris-schema

Overview

This library helps you set all of the fundamental definitions of polaris based schema.

RepositoryEntity

This interface represents the base entity definitions of any graphql entity that we will create - which means that any graphql entity you will use, must inherit this interface properties. It consists the following properties:

  • id: the unique id of the entity.
  • deleted: whether the entity is soft deleted.
  • createdBy: who created the entity.
  • creationTime: when was the entity created.
  • lastUpdatedBy(string - Optional): who last updated the entity.
  • lastUpdateTime(Date - Optional): when was the entity last updated.
  • realityId: the id of the reality the entity is from.

RepositoryEntityTypeDefs

This member is the actual graphql interface type definition that consists of all of the RepositoryEntity properties explained above.

ScalarsTypeDefs & ScalarsResolvers

All of the scalars supported by polaris-schema.

ExecutableSchemaCreator

This class will combine the type defs and resolvers offered by user, with polaris-schema repository entity and scalars, to one executable schema.