ResourceType
A resource type that defines what kind of infrastructure a resource represents.
Resource types are the schema layer for Massdriver's connection system. Every
dependency a bundle declares and every resource a bundle produces references a
resource type. This is what makes bundles composable -- a database bundle that
produces an aws-rds-instance resource can be connected to any application
bundle that declares an aws-rds-instance dependency.
Resource types include both public types provided by Massdriver (e.g.,
aws-iam-role, kubernetes-cluster) and private types defined by your
organization for custom infrastructure.
type ResourceType {
id: ResourceTypeId!
name: String!
version: Semver!
icon: String
connectionOrientation: ConnectionOrientation!
schema: Map!
uiSchema: Map!
instructions: [ImportInstruction!]!
effectiveAttributes: Map!
createdAt: DateTime!
updatedAt: DateTime!
producers(
cursor: Cursor
): BundlesPage
consumers(
cursor: Cursor
): ResourceTypeConsumersPage
}
Fields
ResourceType.id ● ResourceTypeId! non-null scalar {#id}
Composite identifier in identifier@version format (e.g., aws-iam-role@1.2.3). Always contains the fully resolved semver version.
ResourceType.name ● String! non-null scalar {#name}
Human-readable display name (e.g., "AWS IAM Role", "Kubernetes Cluster").
ResourceType.version ● Semver! non-null scalar {#version}
Fully resolved semantic version of this resource type (e.g., 1.2.3).
ResourceType.icon ● String scalar {#icon}
URL to the icon representing this resource type, if available.
ResourceType.connectionOrientation ● ConnectionOrientation! non-null enum {#connection-orientation}
How instances receive a dependency of this resource type. Determines whether connections are explicit links on the canvas or automatic environment-level defaults.
ResourceType.schema ● Map! non-null scalar {#schema}
The full JSON Schema describing the shape of data this resource type exposes to dependents.
Use this to generate forms, validate inputs, or inspect the fields available on a connection
of this resource type. The schema is returned verbatim, including Massdriver's $md extensions
(e.g., icon, ui). Callers that only want the data contract can read properties.data or
strip $md themselves.
ResourceType.uiSchema ● Map! non-null scalar {#ui-schema}
UI hints describing how to render the import form for this resource type.
Follows react-jsonschema-form's
uiSchema conventions: keys mirror the data schema's structure and values contain
rendering directives (e.g., ui:widget, ui:order, ui:help). Returns an empty
object when the resource type does not provide UI hints.
ResourceType.instructions ● [ImportInstruction!]! non-null object {#instructions}
Step-by-step import instructions, typically one entry per workflow (CLI, console, etc.).
Each entry is rendered as its own tab or section so users can pick the workflow they prefer when importing an existing resource. Returns an empty list when the resource type does not provide instructions.
ResourceType.effectiveAttributes ● Map! non-null scalar {#effective-attributes}
The auto-injected md-* system attributes for this resource type
(today: md-id). Resource types do not yet carry user-settable
attributes; user attributes will arrive when resource types move to
OCI-hosted distribution.
ResourceType.createdAt ● DateTime! non-null scalar {#created-at}
Timestamp when this resource type was created (UTC).
ResourceType.updatedAt ● DateTime! non-null scalar {#updated-at}
Timestamp when this resource type was last modified (UTC).
ResourceType.producers ● BundlesPage object {#producers}
Bundles in your organization whose resources are of this resource type. Each bundle appears once, at its newest stable version. A bundle whose newest stable version no longer declares a resource of this type does not appear, and development versions are never used. Only bundles you can view are listed. Sorted by bundle name.
Use this before a breaking change to a resource type to find every bundle that creates resources of this type.
ResourceType.producers.cursor ● Cursor input {#resource-type-producers-cursor}
Cursor from a previous page's cursor.next or cursor.previous.
ResourceType.consumers ● ResourceTypeConsumersPage object {#consumers}
Bundles in your organization with a dependency that accepts this resource type, with the dependency field and the version range it accepts. Each bundle is read at its newest stable version, so a bundle whose newest stable version dropped the dependency does not appear, and development versions are never used. A bundle that accepts this type through two fields appears once per field. Only bundles you can view are listed. Sorted by bundle name, then field.
Use this before a breaking change to a resource type to find every bundle that must be updated.
ResourceType.consumers.cursor ● Cursor input {#resource-type-consumers-cursor}
Cursor from a previous page's cursor.next or cursor.previous.
Returned By
resourceType query
Member Of
BundleDependency object ● BundleResource object ● EnvironmentDefaultResource object ● InstanceDependency object ● InstanceResource object ● Resource object ● ResourceTypeDependent object ● ResourceTypePayload object ● ResourceTypesPage object ● ResourceWithSensitiveValues object ● UnfulfilledDependency object