GraphQL Lineage Tracking
Trace data from GraphQL operations through type definitions to model entities. Operations reference type definitions, type definitions use schemas, and schemas track lineage to properties in the data model.
GraphQL lineage tracking connects operations to the data model. Operations reference type definitions with field-level lineage to entity properties in model.neoarc. This creates full traceability from GraphQL query to canonical data model.
The GraphQL Lineage Chain
Lineage flows through the GraphQL type system:
How It Works
GraphQL operations reference schemas that serve as type definitions. Each schema field contains lineage entries mapping to model entity properties using sourceType: "graph" with graphFilePath: "model.neoarc".
{
"sourceType": "graph",
"graphFilePath": "model.neoarc",
"nodeName": "Product",
"nodeId": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
"propertyName": "Name"
}
Query Operation Lineage
Query operations retrieve data with full lineage tracking. The return type schema contains lineage entries for each field, mapping to the corresponding model entity properties.
Mutation Operation Lineage
Mutations modify data with lineage tracking on both input and return types. Input types map input fields to model properties, while return types trace the response data back to the model.
Subscription Operation Lineage
Subscriptions provide real-time data with the same lineage tracking. The return type schema traces fields to model properties identically to queries and mutations.
Tracing from Operation to Model
Cross-Entity Lineage
GraphQL types often span multiple model entities. A schema for an Order type might map fields to both the Order entity and related entities such as Customer and Product.
Lineage Through Interfaces
When GraphQL types implement interfaces, lineage tracks through the implementations:
Custom Scalar Lineage
Custom scalars can have lineage notes documenting how the model property maps to the GraphQL scalar type:
Visualising in the Intent Graph
The Intent Graph captures the full GraphQL lineage chain: