File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -182,11 +182,21 @@ The `typeRegistry` defined above is just types: it describes how the schema look
182182
183183### DataFetcher
184184
185- Probably the most important concept of a GraphQL Java server is a ` DataFetcher ` :
185+ Probably the most important concept for a GraphQL Java server is a ` DataFetcher ` :
186186A ` DataFetcher ` fetches the Data for one field while the query is executed.
187187
188188While GraphQL Java is executing a query it calls the appropriate ` DataFetcher ` for each field it encounters in query.
189+ A ` DataFetcher ` is a Interface with a single method, taking a single argument of type ` DataFetcherEnvironment ` .
189190
191+ For our first iteration we are doing the simplest possible thing that works: we are fetching the books we wanna display from in-memory.
190192
193+ Our code looks like this:
194+
195+ {{< highlight java "linenos=table" >}}
196+ ....
197+ {{< / highlight >}}
198+
199+
200+ Important: ** Every** field from the schema has a ` DataFetcher ` associated with. Most of them have a actually the defaultData
191201
192202
You can’t perform that action at this time.
0 commit comments