profile
viewpoint
Tim Suchanek timsuchanek Berlin, Germany Developer @prisma

prisma-archive/chromeless 13265

🖥 Chrome automation made simple. Runs locally or headless on AWS Lambda.

prisma-labs/graphql-playground 6141

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)

prisma-labs/graphql-yoga 5749

🧘 Fully-featured GraphQL Server with focus on easy setup, performance & great developer experience

prisma-labs/graphql-prisma-typescript 701

🏡 GraphQL server reference implementation (Airbnb clone) in Typescript using Prisma & graphql-yoga

prisma-archive/prep 367

Pre-renders your web app (React, Vue, Angular, ...) into static HTML based on your specified routes enabling SEO for single page applications.

blai/grunt-express 263

Start an Express.js web server using grunt.js

prisma-labs/http-link-dataloader 74

📚📡 HTTP Apollo Link with batching & caching provided by dataloader.

schickling/three-vr 29

Device controls and render steps for mobile virtual reality applications

prisma/e2e-tests 18

🥼🧬🧪🔬🧫🦠

startedconnor4312/blake3

started time in 11 hours

startedberstend/tiny-request-router

started time in 11 hours

startedsplitbee/notion-api-worker

started time in 11 hours

startedsindresorhus/file-type

started time in 13 hours

startedmswellhao/PacSum

started time in 15 hours

push eventprisma/prisma

timsuchanek

commit sha 645b0705d859c44392d4fd035698f5ab03e48a0f

chore: add comment

view details

push time in a day

created tagprisma/prisma

tag2.0.0-beta.7

Modern DB toolkit to query, migrate and model your database

created time in a day

release prisma/prisma

2.0.0-beta.7

released time in a day

startedmeilisearch/MeiliSearch

started time in a day

push eventprisma/prisma

timsuchanek

commit sha e8614c4bb7378adf09bca072a43f7d8ae20165a3

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha 13b3ad7a14c683e85a390e8823a6465e5de56ac0

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha 7eaa7a432008c76d358944b731e86411d2a156eb

chore: fix tests

view details

push time in a day

push eventprisma/prisma

Joël

commit sha bf4426e1677de7fa082a65af2f15ebf024e93099

improv(client): Return JsonValue type Related prisma/prisma-client-js#691

view details

Joël

commit sha da39471bb0ba6037174393550cf4c8b17d0d92bc

improv(client): add Date to Json return type

view details

Joël

commit sha 877328c4e3612da58914e2f737ed018247611fcf

improv(client): add Date to Json return type

view details

Joël

commit sha df67813dc061b874e6d9d86d5d082c2553d5bc82

Merge branch 'master' into pr/json-type

view details

Tim Suchanek

commit sha fae04e55f79573c4c87c79dd52d605b425935047

Merge pull request #2602 from prisma/pr/json-type

view details

push time in a day

delete branch prisma/prisma

delete branch : pr/json-type

delete time in a day

PR merged prisma/prisma

Reviewers
improv(client): Return JsonValue type

Related prisma/prisma-client-js#691

+20 -2

0 comment

2 changed files

Jolg42

pr closed time in a day

push eventprisma/prisma

timsuchanek

commit sha 9edd8e0b758a7c68220f49037657ae74512982f8

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha c596562d9cee32941a230dfaa5a92550ec7f69e5

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha d91b9a2b3b4b4ede9ac059c6115a5ffc719f1c16

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha 142defe380c72090e211d76961adb6e5a6d23b33

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha 52bef5d229a9d6fe2ea2e9dfe64d442ddbd095cf

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha 1b8da5b1b08731697c6fa9fea4a77dc9d76f80fb

chore: fix tests

view details

push time in a day

issue closedprisma/prisma

Restart engine on panic

Problem

As I understand it, if the engine panics during a request, the client will be rendered nonoperational. Since I only create one client for my application (shared via the Context in an Apollo server), it would mean that the service would need to be restarted. This is problematic for uptime since it would affect other customers that have queries that work.

Solution

It would be best if the client would restart the engine automatically. Otherwise it would be best to document that we need to create a client or call connect for each request.

Additional context

This is needed for a production deployment since errors will happen and they need to be not catastrophic.

closed time in a day

Sytten

issue commentprisma/prisma

Restart engine on panic

Thanks a lot for reporting 🙏 This issue is fixed in the latest alpha version of @prisma/cli. You can try it out with npm i -g @prisma/cli@alpha.

In case it’s not fixed for you - please let us know and we’ll reopen this issue!

Sytten

comment created time in a day

push eventprisma/prisma

timsuchanek

commit sha f27314147f7de61aa4a7dc590a777df777c0e4b0

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha 6e9950526949364ed9b2c88aa0659dec47795e98

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha 7bb54bd12395cf9753af960cd52add3060e13917

chore: fix tests

view details

push time in a day

push eventprisma/prisma

timsuchanek

commit sha 45d3cfda4c79c8a1b48a6d30d36df2cdc671a793

fix(client): queryEngineStarted

view details

timsuchanek

commit sha 3e6305165d08af788ad67ced227bc00985411553

Merge branch 'master' of github.com:prisma/prisma

view details

push time in a day

push eventprisma/prisma

Joël

commit sha 02965825df050c4b4fcb859cbc7dad0c18483a9f

fix(client): "Unable to save arrays in a Json type field" #2432 Closes #2432

view details

Joël

commit sha 77852ab2d1550186e0380c8b519f8f96bb70e996

Merge branch 'master' into pr/json-array

view details

Joël

commit sha 7cd2322aef9dfc3d76666f54bf5734422c01e3bf

tests(cli): fix snapshot for postgres

view details

Joël

commit sha 7a53af2c56cc14c21c5a78161f738595ec4206fa

chore(*): update pnpm-lock.yaml

view details

Joël

commit sha 1c743900e9185a57d76160adedbc89d6ad31e87b

Revert "tests(cli): fix snapshot for postgres" This reverts commit 7cd2322aef9dfc3d76666f54bf5734422c01e3bf.

view details

Joël

commit sha efe9aea583d6c1cd7f1ddbee2556493eccfbca50

tests(cli): fix snapshot for postgres

view details

Joël

commit sha 847c9eedd99d2239fdd1f83b32c2c5f196d4f9a4

chore(cli): add comment [skip ci]

view details

Tim Suchanek

commit sha 5ed1a13e565a352c5ca32b022245071a47616a90

Merge pull request #2596 from prisma/pr/json-array

view details

push time in a day

delete branch prisma/prisma

delete branch : pr/json-array

delete time in a day

PR merged prisma/prisma

Reviewers
fix(client): "Unable to save arrays in a Json type field" #2432

Closes #2432

+428 -20

0 comment

6 changed files

Jolg42

pr closed time in a day

issue closedprisma/prisma

Unable to save arrays in a Json type field

<!-- Thanks for helping us improve Prisma! 🙏 Please follow the sections in the template and provide as much information as possible about your problem, e.g. by setting the DEBUG="*" environment variable and enabling additional logging output in Prisma Client.

Learn more about writing proper bug reports here: https://pris.ly/d/bug-reports -->

Bug description

Trying to create something with a Json field, but when I submit an array it throws an error.

How to reproduce

  • Create a model with a Json field
  • Call create on that model, passing it an array for the field
model Service {
  id       Int  @default(autoincrement()) @id
  formula  Json
}

Error 1

const newService = await prisma.service.create({
  data: { formula: [] }
})
Value types mismatch. Have: List([]), want: Scalar(Json)` at `.Mutation.createOneService.data.ServiceCreateInput.formula

Error 2

const newService = await prisma.service.create({
  data: { formula: [{ test: 'test' }] }
})
Parse error at 10:9
Unexpected `"test"[StringValue]`
Expected `Name`, `:` or `}`

Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

Ability to save arrays of objects as Json, as in prisma 1.

Prisma information

<!-- Your Prisma schema, Prisma Client queries, ... Do not include your database credentials when sharing your Prisma schema! -->

Environment & setup

<!-- In which environment does the problem occur -->

  • OS: Mac OS
  • Database: PostgreSQL
  • Prisma version: 2.0.0-beta.5
  • Node.js version: v13.13.0

closed time in a day

jwld

startedsindresorhus/p-retry

started time in 2 days

push eventprisma/prisma

Luca Steeb

commit sha adf570f53c917464b4a69241d4dfee6e3a5ee592

feat(generator): supply informational PRISMA_GENERATOR_INVOCATION env var

view details

Tim Suchanek

commit sha 58d0568ad17daac5911b6491db24478cbca49486

Merge pull request #2594 from prisma/feat/generator-supply-env-info-var feat(generator): supply informational PRISMA_GENERATOR_INVOCATION var

view details

push time in 2 days

delete branch prisma/prisma

delete branch : feat/generator-supply-env-info-var

delete time in 2 days

issue closedprisma/prisma

Generators: provide an environment variable

It would be nice to have an informational environment variable when Prisma invokes a generator, for example PRISMA_GENERATOR_INVOCATION. This would be purely informational, but it would help to decide between accidental user runs and actual invocations by prisma.

For example, if a generator uses the command go run github.com/prisma/prisma-client-go, a user might accidentally run this command in the console, but then the command just hangs because it expects input on stdin.

This environment variable could inform the program if it was actually invoked by the prisma generator, otherwise the program can detect it and exit with an error message on how to properly invoke the generator.

closed time in 2 days

steebchen

startedIdered/typescript-expect-plugin

started time in 2 days

issue commentUKPLab/sentence-transformers

Longformer for longer context

It seems like both Reformer and Longformer are now available in the transformers library:

Longformer

https://github.com/huggingface/transformers/pull/4352 https://huggingface.co/transformers/model_doc/longformer.html

Reformer

https://github.com/huggingface/transformers/pull/3351 https://huggingface.co/transformers/model_doc/reformer.html

Looking forward to seeing them included here!

JohannesTK

comment created time in 2 days

startedtewarid/node-tcp-proxy

started time in 2 days

startednetlify/netlify-redirect-parser

started time in 2 days

push eventprisma/prisma

timsuchanek

commit sha a383fbe7b691a8c8a093acbb17525b7d92f6778e

fix(client): expose raw types Fixes #2566

view details

push time in 2 days

issue closedprisma/prisma

New raw functions not exported from @prisma/client

Bug description

I updated to beta.6 and tried to use sql and join tags. They, however, don't seem to be exported: Screen Shot 2020-05-26 at 14 23 47

Environment & setup

  • OS: MacOS
  • Database: MySQL
  • Prisma version: beta.6
  • Node.js version: 12.16

closed time in 2 days

alexvilchis

startedprisma/prisma-engines

started time in 2 days

issue openedprisma/prisma-engines

Introduce debugging mode to trigger panics in query engine

After a conversation in Slack, @dpetrick had the following proposal to add the possibility to trigger panics for debugging:

  • --debug to enable debug features below.
  • Header X-DEBUG-NON-FATAL or similar to panic in the request thread and returns a panic for the request, but the QE is still alive
  • Header X-DEBUG-FATAL or similar to let the QE die completely

Creating this so we can track this in the sprint.

created time in 2 days

startedtim-kos/node-retry

started time in 3 days

push eventprisma/prisma

Émile Fugulin

commit sha d8d46eefa6b389044b929d7f90bbe09ddc121f1b

Add missing export for Typescript raw SQL template

view details

Tim Suchanek

commit sha 0568edfb8ced3072b3c8e5d1e29d1c45ae79d0c5

Merge pull request #2578 from Sytten/patch-1 Add missing export for Typescript raw SQL template

view details

push time in 3 days

PR merged prisma/prisma

Reviewers
Add missing export for Typescript raw SQL template

Fixes https://github.com/prisma/prisma/issues/2566

+5 -0

0 comment

1 changed file

Sytten

pr closed time in 3 days

issue closedprisma/prisma

New raw functions not exported from @prisma/client

Bug description

I updated to beta.6 and tried to use sql and join tags. They, however, don't seem to be exported: Screen Shot 2020-05-26 at 14 23 47

Environment & setup

  • OS: MacOS
  • Database: MySQL
  • Prisma version: beta.6
  • Node.js version: 12.16

closed time in 3 days

alexvilchis

startedcoveooss/exponential-backoff

started time in 3 days

issue commentprisma/prisma

New raw functions not exported from @prisma/client

Thanks for reporting! We'll look into it

alexvilchis

comment created time in 3 days

Pull request review commentprisma/vscode

feat(): doc comments on hover

 function getBlockAtPosition(line: number, lines: Array<string>): Block | void {   return } +function getModelOrEnumBlock(+  blockName: string,+  lines: string[],+): Block | void {+  // get start position of model type+  const results: number[] = lines+    .map((line, index) => {+      if (+        (line.includes('model') && line.includes(blockName)) ||

Are comment lines already excluded? Otherwise this would also be true for commented lines.

carmenberndt

comment created time in 3 days

Pull request review commentprisma/vscode

feat(): doc comments on hover

 function getBlockAtPosition(line: number, lines: Array<string>): Block | void {   return } +function getModelOrEnumBlock(+  blockName: string,+  lines: string[],+): Block | void {+  // get start position of model type+  const results: number[] = lines+    .map((line, index) => {+      if (+        (line.includes('model') && line.includes(blockName)) ||+        (line.includes('enum') && line.includes(blockName))+      ) {+        return index+      }+    })+    .filter((index) => index !== undefined) as number[]

It looks like you could put the logic in map directly into filter

carmenberndt

comment created time in 3 days

push eventprisma/prisma

timsuchanek

commit sha 3d8ff84229fff4405d6358827251e53be4cbf8e9

chore: fix tests

view details

push time in 4 days

push eventprisma/prisma

timsuchanek

commit sha f6426d0ea9bfdef00a6cf732a000f0b51fcf9e43

fix(client): improve github link message

view details

push time in 4 days

push eventprisma/prisma

timsuchanek

commit sha 94e4e9c9515753c0826bf9062b8e4f7f2d6c0861

fix(client): make github link shorter Closes #2572

view details

push time in 4 days

issue closedprisma/prisma

Generated GitHub link too long

When the Prisma Client panics, we generate a link to create a GitHub issue. That link is too long: image

It seems like limiting the number of characters to 8000 will solve this problem: https://stackoverflow.com/questions/1067334/how-to-set-the-allowed-url-length-for-a-nginx-request-error-code-414-uri-too

closed time in 4 days

timsuchanek

issue openedprisma/prisma

Generated GitHub link too long

When the Prisma Client panics, we generate a link to create a GitHub issue. That link is too long: image

It seems like limiting the number of characters to 8000 will solve this problem: https://stackoverflow.com/questions/1067334/how-to-set-the-allowed-url-length-for-a-nginx-request-error-code-414-uri-too

created time in 4 days

startedjensimmons/cssremedy

started time in 4 days

startedblitz-js/blitz

started time in 4 days

startedrvagg/bl

started time in 4 days

push eventprisma/prisma

timsuchanek

commit sha 9031103715c9329d6f0973d39c748be8892b3c78

chore: fix tests

view details

push time in 4 days

startedminimaxir/big-list-of-naughty-strings

started time in 4 days

startedtannerlinsley/react-query

started time in 4 days

issue openedIBM/prisma-schema-transformer

You could turn this into a generator

Hi @ExiaSR , this is an awesome project!

You might not be aware of it, but we have a generator architecture in Prisma, which allows you to hook into the generate step.

It might be interesting for you to do the schema transformation on every generate.

Here is an example: https://github.com/timsuchanek/minimal-generator

It could, of course, be, that you want to run prisma-schema-transformer as a one-of thing, then it doesn't make sense. But I just wanted to make you aware, that this option exists.

created time in 4 days

push eventprisma/prisma

timsuchanek

commit sha 89a2bc70905b26e81c1819ba65b8438abf48d013

fix(sdk): simplify generator paths

view details

timsuchanek

commit sha 0ef6a85ddcc6570dea984de9d045c5c3cf1160a2

fix(sdk): add tests for custom generators Closes #1973. Closes #1101. Closes #934

view details

push time in 4 days

issue closedprisma/prisma

Prisma should check for generator binaries in $PATH

When writing custom generators, you can specify an absolute or relative binary path for the "provider" value. However, the path resolution does not respect binaries in $PATH, which would make things easier for custom generators, because they can depend on globally installed binaries.

The following generator configuration does not work:

generator photon {
	provider = "photongo"
	output = "./photon/photon_gen.go"
	package = "photon"
}

image (1)

closed time in 4 days

steebchen

issue closedprisma/prisma

A generator provider should accept arbitrary commands

Generators can be any executable file, but currently this is limited to one single command, which means you can't provide any arguments to a generator:

generator photon {
	provider = "/Users/prisma/go/bin/photongo"
	output = "./photon/photon_gen.go"
	package = "photon"
}

Providing arguments doesn't work:

generator photon {
	provider = "/Users/prisma/go/bin/photongo --option=on"
	output = "./photon/photon_gen.go"
	package = "photon"
}

Instead, the provider should accept full commands with arguments.

For example, provider could accept specifying full commands:

generator photon {
	provider = "go run github.com/prisma/photongo/generator"
	output = "./photon/photon_gen.go"
	package = "photon"
}

An alternative would be an array to specify the command with arguments:

generator photon {
	provider = ["go", "run", "github.com/prisma/photongo/generator"]
	output = "./photon/photon_gen.go"
	package = "photon"
}

closed time in 4 days

steebchen

issue closedprisma/prisma

`generate` does not work in folders with spaces

C:\Users\Jan\Downloads\prisma chinook master cli-demo>npx prisma2 generate
'C:\Users\Jan\Downloads\prisma' is not recognized as an internal or external command,
operable program or batch file.
Error: Cannot call write after a stream was destroyed

with DEBUG=* set:

C:\Users\Jan\Downloads\prisma chinook master cli-demo>set DEBUG=*

C:\Users\Jan\Downloads\prisma chinook master cli-demo>npx prisma2 generate
  prisma .env loaded from ./prisma/.env +0ms
  getos { platform: 'win32', libssl: undefined } +0ms
  download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe. Result:  {
  command: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\query-engine-windows.exe --version',
  exitCode: 0,
  stdout: 'prisma d35b3d764e66598164f3b8ce821d452b09d4a613',
  stderr: '',
  all: undefined,
  failed: false,
  timedOut: false,
  isCanceled: false,
  killed: false
} +0ms
  download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe. Result:  prisma d35b3d764e66598164f3b8ce821d452b09d4a613 +3ms
  download { works: true } +0ms
  download { needsToBeDownloaded: false } +1ms
  download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\migration-engine-windows.exe. Result:  {
  command: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\migration-engine-windows.exe --version',
  exitCode: 0,
  stdout: 'migration-engine-cli d35b3d764e66598164f3b8ce821d452b09d4a613',
  stderr: '',
  all: undefined,
  failed: false,
  timedOut: false,
  isCanceled: false,
  killed: false
} +8ms
  download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\migration-engine-windows.exe. Result:  migration-engine-cli d35b3d764e66598164f3b8ce821d452b09d4a613 +15ms
  download { works: true } +2ms
  download { needsToBeDownloaded: false } +0ms
  download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\introspection-engine-windows.exe. Result:  {
  command: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\introspection-engine-windows.exe --version',
  exitCode: 0,
  stdout: 'introspection-core d35b3d764e66598164f3b8ce821d452b09d4a613',
  stderr: '',
  all: undefined,
  failed: false,
  timedOut: false,
  isCanceled: false,
  killed: false
} +2ms
  download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\introspection-engine-windows.exe. Result:  introspection-core d35b3d764e66598164f3b8ce821d452b09d4a613 +2ms
  download { works: true } +0ms
  download { needsToBeDownloaded: false } +0ms
  getos { platform: 'win32', libssl: undefined } +128ms
  getos { platform: 'win32', libssl: undefined } +19ms
  download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe. Result:  {
  command: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\query-engine-windows.exe --version',
  exitCode: 0,
  stdout: 'prisma d35b3d764e66598164f3b8ce821d452b09d4a613',
  stderr: '',
  all: undefined,
  failed: false,
  timedOut: false,
  isCanceled: false,
  killed: false
} +75ms
  download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe. Result:  prisma d35b3d764e66598164f3b8ce821d452b09d4a613 +5ms
  download { works: true } +1ms
  download { needsToBeDownloaded: false } +0ms
  getGenerators {
  getGenerators   binaryPathsWithEngineType: {
  getGenerators     'query-engine': {
  getGenerators       windows: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\query-engine-windows.exe'
  getGenerators     }
  getGenerators   }
  getGenerators } +0ms
  engineCommands getDMMF, override prismaPath = C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe +0ms
  engineCommands getConfig, override prismaPath = C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe +97ms
  getos { platform: 'win32', libssl: undefined } +242ms
{
  prismaClientDir: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\client'
}
  getGenerators {
  getGenerators   outputPath: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\client',
  getGenerators   generatorPath: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\client\\generator-build\\index.js'
  getGenerators } +218ms
'C:\Users\Jan\Downloads\prisma' is not recognized as an internal or external command,
operable program or batch file.
  Generator:C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\client\generator-build\index.js Sending "getManifest" rpc to generator +0ms
Error: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:413:19)
    at writeOrBuffer (_stream_writable.js:401:5)
    at Socket.Writable.write (_stream_writable.js:301:11)
    at GeneratorProcess.sendMessage (C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:549432)
    at C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:549706
    at new Promise (<anonymous>)
    at GeneratorProcess.getManifest (C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:549558)
    at Generator.<anonymous> (C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:745695)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:744975)

After renaming the folder to not contain spaces, everything works:

C:\Users\Jan\Downloads\prismachinookmastercli-demo>npx prisma2 generate
✔ Generated Prisma Client to .\node_modules\@prisma\client in 248ms

You can now start using Prisma Client in your code:

`
import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')

const prisma = new PrismaClient()
`

Explore the full API: http://pris.ly/d/client


C:\Users\Jan\Downloads\prismachinookmastercli-demo>

version:

C:\Users\Jan\Downloads\prisma chinook master cli-demo>npx prisma2 --version
@prisma/cli          : 2.0.0-alpha.978
Current platform     : windows
Query Engine         : prisma d35b3d764e66598164f3b8ce821d452b09d4a613 (at C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe)
Migration Engine     : migration-engine-cli d35b3d764e66598164f3b8ce821d452b09d4a613 (at C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\migration-engine-windows.exe)
Introspection Engine : introspection-core d35b3d764e66598164f3b8ce821d452b09d4a613 (at C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\introspection-engine-windows.exe)

closed time in 4 days

janpio

push eventtimsuchanek/minimal-generator

Tim Suchanek

commit sha 05fd54082ec403dcfa954da1a27fad28ed282f78

Create README.md

view details

push time in 4 days

create barnchtimsuchanek/minimal-generator

branch : master

created branch time in 4 days

created repositorytimsuchanek/minimal-generator

A minimal Prisma generator package

created time in 4 days

startedIBM/prisma-schema-transformer

started time in 4 days

issue openedprisma/vscode

Not possible to use backslash in string field

If I want to provide the provider field in a generator with a backslash character, I get the following error:

generator g {
  provider = "../folder\ with\ space/my\ generator.js"
}

image

created time in 4 days

push eventprisma/prisma

timsuchanek

commit sha ebe1b08ae192006281cfe7ad4f73fe35a31004d7

fix(client): improve raw jsdoc

view details

push time in 4 days

issue openedprisma/prisma

Improve error handling for incorrect raw parameters

Since Beta 6, we allow parameters in .raw like so:

const result = await prisma.raw(
  'SELECT * FROM User WHERE id = $1 OR email = $2;',
  1,
  'e@ma.il'
)

While we chose an API, where each parameter is a separate function arg for .raw, the API could also have looked like this:

const result = await prisma.raw(
  'SELECT * FROM User WHERE id = $1 OR email = $2;',
  [1, 'e@ma.il']
)

However, if I provide that, I don't get a lot of help but a PANIC: https://github.com/prisma/prisma-client-js/issues/705

created time in 5 days

issue openedprisma/prisma-client-js

PANIC: not implemented: Arrays are not supported for sqlite.

Hi Prisma Team! My Prisma Client just crashed. This is the report:

Versions

Name Version
Node v12.16.3
OS darwin
Prisma 2.0.0-alpha.1246

Logs

  prisma-client Client Version 2.0.0-alpha.1246  +0ms
  prisma-client Engine Version b6745bd0f67138b4b68e00f607c99483016924c8  +0ms
  prisma-client {
  prisma-client   engineConfig: {
  prisma-client     cwd: '/Users/tim/code/repros/raw-test/prisma',
  prisma-client     debug: false,
  prisma-client     datamodelPath: '/Users/tim/code/repros/raw-test/node_modules/.prisma/client/schema.prisma',
  prisma-client     prismaPath: undefined,
  prisma-client     generator: {
  prisma-client       name: 'client',
  prisma-client       provider: 'prisma-client-js',
  prisma-client       output: '/Users/tim/code/repros/raw-test/node_modules/@prisma/client',
  prisma-client       binaryTargets: [],
  prisma-client       config: {}
  prisma-client     },
  prisma-client     showColors: false,
  prisma-client     logLevel: undefined,
  prisma-client     logQueries: undefined,
  prisma-client     flags: [],
  prisma-client     clientVersion: '2.0.0-alpha.1246'
  prisma-client   }
  prisma-client }  +0ms
  prisma-client Prisma Client call:  +3ms
  prisma-client prisma.raw(SELECT * FROM User WHERE id = $1, [[1]])  +0ms
  prisma-client Generated request:  +2ms
  prisma-client mutation {
  prisma-client   executeRaw(
  prisma-client     query: "SELECT * FROM User WHERE id = $1"
  prisma-client     parameters: "[[1]]"
  prisma-client   )
  prisma-client }
  prisma-client   +0ms
  plusX Execution permissions of /Users/tim/code/repros/raw-test/node_modules/.prisma/client/query-engine-darwin are fine  +0ms

created time in 5 days

issue openedprisma/prisma

Document new raw features

In Beta 6 we introduced 2 new raw features. We should document them: https://github.com/prisma/prisma/releases/tag/2.0.0-beta.6

created time in 5 days

created tagprisma/prisma

tag2.0.0-beta.6

Modern DB toolkit to query, migrate and model your database

created time in 5 days

release prisma/prisma

2.0.0-beta.6

released time in 5 days

startedbradtraversy/design-resources-for-developers

started time in 5 days

issue closedprisma/prisma-client-js

Prisma Client Beta 4 broken with Netlify

Due to this issue https://github.com/netlify/zip-it-and-ship-it/issues/101 Prisma Client Beta 4 is temporarily broken with Netlify. This will be resolved within the next days. If you use Netlify functions, please stay on Beta 3 until this issue is closed

closed time in 5 days

timsuchanek

issue commentprisma/prisma-client-js

Prisma Client Beta 4 broken with Netlify

This is fixed in the latest version.

timsuchanek

comment created time in 5 days

push eventprisma/prisma

timsuchanek

commit sha 97bed5b0054a95e370c1895b671feb7d97f20415

chore: clean up & fix tests

view details

push time in 5 days

push eventprisma/prisma

timsuchanek

commit sha 1ceab59025fb96e1e1cc35d4bb132e20fc11a200

fix(client): fix error handling

view details

push time in 5 days

push eventprisma/prisma

timsuchanek

commit sha 5b8bd8ae616ce4a400900f4de7ce24cd420807bf

fix(client): improve raw jsdoc

view details

push time in 5 days

issue closedprisma/prisma-client-js

Basic reporting capability for runtime errors in Client

Problem

When controlled errors occur in Prisma, our software control these and bubble up these to developers, so they can address them, i.e. via a helpful error message. Our software will try to handle all known errors gracefully but inevitably, there will be unexpected errors or issues we haven't yet thought of or encountered.

When these uncontrolled errors happen, our software can't offer much help to the developer. Often, these issues will cause crashes which may require restarting some or all of the Prisma runtime. These errors can be frustrating and/or blocking for users. In order to improve our software, we need to be aware of errors and have enough context to address them.

There is a system that enables developers to submit errors when using Prisma CLI or Prisma Studio, but reporting issues that occur in Prisma Client has significant friction.

Solution

  • Improve our documentation on how to report issues (guide in docs)
  • Implement an in-memory cache to store the most recent log output (2-3h eng. work)
  • Improve the debug output for increased discoverability (2-3h eng. work)
    • better error message (see #610)
    • easier to locate the errors
    • easier to understand which excerpt of the logfile needs to be submitted
  • (Optional) Include a clickable URL pointing to GitHub interpolating the content in the URL, so that the issue form is auto-filled with the information needed (library for GH issues, libraries for making links clickable in CLI )

Example of potential error output:

##################################
##################################
# Start Prisma Error Report
prisma-client {
  prisma-client   engineConfig: {
  prisma-client     cwd: '/Users/tim/code/prisma-client-performance/prisma',
  prisma-client     debug: false,
  prisma-client     datamodelPath: '/Users/tim/code/prisma-client-performance/@prisma/client/schema.prisma',
  prisma-client     prismaPath: undefined,
  prisma-client     datasources: [ [Object] ],
  prisma-client     generator: {
  prisma-client       name: 'client',
  prisma-client       provider: 'prisma-client-js',
  prisma-client       output: null,
  prisma-client       binaryTargets: [],
  prisma-client       config: {}
  prisma-client     },
  prisma-client     showColors: false,
  prisma-client     logLevel: undefined,
  prisma-client     logQueries: undefined,
  prisma-client     env: {},
  prisma-client     flags: []
  prisma-client   }
  prisma-client } +0ms
  printStack callsite undefined +0ms
  printStack {
  printStack   introText: '\u001b[31mInvali2d \u001b[1m`prisma.user.findMany()`\u001b[22m invocation:\u001b[39m',
  printStack   prevLines: '\n',
  printStack   afterLines: '',
  printStack   lastErrorHeight: 20,
  printStack   indentValue: 0,
  printStack   stack: '\n\u001b[31mInvali2d \u001b[1m`prisma.user.findMany()`\u001b[22m invocation:\u001b[39m\n\n'
  printStack } +1ms
  printStack callsite Error:
    at Object.prismaClient [as User] (/Users/tim/code/prisma/src/packages/client/src/runtime/getPrismaClient.ts:377:28)
    at Object.acc.<computed> [as findMany] (/Users/tim/code/prisma/src/packages/client/src/runtime/getPrismaClient.ts:525:39)
    at /Users/tim/code/prisma-client-performance/main.ts:7:36
    at step (/Users/tim/code/prisma-client-performance/main.ts:33:23)
    at Object.next (/Users/tim/code/prisma-client-performance/main.ts:14:53)
    at /Users/tim/code/prisma-client-performance/main.ts:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/tim/code/prisma-client-performance/main.ts:4:12)
    at main (/Users/tim/code/prisma-client-performance/main.ts:41:12)
    at Object.<anonymous> (/Users/tim/code/prisma-client-performance/main.ts:32:1) +1ms
  printStack {
  printStack   introText: '\u001b[31mInvali2d \u001b[1m`client.user.findMany()`\u001b[22m invocation in\u001b[39m\n' +
  printStack     '\u001b[31m\u001b[4m/Users/tim/code/prisma-client-performance/main.ts:7:36\u001b[24m\u001b[39m',
  printStack   prevLines: '\n' +
  printStack     '\u001b[2m  \u001b[90m 3 \u001b[39m\u001b[36masync\u001b[39m \u001b[36mfunction\u001b[39m \u001b[36mmain\u001b[39m\u001b[38;2;107;139;140m(\u001b[39m\u001b[38;2;107;139;140m)\u001b[39m \u001b[38;2;107;139;140m{\u001b[39m\u001b[22m\n' +
  printStack     '\u001b[2m  \u001b[90m 4 \u001b[39m  \u001b[36mdebugger\u001b[39m\u001b[22m\n' +
  printStack     '\u001b[2m  \u001b[90m 5 \u001b[39m  \u001b[36mconst\u001b[39m client = \u001b[36mnew\u001b[39m PrismaClient\u001b[38;2;107;139;140m(\u001b[39m\u001b[38;2;107;139;140m)\u001b[39m\u001b[22m\n' +
  printStack     '\u001b[2m  \u001b[90m 6 \u001b[39m\u001b[22m\n' +
  printStack     '\u001b[31m\u001b[1m→\u001b[22m\u001b[39m \u001b[90m 7 \u001b[39m  \u001b[36mconst\u001b[39m result = \u001b[36mawait\u001b[39m client\u001b[38;2;107;139;140m.\u001b[39muser\u001b[38;2;107;139;140m.\u001b[39m\u001b[36mfindMany\u001b[39m\u001b[38;2;107;139;140m(\u001b[39m\n' +
  printStack     '\n',
  printStack   afterLines: ')',
  printStack   lastErrorHeight: 20,
  printStack   indentValue: 5,
  printStack   stack: '\n' +
  printStack     '\u001b[31mInvali2d \u001b[1m`client.user.findMany()`\u001b[22m invocation in\u001b[39m\n' +
  printStack     '\u001b[31m\u001b[4m/Users/tim/code/prisma-client-performance/main.ts:7:36\u001b[24m\u001b[39m\n' +
  printStack     '\n' +
  printStack     '\u001b[2m  \u001b[90m 3 \u001b[39m\u001b[36masync\u001b[39m \u001b[36mfunction\u001b[39m \u001b[36mmain\u001b[39m\u001b[38;2;107;139;140m(\u001b[39m\u001b[38;2;107;139;140m)\u001b[39m \u001b[38;2;107;139;140m{\u001b[39m\u001b[22m\n' +
  printStack     '\u001b[2m  \u001b[90m 4 \u001b[39m  \u001b[36mdebugger\u001b[39m\u001b[22m\n' +
  printStack     '\u001b[2m  \u001b[90m 5 \u001b[39m  \u001b[36mconst\u001b[39m client = \u001b[36mnew\u001b[39m PrismaClient\u001b[38;2;107;139;140m(\u001b[39m\u001b[38;2;107;139;140m)\u001b[39m\u001b[22m\n' +
  printStack     '\u001b[2m  \u001b[90m 6 \u001b[39m\u001b[22m\n' +
  printStack     '\u001b[31m\u001b[1m→\u001b[22m\u001b[39m \u001b[90m 7 \u001b[39m  \u001b[36mconst\u001b[39m result = \u001b[36mawait\u001b[39m client\u001b[38;2;107;139;140m.\u001b[39muser\u001b[38;2;107;139;140m.\u001b[39m\u001b[36mfindMany\u001b[39m\u001b[38;2;107;139;140m(\u001b[39m\n' +
  printStack     '\n'
  printStack } +12ms
