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

Cannot delete project that contains tests #29

Open
pashidlos opened this issue Apr 10, 2020 · 1 comment
Open

Cannot delete project that contains tests #29

pashidlos opened this issue Apr 10, 2020 · 1 comment

Comments

@pashidlos
Copy link
Contributor

Cannot reproduce for empty project

Steps

  • Create project
  • add at least one test
  • try removing it

Error

core.js:9110 ERROR Error: Uncaught (in promise): Error: GraphQL error: 
Invalid `prisma.project.delete()` invocation in
/api/webpack:/apps/api/src/app/project/project.service.ts:20:45

Error occurred during query execution:
InterpretationError("Error for binding \'3\': RelationViolation(RelationViolation { relation_name: \"ProjectToTest\", model_a_name: \"Project\", model_b_name: \"Test\" })")
Error: GraphQL error: 
Invalid `prisma.project.delete()` invocation in
/api/webpack:/apps/api/src/app/project/project.service.ts:20:45

Error occurred during query execution:
InterpretationError("Error for binding \'3\': RelationViolation(RelationViolation { relation_name: \"ProjectToTest\", model_a_name: \"Project\", model_b_name: \"Test\" })")
    at new ApolloError (bundle.esm.js:63)
    at Object.next (bundle.esm.js:1004)
    at notifySubscription (Observable.js:130)
    at onNotify (Observable.js:165)
    at SubscriptionObserver.next (Observable.js:219)
    at bundle.esm.js:866
    at Set.forEach (<anonymous>)
    at Object.next (bundle.esm.js:866)
    at notifySubscription (Observable.js:130)
    at onNotify (Observable.js:165)
    at SubscriptionObserver.next (Observable.js:219)
    at Object.next (bundle.esm.js:29)
    at notifySubscription (Observable.js:130)
    at onNotify (Observable.js:165)
    at SubscriptionObserver.next (Observable.js:219)
    at resolvePromise (zone-evergreen.js:797) [angular]
    at polyfills-es2015.js:3556:17 [angular]
    at SafeSubscriber._error (Observable.js:91) [angular]
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:185) [angular]
    at SafeSubscriber.error (Subscriber.js:137) [angular]
    at Subscriber._error (Subscriber.js:75) [angular]
    at Subscriber.error (Subscriber.js:55) [angular]
    at vendor-es2015.js:167261:28 [angular]
    at Object.onInvoke (core.js:34201) [angular]
    at polyfills-es2015.js:3704:36 [angular]
@MitkoTschimev
Copy link
Contributor

prisma 2 has not supported cascade deletions ... maybe they support it now. We need to check this because this will make live so much easier :)

Otherwise we need to do this on our own and cascade for our self

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

2 participants