Comments (2)
Thanks for this report, I have made some changes around this behavior with batches.
Code for the changes is at 721d142
First I like to talk about the problem. The problem of seqs (or sets), is that they are data structures that don't support indexed update (can't assoc-in or update-in some specific element of the collection). This is a problem for batching, because batch runs kind of "outside" the entity, and then it has to be merged back in. This merge back in is the step in which I need the indexed update. Vectors can do this just fine, but seqs and sets can't.
The error on stack is related to the attempt of doing assoc-in on a seq (or set).
Now I change the behavior, and if you run this same again, you should see the correct response, and some warnings about batch disabled. Now, when I start processing something that's not batch compatible, I mark the env, and if you try to do batch in one location like this, it won't try to batch, it will use the batch resolver as a non batch one (send a list with one element, pick the first result). This way it will work as if you don't have batch, but works. And if this happens you get a warning message to let you know your batch is not happening.
I also updated the docs on batching to reflect this new knowledge, you can it at: https://pathom3.wsscode.com/docs/resolvers/#unsupported-batch
from pathom3.
Thanks a lot for this Wilker. Very happy with your solution
from pathom3.
Related Issues (20)
- StackOverflowError with nested inputs HOT 1
- Runner executing batch resolver before sub-path resolvers HOT 1
- Alias requiring multiple inputs (planning issue?) HOT 16
- Child sequence resolvers do not use parent entity data HOT 2
- Difference between batched and non-batched behavior. Bug? HOT 7
- running process inside a resolver breaks because it tries to register lenient mode plugin twice HOT 3
- Map container fails HOT 1
- p.eql silently drops nested attributes HOT 2
- StackOverflowException when using foreign register.
- Error message refers to clojure.core/name instead of the resolver op-name
- Ensure plans are cached independent of a query's idents' values
- Remove placeholder param data feature from core features HOT 1
- Plugin `mutation-resolve-params`, error path handling
- Errors with missing attributes in lenient-mode / batch resolvers
- Dynamic resolvers are called more than necessary.
- :batch? true sometimes makes parts of query unresolvable
- process-one returns nil instead of false
- Resolvers are not run in parallel with other resolvers HOT 3
- Single resolvers are running at the same time as a bulk resolver. HOT 1
- [bug] If a bulk resolver returns a list of length <> input length pahtom hangs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pathom3.