Skip to content

Load a Schema using JavaScript #135

@psrpinto

Description

@psrpinto

In #134 we have defined the structure of a Schema. We now need a way to load a schema into JavaScript code.

Probably something along these lines:

export function getSchema( subjectType: SubjectType ): object

Ideally we should find a way to automatically embed the schemas of all subject types, without needing to manually import a file when a new schema is added. In short, we do not want to do this:

import BlogPostSchema from './blog-post.json';

Instead, all schema files need to be automatically embedded into the bundle (e.g. through webpack).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions