Introduction to Schema Configuration

1080

What is a Schema?

Skylark's API is built using GraphQL. In GraphQL a schema is a blueprint that defines the structure and capabilities of an API. It specifies the types of data that can be queried or mutated and the relationships between them.

A GraphQL schema consists of two main components:

Object Types: These represent the resources available in the API, such as Brands, Seasons, or Episodes. Object types have fields, which define the data that can be queried or mutated.

Queries and Mutations: These define the operations that can be performed on the data. Queries retrieve data from the API, while mutations modify data in the API.

The schema serves as a contract between the client and the server, allowing the client to understand what data is available and how to request it. It also enables tools like GraphQL introspection to provide insight into the API's capabilities and structure.

A Flexible, Extensible Default Schema

By default, Skylark comes with a pre-configured schema designed for an entertainment-focussed streaming platform. This schema includes several media objects that are proprietary to Skylark, such as Asset, Image and Text Track, and cannot be modified.

A key selling point of the Skylark schema is its flexibility. All non-proprietary metadata objects can be modified or deleted entirely, allowing you to tailor the schema to your specific needs. Moreover, new objects and relationships can be added as needed to best reflect your internal intellectual property (IP). This feature gives you complete control over the schema and the ability to customise it to fit your unique business requirements.

πŸ“˜

Relating to a proprietary object

Note that while media objects and sets can't be modified, you can always add a relationship between them and another metadata object that holds additional info. Relationships in Skylark are bi-directional and many-to-many, so this relationship could represent a hierarchical relationship or an inheritance-based one.

The default schema also includes a special object called sets, which can hold an array of objects that are allowed to be put into sets. This object is also proprietary to Skylark and cannot be modified.

To contextualise and merchandise your media objects, the default schema includes metadata objects specifically designed to support a streaming service. These objects comprise Brand, Season, Episode, and Movie.

For categorising and filtering content in rich ways, Skylark provides several objects such as Person, Role, Theme, Genre, and Rating.

While Skylark offers a rich tagging system that can handle anything that doesn't fit into the schema, we recommend creating new rich metadata objects instead of using tags to create a more immersive and discoverable data model.


What’s Next

Up next: understand versioning and learn how to create and edit objects, and add relationships.