Created
January 19, 2017 17:07
-
-
Save Cal30/281bb6d2c63192539c7f194f3abe2dc7 to your computer and use it in GitHub Desktop.
GraphQL Post - Embedded DataFetcher
This file contains 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
@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