Skip to main content

forkFromListing

Fork a published listing into a working v1 strategy owned by ownerID — the "fork a listing" path (internal/marketplace.LoadForkSource + ForkFromListing), which NEVER reads the source ent.Strategy. AUTHENTICATED; authorization checks the TARGET org ONLY (workspace__strategy__write on ownerID) — there is deliberately NO scope check against the source listing's own workspace: the listing IS the authorization (it was published, and it carries its own platform-wrapped fork payload). Gated additionally behind the marketplace_fork entitlement.

Entitlement and quota are enforced IN THE RESOLVER, exactly as createStrategy and forkStrategy enforce them: max_strategies (billing.EnforceStrategyLimit) and, for a freqai listing, reinforcement_learning (billing.EnforceRLFeatureForStrategy, detected from the SEALED code/config/uiBuilderConfig — never from the publisher's self-declared category). strategy.Create carries no quota check of its own, so nothing downstream would catch either.

ownerID is resolved through workspace.ResolveOwnerWorkspaceForCreateScoped before the row is written, so the forked strategy always lands under a validated workspace inside the caller's tenancy.

forkFromListing(
listingSlug: String!
ownerID: ID!
): Strategy!

Arguments

forkFromListing.listingSlug ● String! non-null scalar

forkFromListing.ownerID ● ID! non-null scalar

Type

Strategy object