#dagger/core/schema/directory.go at 2825b...
1 messages · Page 1 of 1 (latest)
and an example of it being called via a test: https://github.com/alexcb/dagger/blob/2825be594748d0fcd299312f502029282d56f182/core/integration/directory_test.go#L1512-L1514
Yep, there's an example here with an enum for cache mount sharing config: https://github.com/sipsma/dagger/blob/129e0f14892718036f11497eea6ff28f001bf551/core/cache.go#L52-L52
There's some boilerplate for defining it like I linked to, then just need to make sure to include it in the schema install, e.g. https://github.com/sipsma/dagger/blob/129e0f14892718036f11497eea6ff28f001bf551/core/schema/query.go#L43-L43
and after that can just use it as the type when defining args for the api, e.g. https://github.com/sipsma/dagger/blob/129e0f14892718036f11497eea6ff28f001bf551/core/schema/container.go#L1328-L1328