Skip to content

Instantly share code, notes, and snippets.

Last active April 20, 2020 20:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
public DataFetcher setDriverDataFetcher() {
return dataFetchingEnvironment -> {
String carId = dataFetchingEnvironment.getArgument("id");
String firstName = dataFetchingEnvironment.getArgument("firstName");
String lastName = dataFetchingEnvironment.getArgument("lastName");
Map<String, String> driverDetails = new HashMap<>();
driverDetails.put("firstName", firstName);
driverDetails.put("lastName", lastName);
driverDetails.put("id", carId);
return driverDetails;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment