Autogenerated GraphQL types
When you have defined an industrial knowledge graph with the data modeling REST API, use the GraphQL interface to query and mutate data in the instances mapped by the views in your graph.
CDF will automatically generate GraphQL types for the collection of views making up a DMS data model.
An example generated type:
type Movie {
"name of the movie" # inlined property description
name: String! # an exclamation mark denotes a required property
actors: [Actor] # An edge connection property. Is resolved by the GraphQL interface
producers: [Producer] @directRelation # A direct relation property. Can be resolved by the GraphQL interface.
director: Person # A direct relation property. Can be resolved by the GraphQL interface.
watchedIt: Boolean
}
📄️ GraphQL queries
You can query the instances with GraphQL. The query capabilities of the GraphQL API interface represent a subset of the capabilities available from the DMS query endpoints.
📄️ GraphQL mutations
You can create and update instances using GraphQL. The mutation capabilities available from the GraphQL API represent a subset of the capabilities of the ingestion REST API endpoints. The GraphQL interface for data modeling doesn't anticipate receiving significant data ingestion traffic. For that, please use the DMS REST API, or the CDF Transformations service.
📄️ Data modeling language extension for GraphQL
This article describes the current capabilities of the Data modeling language extension for GraphQL (DML).