Skip to content

Instantly share code, notes, and snippets.

@Cal30
Created January 19, 2017 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cal30/281bb6d2c63192539c7f194f3abe2dc7 to your computer and use it in GitHub Desktop.
Save Cal30/281bb6d2c63192539c7f194f3abe2dc7 to your computer and use it in GitHub Desktop.
GraphQL Post - Embedded DataFetcher
@Override
public Object get(DataFetchingEnvironment environment) {
if (environment.getSource() != null) {
Map source = (Map) environment.getSource();
if (connection) {
return resolveConnection(source, environment);
} else {
return resolveEntity(source);
}
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment