Created
November 20, 2017 04:33
-
-
Save nwillc/2a1b3a3cea5e6fdfa5fb68c8f32e9de0 to your computer and use it in GitHub Desktop.
Runtime Wiring attaching a fetcher to a query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RuntimeWiring.newRuntimeWiring() | |
.type("QueryType", wiring -> wiring | |
.dataFetcher("company", new CompanyQuery(companies)) | |
.dataFetcher("companies", new CompaniesQuery(companies)) | |
) | |
.type("MutationType", wiring -> wiring | |
.dataFetcher("company", new CompanyMutation(companies)) | |
.dataFetcher("companyDelete", new CompanyDelete(companies)) | |
) | |
.build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment