VulcanJS / Vulcan

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.89k forks source link

Add support for selecting/caching by other indexes #2000

Open SachaG opened 6 years ago

SachaG commented 6 years ago

It would be great to be able to select individual documents by any arbitrary index.

It would also be nice to have Dataloader support slug (or any arbitrary field name) in addition to _id.

SachaG commented 6 years ago

Currently selectorUniqueInputTemplate is hardcoded to use documentId (which then gets translated as _id by the Mongo connectors) or slug. Ideally the list of possible selector fields would be dynamically generated from the schema both inside the GraphQL templates, as well as inside withSingle, withUpdate, withUpsert, and withRemove.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

eric-burel commented 5 years ago

Related https://github.com/VulcanJS/Vulcan/issues/2118