MarioR
MarioR

Reputation: 101

Access generated Apollo classes from sub package - Kotlin

I have some problem in my GraphQL/Apollo use with Kotlin/Android. I can't access Apollo generated query class from a subpackage.

e.g : I have a generated Apollo class "GetUserAccountQuery" in packagename.networklibrary , I can access it from other classes in packagename.networklibrary, but if I try to access it from packagename.networklibrary.gqlCalls, the "Builder" function in GetUserAccountQuery.Builder() is red highlighted and the error message is : " Cannot access '': it is public/package/ in 'Builder' " I can't build my project.

Thank you for helping me if you have a tip :)

Upvotes: 0

Views: 564

Answers (1)

MarioR
MarioR

Reputation: 101

I solved it : use the NameOfQuery.builder() function, and not NameOfQuery.Builder() (b vs B)

Upvotes: 2

Related Questions