timhal / payload-backpop Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Because the plugin just loops over the fields of the relationship, not fields of fields
It appears that there is some sort of undocumented setup required to use the Demo app? Maybe a symlink of some sort, as the demo has "payload-backpop": "file:./plugin"
Could this be updated to use yarn workspaces, to make it easier for collaborators with a dev/test environment?
Hey @TimHal and @AlessioGr -
Great work here - inverse relationships are a big problem with Payload not being able to query incoming relationships. I'm not 100% sure that actually materializing the inverse relationship is the best approach, especially with the huge performance improvements of $lookup
in MongoDB 7.0, not to mention the introduction of relational DB support with Drizzle ... but in any case, I think this approach still makes a lot of sense in certain situations where you could have a huge amount of polymorphic relationships.
So ... what's the status on the project? Are either or both of you running it in any kind of production environment? Are you still planning on publishing to NPM? What about upgrading to Payload 2.0?
I can certainly help out with some tests and pull requests, but I wanted to make sure that this library is still being worked on ... otherwise I might explore my own approach probably starting with inverse lookups. If you're looking to continue work on this project, then I'd love to collaborate.
I have some collection slugs that contain hyphens -
which aren't allowed in GraphQL requests/can't be a field name. I've solved this locally by doing this... Something to consider if it wasn't on your radar already!
const targetFieldName = `${collection.slug.replace('-', '_')}_${field.name}_backpopulated`;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.