-
- All Implemented Interfaces:
-
kotlin.Comparable
,org.gradle.api.Task
,org.gradle.api.internal.DynamicObjectAware
,org.gradle.api.internal.TaskInternal
,org.gradle.api.plugins.ExtensionAware
,org.gradle.util.Configurable
public abstract class GraphQLDownloadSDLTask extends DefaultTask
Task that attempts to download GraphQL schema in SDL format from the specified endpoint and save it locally.
-
-
Field Summary
Fields Modifier and Type Field Description private final ConfigurableFileCollection
pluginClasspath
private final Property<String>
endpoint
private final MapProperty<String, Object>
headers
private final Property<TimeoutConfiguration>
timeoutConfig
private final RegularFileProperty
outputFile
-
Constructor Summary
Constructors Constructor Description GraphQLDownloadSDLTask()
-
Method Summary
Modifier and Type Method Description final ConfigurableFileCollection
getPluginClasspath()
final Property<String>
getEndpoint()
Target GraphQL server SDL endpoint that will be used to download schema. final MapProperty<String, Object>
getHeaders()
Optional HTTP headers to be specified on a SDL request. final Property<TimeoutConfiguration>
getTimeoutConfig()
Timeout configuration that specifies maximum amount of time (in milliseconds) to connect and download schema from SDL endpoint before we cancel the request. final RegularFileProperty
getOutputFile()
Target GraphQL schema file to be generated. abstract WorkerExecutor
getWorkerExecutor()
final Unit
downloadSDLAction()
Download schema in SDL format from the specified endpoint and save it locally in the target output file. -
Methods inherited from class com.expediagroup.graphql.plugin.gradle.tasks.GraphQLDownloadSDLTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
-
Methods inherited from class org.gradle.api.DefaultTask
appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getPluginClasspath
@Classpath() final ConfigurableFileCollection getPluginClasspath()
-
getEndpoint
final Property<String> getEndpoint()
Target GraphQL server SDL endpoint that will be used to download schema.
-
getHeaders
final MapProperty<String, Object> getHeaders()
Optional HTTP headers to be specified on a SDL request.
-
getTimeoutConfig
final Property<TimeoutConfiguration> getTimeoutConfig()
Timeout configuration that specifies maximum amount of time (in milliseconds) to connect and download schema from SDL endpoint before we cancel the request. Defaults to Ktor CIO engine defaults (5 seconds for connect timeout and 15 seconds for read timeout).
-
getOutputFile
final RegularFileProperty getOutputFile()
Target GraphQL schema file to be generated.
-
getWorkerExecutor
@Inject() abstract WorkerExecutor getWorkerExecutor()
-
downloadSDLAction
final Unit downloadSDLAction()
Download schema in SDL format from the specified endpoint and save it locally in the target output file.
-
-
-
-