Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get proper output when client runs the same mutation multiple times #157

Open
wilkerlucio opened this issue Sep 22, 2022 · 0 comments
Assignees
Labels
design phase enhancement New feature or request

Comments

@wilkerlucio
Copy link
Owner

Problem Analysis

Description

When a client makes a request invoking the same mutation multiple times, Pathom only returns the last response.

Example:

(pco/defmutation add-node [{:keys [id]}]
  (println "do" id) ; so you can see that both invocations happen
  {:id id})

(def env
  (pci/register
    [add-node]))

(comment
  (p.eql/process (assoc env :counter (atom 0))
    {:file/path "src/demos"}
    `[(add-node {:id "a"}) (add-node {:id "b"})]))

Problem

As a result, the user cannot know what happens to any call but the last one. The responses become unreachable.

The Solution Space

https://docs.google.com/spreadsheets/d/1M7DZyPJHjyWFVdAVv9JRJcRwEnHPRgRvcjxGZSFB6UE/edit#gid=0

@wilkerlucio wilkerlucio added the enhancement New feature or request label Sep 22, 2022
@wilkerlucio wilkerlucio self-assigned this Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design phase enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant