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
final ObjectMapper mapper = new ObjectMapper(); | |
final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); | |
env.setParallelism(1); | |
Properties props = new Properties(); | |
props.setProperty(TwitterSource.CONSUMER_KEY, "******************"); | |
props.setProperty(TwitterSource.CONSUMER_SECRET, "*********************"); | |
props.setProperty(TwitterSource.TOKEN, "*******************"); | |
props.setProperty(TwitterSource.TOKEN_SECRET, "*****************"); |
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
@Bean | |
@Singleton | |
public GraphQL graphQL( | |
final ResourceResolver resourceResolver, | |
final DataFetcherProvider dataFetcherProvider) { | |
val schemaParser = new SchemaParser(); | |
val schemaGenerator = new SchemaGenerator(); | |
// Parse the schema. |
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
compile 'io.micronaut.graphql:micronaut-graphql:1.1.0' |
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
type Link { | |
url: String! | |
description: String! | |
} | |
type Query { | |
# a type of query which returns all links | |
allLinks: [Link!]! | |
} |
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
native-image \ | |
-H:ReflectionConfigurationFiles=reflection-config.json \ | |
-H:ResourceConfigurationFiles=resources-config.json \ | |
-jar build/libs/bootstrap.jar \ | |
--no-server \ | |
--enable-http --enable-https --enable-url-protocols=http,https \ | |
-Djava.net.preferIPv4Stack=true |
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
console.log ( | |
(function(n: number): number { | |
if (n < 5) { | |
return // returns undefined which is not desired. Desired is n*2. | |
// Can "no statement after return" be checked by TS compiler ? | |
n * 2; | |
} | |
return n; | |
})(3) | |
); |