Skip to content

GraphQL

Generate a GraphQL schema: types, interfaces, scalars and enums, but no queries.

Terminal window
ohi get w3c/prov-o
ohi linkml to graphql --pruning-mode schema \
--to prov-o.graphql prov-o.linkml.yaml
Try it in the playground, with PROV-O
metadata_languagestringdefault en
CLI --metadata-languageScala metadataLanguage

The language of the titles and descriptions in the output, for schemas with text in more than one language.

pruning_modePruningModedefault schema
CLI --pruning-modeScala pruningMode

The elements of the schema to include in the output.

  • tree_root The elements reachable from the tree root class. Without a tree root, the same as schema.
  • schema Everything defined in the root schema, and every element reachable from it. This leaves out the unused parts of imported schemas, such as most of linkml:types.
  • skip Every element of the root schema and of all its imports.
tree_rootstring
CLI --tree-rootScala treeRoot

The class to use as the tree root, instead of the class with tree_root: true in the schema. Only for the tree_root pruning mode.