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
package graphql; | |
import graphql.language.FloatValue; | |
import graphql.language.IntValue; | |
import graphql.language.StringValue; | |
import graphql.schema.Coercing; | |
import graphql.schema.GraphQLScalarType; | |
import java.math.BigDecimal; |
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
package graphql; | |
import java.util.List; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.CompletionStage; | |
@SuppressWarnings("Since15") | |
public class TestStuff { | |
class ExecutionResult { |
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
package graphql | |
import graphql.validation.ValidationError | |
import graphql.validation.ValidationErrorType | |
import spock.lang.Specification | |
/* | |
* Taken from http://facebook.github.io/graphql/#sec-Input-Objects | |
* | |
* |
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
package example.http; | |
import graphql.ExecutionResult; | |
import graphql.GraphQL; | |
import graphql.StarWarsData; | |
import graphql.schema.GraphQLSchema; | |
import graphql.schema.idl.RuntimeWiring; | |
import graphql.schema.idl.SchemaGenerator; | |
import graphql.schema.idl.SchemaParser; | |
import graphql.schema.idl.TypeDefinitionRegistry; |
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
DataFetcher userDataFetcher = new DataFetcher() { | |
@Override | |
public Object get(DataFetchingEnvironment environment) { | |
CompletableFuture<User> userPromise = CompletableFuture.supplyAsync( | |
() -> { | |
return fetchUserFromDatabase(environment.getArgument("userId")); | |
}); | |
return userPromise; | |
} | |
}; |
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
// a batch loader function that will be called with N or more keys for batch loading | |
BatchLoader<String, Object> characterBatchLoader = new BatchLoader<String, Object>() { | |
@Override | |
public CompletionStage<List<Object>> load(List<String> keys) { | |
// | |
// we use supplyAsync() of values here for maximum parellisation | |
// | |
return CompletableFuture.supplyAsync(() -> getCharacterDataViaBatchHTTPApi(keys)); | |
} | |
}; |
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
/* module-key = 'com.atlassian.auiplugin:aui-experimental-soy-templates', location = 'src/soy/aui.soy' */ | |
// This file was automatically generated from aui.soy. | |
// Please don't edit this file by hand. | |
/** | |
* @fileoverview Templates in namespace aui. | |
*/ | |
if (typeof aui == 'undefined') { var aui = {}; } |
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
Index: src/main/java/graphql/execution/instrumentation/dataloader/DataLoaderDispatcherInstrumentation.java | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- src/main/java/graphql/execution/instrumentation/dataloader/DataLoaderDispatcherInstrumentation.java (date 1521428082000) | |
+++ src/main/java/graphql/execution/instrumentation/dataloader/DataLoaderDispatcherInstrumentation.java (revision ) | |
@@ -23,9 +23,12 @@ | |
import java.util.ArrayDeque; | |
import java.util.Collections; |
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
// And example bit of code | |
// marked by | |
// ::FigureA | |
for (java.util.Enumeration entries = zf.entries(); entries.hasMoreElements();) { | |
// Get the entry name and write it to the output file | |
String newLine = System.getProperty("line.separator"); | |
String zipEntryName = | |
((java.util.zip.ZipEntry)entries.nextElement()).getName() + | |
newLine; | |
writer.write(zipEntryName, 0, zipEntryName.length()); |
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
package graphql.execution.instrumentation.dataloader | |
import graphql.ExecutionInput | |
import graphql.TestUtil | |
import graphql.schema.DataFetcher | |
import org.dataloader.BatchLoader | |
import org.dataloader.DataLoader | |
import org.dataloader.DataLoaderOptions | |
import org.dataloader.DataLoaderRegistry | |
import spock.lang.Specification |
OlderNewer