Remove merge artifact.
@@ -7,104 +7,6 @@ import util._
class NestedSetMutationInsideUpdateSpec extends FlatSpec with Matchers with ApiSpecBase with SchemaBaseV11 {
override def runOnlyForCapabilities: Set[ConnectorCapability] = Set(JoinRelationLinksCapability)
-<<<<<<< HEAD
- "a PM to C1! relation with the child already in a relation" should "be setable through a nested mutation by unique" in {
- schemaPMToC1req.test { dataModel =>
- val project = SchemaDsl.fromStringV11() { dataModel }
- database.setup(project)
-
- val otherParentWithChildId = server
- .query(
- s"""
- |mutation {
- | createParent(data:{
- | p: "otherParent"
- | childrenOpt: {create: {c: "otherChild"}}
- | }){
- | id
- | }
- |}
- """.stripMargin,
- project
- )
- .pathAsString("data.createParent.id")
-
- server.query(
- """mutation {
- | createParent(data: {
- | p: "p1"
- | childrenOpt: {
- | create: {c: "c1"}
- | }
- | }){
- | childrenOpt{
- | c
- | }
- | }
- |}""",
- project
- )
-
- server.query(
- """mutation {
- | createParent(data: {
- | p: "p2"
- | childrenOpt: {
- | create: {c: "c2"}
- | }
- | }){
- | childrenOpt{
- | c
- | }
- | }
- |}""",
- project
- )
-
- //ifConnectorIsActive { dataResolver(project).countByTable("_ChildToParent").await should be(3) }
-
- val res = server.query(
- s"""
- |mutation {
- | updateParent(
- | where: {p: "p2"}
- | data:{
- | childrenOpt: {set: {c: "c1"}}
- | }){
- | childrenOpt(first:10) {
- | c
- | }
- | }
- |}
- """,
- project
- )
-
- res.toString should be("""{"data":{"updateParent":{"childrenOpt":[{"c":"c1"}]}}}""")
-
- //ifConnectorIsActive { dataResolver(project).countByTable("_ChildToParent").await should be(2) }
-
- // verify preexisting data
-
- server
- .query(
- s"""
- |{
- | parent(where: {id: "${otherParentWithChildId}"}){
- | childrenOpt {
- | c
- | }
- | }
- |}
- """.stripMargin,
- project
- )
- .pathAsString("data.parent.childrenOpt.[0].c") should be("otherChild")
- }
- }
-
-=======
->>>>>>> migration-engine/reenable-not-null-constraints-for-required-relations
"a PM to C1 relation with the child already in a relation" should "be setable through a nested mutation by unique" in {
schemaPMToC1opt.test { dataModel =>
val project = SchemaDsl.fromStringV11() { dataModel }
