Introduction

Data entities play a crucial role in Graphweaver, serving as the building blocks that define the structure and behavior of data within the system.

In this article, we will explore the concept of data entities, their significance in Graphweaver, and how to create and customize them.

<aside> 💡 There are two types of entities in Graphweaver “Data entities” and “GraphQL entities”. These can be confusing at first but the data entity models the data object and the GraphQL entity is what is exposed via the API.

</aside>

Overview

Data entities are representations of various data sources within Graphweaver. They act as the bridge between the underlying data providers and the GraphQL schema.

A data entity defines the shape of the data, including its properties and relationships.

By defining data entities, you establish a clear mapping between the data sources and the GraphQL schema.

This allows you to seamlessly integrate and manipulate data from different sources in a unified manner.

Data entities may have more properties than you choose to expose via the GraphQL API and it is this layer of abstraction that gives you a great deal of flexibility.

Importance of Data Entities in Graphweaver

Data entities are a part of the architecture principles of Graphweaver. Although it may seem like creating two entities each time is redundant it does offer a number of advantages: