For my tests, to make a fake resolver I had a call...
# apollo-kotlin
s
For my tests, to make a fake resolver I had a call to
private val delegate = DefaultFakeResolver(__Schema.all)
, but after upgrading to 4.0 I don't seem to get the
all
generated anymore. Is it some extra configuration now perhaps? ๐Ÿ‘€
b
hmm if you have
generateDataBuilders.set(true)
this should be generated
s
I do have that as true. Did you see the same in your apollo-4 testing branch btw? Because that's what I was looking at right now and I am experiencing this.
b
no I didn't have any compilation error, I could run the app!
s
Right, this was only in the test sources, the app runs fine for me too. This delegate only exists for some tests we got. Perhaps this plays a role here too hmm
b
ohhhh tests ๐Ÿ˜… Didn't think of running them
s
Hehe yeah dw about it. Is there a specific task I should be running which is supposed to generate this __Schema class? I assume it's just
generateApolloSources
right? I am trying to tweak things in the gradle config and run it to see if anything changes
b
I think it's just the wrong import: it should be
import octopus.schema.__Schema
ah yes that's a change in 4.x
(๐Ÿ‘€ maybe the migration helper could update this automatically)
๐Ÿ’ฏ 1
s
Ahh there it is, thanks so much! Yes, that would be great for the migration helper to do this! If there are no concerns that old references to it were actually intentionally pointing to the other __Schema class?
The import which worked for me ended up being
Copy code
import octopus.schema.__Schema
Where
octopus
is the service name. The docs show:
Copy code
// Replace
import com.example.type.__Schema

// With
import data.builders.schema.__Schema
Is the
data.builders
the placeholder there for whatever the service name would be? If I didn't have the IDE auto-importing this for me I wouldn't have realized this myself I think.
b
Hmm I think it should be
com.example
in the docs
๐Ÿ‘ 1
Thanks for reporting!
๐ŸŒŸ 1
If there are no concerns that old references to it were actually intentionally pointing to the other __Schema class?
That's a good question! ๐Ÿ‘€