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: ID!
name: String!
icon: String
connectionOrientation: ConnectionOrientation!
schema: Map!
uiSchema: Map!
instructions: [ImportInstruction!]!
createdAt: DateTime!
updatedAt: DateTime!
}
Fields
ResourceType.id ● ID! non-null scalar {#id}
Unique identifier in kebab-case (e.g., aws-iam-role, kubernetes-cluster).
ResourceType.name ● String! non-null scalar {#name}
Human-readable display name (e.g., "AWS IAM Role", "Kubernetes Cluster").
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.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).
Returned By
resourceType query
Member Of
BundleDependency object ● BundleResource object ● EnvironmentDefaultResource object ● InstanceDependency object ● InstanceResource object ● Resource object ● ResourceTypePayload object ● ResourceTypesPage object ● ResourceWithSensitiveValues object