Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using createMany with SQLite in tests results in a panic with JSON protocol #4612

Open
aqrln opened this issue Dec 23, 2023 · 4 comments
Open

Comments

@aqrln
Copy link
Member

aqrln commented Dec 23, 2023

Trying to use createMany with SQLite in tests results in the following panic in tests when using JSON protocol:

thread '...' panicked at query-engine/connector-test-kit-rs/query-tests-setup/src/runner/json_adapter/request.rs:26:89:
called `Option::unwrap()` on a `None` value

Expected behaviour: a proper error instead of crashing.

For example:

  • With GraphQL protocol, whether in QE tests or end-to-end with client, it triggers a user-facing error with code 2009 and message Field 'createManyUser' not found in enclosing type 'Mutation'
  • With JSON protocol end to end it triggers an error with message Operation 'createMany' for model 'User' does not match any query.

This seems to be an issue in GraphQL to JSON translation.

Example: https://github.com/prisma/prisma-engines/actions/runs/7304950071/job/19907898417?pr=4601

@aqrln aqrln added the topic: driver adapters formerly phase 1 label Dec 23, 2023
@aqrln aqrln changed the title [DA] Using createMany with SQLite adapter results in a panic [DA] Using createMany with SQLite adapter in tests results in a panic Dec 23, 2023
@jkomyno
Copy link
Contributor

jkomyno commented Jan 5, 2024

Currently expected, as Prisma doesn't support createMany at all for SQLite. I believe we already have another issue for this

@SevInf
Copy link
Contributor

SevInf commented Jan 8, 2024

Panic is never expected, this issue is about having a proper error instead.

@aqrln aqrln changed the title [DA] Using createMany with SQLite adapter in tests results in a panic Using createMany with SQLite in tests results in a panic with JSON protocol Jan 8, 2024
@aqrln aqrln removed the topic: driver adapters formerly phase 1 label Jan 8, 2024
@aqrln
Copy link
Member Author

aqrln commented Jan 8, 2024

This is actually totally unrelated to driver adapters, I'm not sure how I got this impression, sorry for confusion! This is an issue in GraphQL to JSON translation. I updated the issue description.

@aqrln
Copy link
Member Author

aqrln commented Jan 8, 2024

I moved the issue to the tech debt board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants