Stylianos Gakis
08/15/2023, 11:27 AMHomeQuery.Data(GiraffeFakeResolver) {
  contracts = listOf(
    buildContract {
      status = buildPendingStatus { }
      insuranceProviders = listOf(
        buildInsuranceProvider {},
      )
    },
  )
}
instead of
HomeQuery.Data(GiraffeFakeResolver) {
  insuranceProviders = listOf(
    buildInsuranceProvider {},
  )
  contracts = listOf(
    buildContract {
      status = buildPendingStatus { }
    },
  )
}
which would be the right thing to do, as insuranceProviders is part of the top-level object, and not inside the buildContract lambda. Resulting in me getting a bit confused as I was reading back on my test and what it actually does.
Part of me feels like what I should be doing instead is do this. before everything I do in these data builders, since that way I would be disallowed from accessing the parameter from the scope above of the one which I was in at that moment. Do you think this is our best bet when working with this?
I’ve seen that @DslMarker exists, I’ve never really used it myself, but could it be the solution for this issue here? Or am I misunderstanding what it does?agrosner
08/15/2023, 12:22 PMagrosner
08/15/2023, 12:23 PMStylianos Gakis
08/15/2023, 12:25 PMthis currently, so you’ll still be able to call both as far as I understand.Stylianos Gakis
08/15/2023, 12:29 PMDefinitely have seen similar things where we forget to set fields instead of assigning themWhat do you mean by this? Do you mean like doing
buildContract {
  /* status = */ buildPendingStatus { }
},
So that the result of `buildFoo just is assigned to nothing?  Like something that potentially this would fix?agrosner
08/15/2023, 12:41 PMmbonnin
08/15/2023, 5:09 PMmbonnin
08/15/2023, 5:10 PM@DslMarker would help for data buildersStylianos Gakis
08/15/2023, 5:11 PMmbonnin
08/15/2023, 5:11 PMStylianos Gakis
08/15/2023, 5:17 PM