question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for multiple connects or creations in connectOrCreate

See original GitHub issue

Problem

Currently the connectOrCreate field, only gives you the ability to connect or create one record.

Suggested solution

For the connectOrCreate fields: where and create, to be a prisma Enuremable, like the normal create and connect fields

Alternatives

Currently i’m just checking before the mutation, if there is the neccessary records for that entity, set the connect array, otherwise an empty array, and the opposite for create

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
justinhandleycommented, Aug 24, 2021

I’m sorry, this is unclear to me. It isn’t clearly documented that connectOrCreate can accept multiple sets of data - the examples only show one. Is it possible and underdocumented, or not possible at this point?

1reaction
janpiocommented, Jun 29, 2021

Please open a bug issue if that is the case @ridhwaans - what is documented should work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use connectOrCreate with many to many in prisma
Incorrect syntax for connectOrCreate. You're passing separate arrays to the where and create fields. Instead, when you want to connect/create ...
Read more >
Relation queries (Concepts) - Prisma
Create a single record and multiple related records ; Creates all records in one query, ✘, ✓ ; Supports nesting additional relations, ✓,...
Read more >
CA IdentityMinder Connectors Guide
At http://ca.com/support, you can access the following ... You can also set connection pool details, such as how many connections can be active...
Read more >
SailPoint Direct Connectors Administration and Configuration ...
content, including underlying HTML code, designs, and graphics used and/or ... Multiple group support in Tivoli, SunOne, and OpenLDAP LDAP Connectors.
Read more >
Speckle Connectors
Exchange and extract geometry using our AutoCAD Connector. Supports versions 2021 and 2022. ETABS. Connect to Speckle with our (Alpha) Connector for ETABS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found