You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/tutorials/getting-started-with-spring-boot.md
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,7 @@ public class GraphQLProvider {
177
177
private GraphQL graphQL;
178
178
179
179
@Bean
180
-
public GraphQL graphQL() {
180
+
public GraphQL graphQL() {
181
181
return graphQL;
182
182
}
183
183
@@ -230,7 +230,11 @@ What we still need to do is to implement the `buildSchema` method which creates
230
230
- One to retrieve a book with a specific ID
231
231
- One to get the author for a specific book.
232
232
233
-
`DataFetcher` and how to implement the `GraphQLDataFetcher` bean is explained in the next section.
233
+
`DataFetcher` and how to implement the `GraphQLDataFetchers` bean is explained in the next section.
234
+
235
+
Overall the process of creating a `GraphQL` and `GraphQLSchema` instance looks like this:
236
+
237
+

234
238
235
239
# DataFetchers
236
240
@@ -345,7 +349,21 @@ A `PropertyDataFetcher` tries to lookup a property on a Java object in multiple
345
349
Lets assume for a second we have a mismatch and the book `Map` has a key `totalPages` instead of `pageCount`. This would result in a `null` value for `pageCount` for every book, because the `PropertyDataFetcher` can't fetch the right value. In order to fix that you would have to register a new `DataFetcher` for `Book.pageCount` which looks like this:
0 commit comments