Resolve and pin dependencies

resolveProjectDependencies(input: ResolveProjectDependenciesInput!): ResolveProjectDependenciesPayload!

Requires project.files.write.

Arguments

ArgumentTypeRequired
inputResolveProjectDependenciesInput!Yes

Input fields

input

ResolveProjectDependenciesInput

FieldTypeRequiredDescription
projectReferenceString!YesProject UUID or slug.
branchStringNoBranch name or UUID, 1-255 characters without surrounding whitespace. Omit for main.
specifiers[String!]!Yes1-100 npm specifiers to pin to exact versions in package.json after adding imports or packages. Each is 1-200 characters: bare package, exact version or semver range.
expectedDeclarationsJSONObjectNoObserved package declarations: a map of npm package name to a string of up to 200 characters, or null when absent; at most 100 entries. Keys must equal the requested package names. Changed declarations are skipped. Declared as JSONObject so existing documents keep validating.

Response

Returns ResolveProjectDependenciesPayload!. Open the type for its fields and nested types.

FieldTypeDescription
pinsDependencyDeclarationMap!Successfully resolved exact pins, including existing pins. Existing exact pins remain unchanged. Unknown packages and registry failures are omitted without failing the batch. A requested package absent from both pins and skipped was not resolved or written.
persistedBoolean!True when eligible pins were persisted or no eligible write was needed. False means persistence failed; pins retain intended values for retry.
skippedDependencySkipMap!Packages skipped because their current declaration differs from the supplied snapshot. The skip reason is declaration_changed.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation ResolveProjectDependencies($input: ResolveProjectDependenciesInput!) {
  resolveProjectDependencies(input: $input) {
    persisted
    pins
    skipped
  }
}
json
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001",
    "specifiers": []
  }
}