Skip to content

Technical debt: clean up refresh param handling in Program/Module forms #2274

@kasya

Description

@kasya

Currently, the form update logic for Program or Module is messy, relying on passing refresh=true as a parameter. This implementation exposes internal mechanics to the end user, which they should never see—especially on slower connections where the param might briefly appear. It also contributes to code duplication check failures.

Apollo provides built-in support for updating local frontend data after mutations (docs). There are several ways to handle this more cleanly than our current approach.

I’m particularly in favor of updating the cache directly (docs) to avoid unnecessary backend calls, but we need to ensure this only happens after the mutation completes successfully. This may require updating the mutation’s returned data.

Alternatively, we could define a custom update() function (docs) if modifying the returned data isn’t desirable.

Metadata

Metadata

Assignees

Type

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions