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

Nested connect: Cannot read properties of null #1149

Open
guydunton opened this issue Oct 31, 2024 · 0 comments
Open

Nested connect: Cannot read properties of null #1149

guydunton opened this issue Oct 31, 2024 · 0 comments

Comments

@guydunton
Copy link
Contributor

I think I've found an issue with nested connects in Prismock. If I run a nested connect through 2 other types then I get an undefined error. e.g.

prisma.address.update({
    where: {
      id: address.id,
    },
    data: {
      User: {
        update: {
          where: {
            id: userId,
          },
          data: {
            groups: {
              connect: [{ id: group1.id }],
            },
          },
        },
      },
    },
  });

// TypeError: Cannot read properties of null (reading 'undefined')

I've produced a minimal example: https://github.com/guydunton/prismock-nested-connects-issue

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

1 participant