Skip to content

[Umbrella] v3 data fetching follow-through and Gameplan migration #692

@netchampfaris

Description

@netchampfaris

Post-v1 follow-through on v3 data fetching: full Gameplan migration off v1
resources, ergonomic additions surfaced during migration, Frappe v15 backport,
and the eventual v2 deprecation decision.

v3 itself ships in v1.0 via PR #610 with a frozen public import surface.
This umbrella tracks the work that intentionally did not block 1.0.

In scope

Gameplan migration

  • frontend/src no longer uses:
    • resources: {}, $resources, $getResource
    • createResource, createListResource, createDocumentResource
  • v1 resource usage removed from active app codepaths
  • Migration findings folded back into v3 API improvements

v3 ergonomics (additive within frozen surface contract)

Backend / framework

  • Frappe v15 /api/v2/* backport — until this lands, v3 stays v16+ only
  • Session and user utilities (Session and user utilities #441)
  • First-class socket.io utilities
  • Broader internal migration of frappe-ui/frappe/* to v3

v2 deprecation decision

  • Re-evaluate after Gameplan migration completes and v15 backport status is known
  • If kept supported, document long-term coexistence; if deprecated, define removal target (likely v2.0)

Acceptance

  • Gameplan fully migrated off v1 resources
  • v3 ergonomic gaps from migration are closed
  • v15 backport status resolved (landed, or explicitly punted)
  • v2's fate decided and documented
  • Any additions to v3 honor the v1.x frozen-surface contract (no breaking changes; deprecation cycles only)

References

  • v1 plan: v1-release/plan.md — workstreams §4 (carve-out) and §5
  • v3 spec: frappe/client/spec/{api,core,vue}.md (in PR frappe/client — data-fetching v3 #610)
  • v3 frozen surface contract: see v1-release/plan.md Data API strategy section
Raw
  1. Ability to append/remove/modify a child row in a document

  2. Ability to fetch a "publicly accessible" document via data fetching utility.

 // for some documents that have `public=1`, allow get doc without permission check
doc = InsightsQuery.get(<>)
// same with a few methods that should be callable without auth/perms
doc.execute()
  1. First-class doc editing API
    doc.isDirty(), doc.discard()
let todo = ToDo.getDoc(() => props.id)
todo.description = 'asdf'
todo.save.call()
  1. doc.submit.call(), doc.cancel.call()

  2. staleness check api
    if a fetched document is changed at the server side, set doc.isStale = true

  3. If multiple doc.setValue.call() calls, there can be two modes: one is queue all setValue calls one after the other, or debounce.

  4. Attempt todo.setValue() (without the .call) with typescript support

  5. Task.getMeta()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjavascriptPull requests that update javascript codetriagedSeen by barista

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions