I am storing the data in json format in GraphQL server and making a query like:
query {
symptoms{
id
name
picUrl
}
}
Now I have to fetch it from the server using its client. My app gradle.build file is as follows:
dependencies{
compile 'com.apollographql.android:api:0.1.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0' // retrofit2
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
compile 'com.apollographql.android:converter-pojo:0.1.0'
compile 'junit:junit:4.12'
}
and in module gradle.build I have:
dependencies {
classpath 'com.apollographql.apollo:gradle-plugin:0.3.3'
classpath 'com.apollographql.android:gradle-plugin:0.1.0'
}
Now in the Adapter class I need to write the code to fetch the data. I am following this link https://github.com/apollographql/apollo-android But I am getting error while writing this code itself:
ApolloClient apolloClient;
apolloClient.newCall(FeedQuery.builder()
How to resolve this issue?