# End Prisma Error Report
##################################
# To report this error, click [here](http://github.com).
# or create a new GitHub issue according to the template and copy and paste this excerpt.
##################################
##################################

Alternatives

Dump errors in the filesystem, piggyback on existing CLI error reporting

See #1659

Status Quo

Developers can manually report unexpected errors happening Prisma Client today by doing so manually. The process has significant friction:

  1. Developers will create a GitHub issue manually
  2. Often the Prisma team will ask for specific debug logs.
  3. Developers need to start the application again with a specific logging level (debug: *) and wait for the errors to happen again
  4. After that they need to submit a log file or an excerpt of it (usually add it to the GitHub issue).

Examples of GitHub issues for Prisma Client with debug output: #642, #605.

Additional context

Internal: https://www.notion.so/prismaio/Reporting-Errors-in-Query-Engine-2a0f2a24f2644b4c8b056bb8002b32da

Related issues: https://github.com/prisma/prisma-client-js/issues/610

closed time in 5 days

albertoperdomo

issue commentprisma/prisma-client-js

Basic reporting capability for runtime errors in Client

This is implemented in the latest alpha.

albertoperdomo

comment created time in 5 days

issue commentprisma/prisma

Output notice about Prisma1->Prisma2 upgrade documentation and tool

Define where the text will be shown to users We can show this at the end of our introspection command.

janpio

comment created time in 5 days

push eventprisma/prisma

timsuchanek

commit sha a8180a131946f03f4f27512275263035dfe716ba

chore: fix tests

view details

push time in 5 days

startedmathiasbynens/he

started time in 5 days

pull request commentprisma/prisma

feature(raw): Improve prisma.raw by re-exporting all of sql-template-tag

Thanks for the PR! I did a few changes about where to import stuff from, it's now building in our CI and will be available on alpha in 10 min.

zachasme

comment created time in 5 days

PR merged prisma/prisma

Reviewers
feature(raw): Improve prisma.raw by re-exporting all of sql-template-tag

When sending raw queries using prisma.raw it would be nice to have access to all of sql-template-tag.

We had a specific query where we wanted to write the SQL by hand. But the current API is quite limited. Nesting and joining in particular from sql-template-tag are very useful when composing complex queries.

This PR simply re-exports the same API as a direct import, adds a case for prisma.sql input to prisma.raw, and adds a simple test as well.

+65 -2

5 comments

3 changed files

zachasme

pr closed time in 5 days

push eventprisma/prisma

Zacharias Knudsen

commit sha c49b83b24b22188eee57de790e5fe34a4ea77052

Improve Prisma.raw

view details

Zacharias Knudsen

commit sha 769b63079e2b2340b7ac76db3df7c54b5b42206c

Export sql-template-tag directly from prisma, add typings to TSClient.ts

view details

Zacharias Knudsen

commit sha 13c44384fde1b87b6453216a89f3f5a77eac5d53

Add support for .raw(string with , values)

view details

timsuchanek

commit sha 9e7dff9b3c227ee23c51dfb701ccd3f3db4417f0

Merge branch 'master' into HEAD

view details

push time in 5 days

push eventprisma/prisma

timsuchanek

commit sha cce5f84b7100940b550dc107829e6efa88bc0383

chore(client): disable gzip

view details

push time in 5 days

push eventprisma/prisma

timsuchanek

commit sha ab948c43075d626390b8b34b4927a1c83be485dd

fix(client): cleanup http client

view details

push time in 5 days

push eventprisma/prisma

timsuchanek

commit sha 34990d1a230a07c850f81cd4eb84cde880ea618f

chore(client): add buffer concat option

view details

push time in 5 days

push eventprisma/e2e-tests

timsuchanek

commit sha 376e58eb86cfa30484cbeb7951f82b38b69c3342

fix(netlify-zisi): bump zisi

view details

push time in 6 days

push eventprisma/prisma

timsuchanek

commit sha 6f5ce9892fc4f74468dba89664ff07e3d30b71b5

fix(client): back to http1

view details

push time in 6 days

push eventprisma/prisma

thankwsx

commit sha bd0bafa9e11dbe8a84b6fecd32f28d307639f752

fix: npx when execute `npx prisma init` command behind a proxy

view details

Tim Suchanek

commit sha cf742b41562d35477c0d0b2b52943218c7d14b4e

Merge pull request #2540 from thankwsx/master

view details

push time in 6 days

PR merged prisma/prisma

Reviewers
fix: npx prisma init pending error team/typescript

when execute npx prisma init command behind a proxy, sha256 check did not use a proxyAgent setting.

+6 -2

1 comment

1 changed file

thankwsx

pr closed time in 6 days

more