-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update sample app withe the latest changes to compiler #163
Conversation
@@ -31,10 +32,12 @@ | |||
.baseUrl(BASE_URL) | |||
.client(okHttpClient) | |||
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()) | |||
.addConverterFactory(new ApolloConverterFactory.Builder().build()) | |||
.addConverterFactory(new ApolloConverterFactory.Builder() | |||
.withResponseFieldMapper(FeedQuery.Data.class, new FeedQuery.Data.Mapper(FeedQuery.Data.FACTORY)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so sorry could you explain this line again. Will we need to register every object or is this for a particular custom field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes user must provide Mapper instance for each query top level Data class. Converter then will use it to parse query response. So basically number of queries == number of mapper registrations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to update readme in next release
thanks lgtm!
…On Mon, Feb 6, 2017 at 5:13 PM, Ivan Savytskyi ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In apollo-sample/src/main/java/com/example/apollographql/
sample/SampleApplication.java
<#163>:
> @@ -31,10 +32,12 @@
.baseUrl(BASE_URL)
.client(okHttpClient)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
- .addConverterFactory(new ApolloConverterFactory.Builder().build())
+ .addConverterFactory(new ApolloConverterFactory.Builder()
+ .withResponseFieldMapper(FeedQuery.Data.class, new FeedQuery.Data.Mapper(FeedQuery.Data.FACTORY))
Yes user must provide Mapper instance for each query top level Data class.
Converter then will use it to parse query response. So basically number of
queries == number of mapper registrations
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#163>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AEUX3AMxMroiEKCRgo1gOkns2A7qSSNeks5rZ5rvgaJpZM4L3x-U>
.
|
No description provided.