Skip to main content

resourceType

Fetch a single resource type by its composite identifier.

The id accepts an identifier@version string where the version portion can be an exact semver, a release channel, or omitted entirely:

InputResolves to
aws-iam-role@1.2.3Exact version 1.2.3
aws-iam-role@~1.2Latest patch in 1.2.x
aws-iam-role@~1Latest minor in 1.x.x
aws-iam-role@latestNewest stable release
aws-iam-role@latest+devNewest release including dev builds
aws-iam-roleShorthand for latest (falls back to latest+dev if no stable exists)

Returns null with a NOT_FOUND error if no matching version exists or the resource type is not accessible to your organization.

query {
resourceType(organizationId: "your-org-id", id: "aws-iam-role@~1") {
id
version
name
connectionOrientation
icon
}
}
resourceType(
organizationId: ID!
id: ResourceTypeId!
): ResourceType

Arguments

resourceType.organizationId ● ID! non-null scalar {#organization-id}

Your organization's unique identifier.

resourceType.id ● ResourceTypeId! non-null scalar {#id}

Resource type identifier in identifier@version format. The version can be an exact semver, a release channel, or omitted to resolve latest.

Type

ResourceType object

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.