Module
API reference
A Dagger module.
description- The doc string of the module, if any
id- A unique identifier for this Module.
name- The name of the module
serve- Serve a module's API in the current session.
check- Return the check defined by the module with the given name. Must match to exactly one check.
checks- Return all checks defined by the module
dependencies- The dependencies of the module.
enums- Enumerations served by this module.
generatedContextDirectory- The generated files and directories made on top of the module source's context directory.
generator- Return the generator defined by the module with the given name. Must match to exactly one generator.
generators- Return all generators defined by the module
interfaces- Interfaces served by this module.
introspectionSchemaJSON- The introspection schema JSON file for this module.
objects- Objects served by this module.
runtime- The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
sdk- The SDK config used by this module.
services- Return all services defined by the module
source- The source for the module.
sync- Forces evaluation of the module, including any loading into the engine and associated validation.
userDefaults- User-defined default values, loaded from local .env files.
withDescription- Retrieves the module with the given description
withEnum- This module plus the given Enum type and associated values
withInterface- This module plus the given Interface type and associated functions
withObject- This module plus the given Object type and associated functions.
description: String!
The doc string of the module, if any
id: ID!
A unique identifier for this Module.
name: String!
The name of the module
serve(includeDependencies: Boolean, entrypoint: Boolean): Void
Serve a module's API in the current session.
Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
includeDependencies: BooleanExpose the dependencies of this module to the client
entrypoint: BooleanInstall the module as the entrypoint, promoting its main-object methods onto the Query root
check(name: String!): Check!Experimental
Return the check defined by the module with the given name. Must match to exactly one check.
Experimental: This API is highly experimental and may be removed or replaced entirely.
name: String!The name of the check to retrieve
checks(include: [String!], noGenerate: Boolean): CheckGroup!Experimental
Return all checks defined by the module
Experimental: This API is highly experimental and may be removed or replaced entirely.
include: [String!]Only include checks matching the specified patterns
noGenerate: BooleanWhen true, only return annotated check functions; exclude generate-as-checks
dependencies: [Module!]!
The dependencies of the module.
generatedContextDirectory: Directory!
The generated files and directories made on top of the module source's context directory.
generator(name: String!): Generator!Experimental
Return the generator defined by the module with the given name. Must match to exactly one generator.
Experimental: This API is highly experimental and may be removed or replaced entirely.
name: String!The name of the generator to retrieve
generators(include: [String!]): GeneratorGroup!Experimental
Return all generators defined by the module
Experimental: This API is highly experimental and may be removed or replaced entirely.
include: [String!]Only include generators matching the specified patterns
interfaces: [TypeDef!]!
Interfaces served by this module.
introspectionSchemaJSON: File!
The introspection schema JSON file for this module.
This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
Note: this is in the context of a module, so some core types may be hidden.
runtime: Container
The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
services(include: [String!]): UpGroup!Experimental
Return all services defined by the module
Experimental: This API is highly experimental and may be removed or replaced entirely.
include: [String!]Only include services matching the specified patterns
source: ModuleSource
The source for the module.
sync: Module!
Forces evaluation of the module, including any loading into the engine and associated validation.
userDefaults: EnvFile!
User-defined default values, loaded from local .env files.
withDescription(description: String!): Module!
Retrieves the module with the given description
description: String!The description to set
withEnum(enum: TypeDef!): Module!
This module plus the given Enum type and associated values
enum: TypeDef!
withInterface(iface: TypeDef!): Module!
This module plus the given Interface type and associated functions
iface: TypeDef!
withObject(object: TypeDef!): Module!
This module plus the given Object type and associated functions.
object: TypeDef!
References
Returned by
Binding.asModuleCheck.originalModuleCurrentModule.dependenciesDirectory.asModuleGenerator.originalModuleModuleSource.asModuleQuery.moduleUp.originalModule