createShareLink
Create a public share link for a resource the caller can edit. Returns the link with its one-time plaintext slug.
Authorization is enforced IN THE RESOLVER — the caller must hold the resource's atomic make_public scope (workspace__strategy__make_public for strategy-derived types, workspace__bot__make_public for bots) on the resource's owning workspace. It is generic over resourceType (backtest or strategy); the @hasScope directive cannot be used here because its resourceType is static while this mutation accepts either kind (same resolver-gate pattern as revokeShareLink below).
Billing is ALSO enforced in the resolver, and deliberately not as a plan gate on the mutation itself. Creating a share link is available on every plan including Free: a /s/{slug} page reaches no search index (it is in no sitemap, is never pushed to IndexNow, and is served from a host whose robots.txt is a blanket Disallow), so it is reach without reputation risk — and it is the only mechanism by which a free user shows anyone else a result. Two narrower controls apply instead:
allowIndex: truerequires themarketplace_publishentitlement (billing.EnforceShareIndexing). Indexing is the paid capability, not sharing.- The number of ACTIVE links is capped per organization by the plan's
max_share_links(billing.EnforceShareLinkLimit), counted across every workspace in the org. Revoking a link frees its slot.
createShareLink(
input: CreateShareLinkInput!
): ShareLink!
Arguments
createShareLink.input ● CreateShareLinkInput! non-null input
Type
ShareLink object
A public share link. Returned by createShareLink (with the one-time plaintext
slug) and by revokeShareLink (with slug empty — it is never re-derivable).