I am using Apollo Client in Android Project. I have 2 schema file and I have put them 2 different directories.
- src/main/graphql/com/example/data/search/schema.json
- src/main/graphql/com/example/data/user/schema.json
But when I build a project to generate code by Apollo It gives me an error:
ApolloGraphQL: By default, only one schema.json file is supported.
and suggest me to use multiple service Build output:
ApolloGraphQL: By default, only one schema.json file is supported. Please use multiple services instead:
apollo {
service("search") {
sourceFolder = "/.../app/src/main/graphql/com/example/data/search"
}
service("customer") {
sourceFolder = "/.../app/src/main/graphql/com/example/data/customer"
}
}
I have also added this to my build.gradle(app level) file but still shows the same build error.
Please suggest me how can I solve this error