Team,
I am using the Apollo Android Client and i came across a problem/possibly a bug in the names of the generated classes.
So what i found so far that if i right a query
query LaunchDetails($id:ID!) {
launch(id: $id) {
id
site
mission {
name
missionPatch(size:LARGE)
}
}
}
The corresponding class file is generated with the name LaunchDetailsQuery i.e it has added the Query Suffix after LaunchDetails
however if i write a query which ends with Query, it doesn’t add an additional Query suffix to the class
eg if i write
query TestQuery($id:ID!) {
launch(id: $id) {
id
site
}
}
the corresponding generated class file will be TestQuery only
Please see the generated class files snapshot.
Similar behaviour is with Mutation as well.
Wanted to know how the naming convention is decided for generating classes. I initially assumed that we will be suffixing Query and Mutation to the corresponding [query/mutation] name. But that is not always true.