edgedb-js
edgedb-js copied to clipboard
The official TypeScript/JS client library and query builder for EdgeDB
Per a recent team call, I'm putting down some thoughts relating our plans to provide a better DX for users looking to generate the query builder and apply migrations in...
Currently, we only provide a single `bin` script: `edgeql-js`. However there are a few reasons we need to rethink this. - We're adding another command to run migrations: https://github.com/edgedb/edgedb-js/issues/340 -...
**Steps to reproduce:** 1. Define a custom scalar, `scalar type sha512_output extending bytes`. 2. Define a field using that custom scalar, `property file_sha512sum -> sha512_output` 3. Use the query builder...
Proposed query builder API for group: In EdgeQL: ``` group Movie using cast_size := count(.actors), first_letter := movie.title[0] by .release_year; ``` Query builder: ```ts // group Movie e.group(e.Movie, movie =>...
Proposed API: expose a top-level `e.global` object containing references. This `global` object would be created in every module that includes 1+ globals. ```ts e.global.user_id; e.my_module.global.foo; ``` More succinct and better...
Context: https://discord.com/channels/841451783728529451/849374705210490900/972227851040485460 ```ts await e .insert(e.PricingEvent, { asset: selectById(e.Asset, asset.id), created: new Date(), ...fieldsToSet, }) .unlessConflict((dbPricingEvent) => ({ on: e.tuple([ dbPricingEvent.fundingRound, dbPricingEvent.valuationType, ]), else: e.update(e.PricingEvent, () => ({ set: {...
It would be nice if the Edge DB JS client supported Cloudflare workers: https://workers.cloudflare.com/ To do this, any references to unsupported node polyfills would need to be removed. It seems...
anniversary is defined as cal::local_date in the schema In the result from my query anniversary is incompatible with the LocalDate type exported from the package ![Screen Shot 2022-04-26 at 7...
- EdgeDB Version: `0.20.7` - EdgeDB CLI Version: `1.1.1+932d5c6` Given the following schema: ``` module default { type users { required property email -> str { constraint exclusive; } required...
I have a setup script in my package.json and I needed to tweak it a little bit to have it consistently generate the edgeql-js client library. ```json { "setup": "echo...