Keystone: Data storage adapter ideas

Created on 17 Sep 2018  路  7Comments  路  Source: keystonejs/keystone

In addition to the initial planned adapter (Mongoose and Knex #297), a number of other ideas have been tabled:

  • SQLite -- Actually pretty powerful. Good for small apps and demo.
  • In-memory DB -- An adapter without any external dependancies/processes that we can load with data out of a JSON file. This would be _super_ useful for testing. Possibly NeDB? Claims to implement the important parts of the Mongo API.
  • OpenCRUD -- As in another, external GraphQL endpoint. This could be another KS 5 instance or any other system that conformed with OpenCRUD.
  • Prisma -- Specifically the new Prisma Client. This would let devs wrap "any database" in a GraphQL layer then interface with it through a consistent data adapter.
  • PostGraphile -- "Instant, secure and fast GraphQL API for Postgres"
  • ORM adapters (eg. Objection or Bookshelf) -- Like the Knex adapter but also creates model classes and, internally, uses them instead of plain Knex "records". Good for larger systems?
  • Write-only flat-file (JSON, CSV, text, etc.) -- A write only adapter that adds (structured?) lines to a file on disk. Could be a nice interface for logging data for later analysis? Either remotely or in-app
  • Remote structured data services (Airtable, Google Sheets, etc.) -- Would be pretty cool...
  • Other persistence engines -- Redis, Elasticsearch, ..?
  • Data integrations -- Stripe, Algolia, Harvest? (Read-only?)
  • System data sources -- File system, system metrics/resources, ..? Actually, probably just lists defs for osquery

Speaking of all this, our adapter framework might need to support something akin to "feature flags". That is, a way for a (Keystone or List?) adapter to communicate to Keystone which features it supports, eg. readable, writable, updatable, maybe "findable"? As in, can values be searched for or only referenced by ID?.

TBA feature request knex question / idea

Most helpful comment

Would it be possible to add support for Google Firestore as well?

All 7 comments

Would it be possible to add support for Google Firestore as well?

I'd like to suggest adding the following:

Flat-file support will be helpful to use keystone with other static website generators.

  • Some kind of configurable REST adapter, as per #1573

It looks like there hasn't been any activity here in over 6 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. :)

Instead of add support for NeDB, Keystone could add support for LinvoDB wich is based on NeDB, but has a Mongoose-like features and interfaces. Which could make it easier to add support for, because the current MongoDB adapter is using Mongoose. On the other hand, I would also be happy with SQLite over Prisma.

There is also a Mongoose Driver for LinvoDB, but this looks outdated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bothwellw picture bothwellw  路  18Comments

cowjen01 picture cowjen01  路  13Comments

justinmoon picture justinmoon  路  13Comments

ra-external picture ra-external  路  10Comments

molomby picture molomby  路  11Comments