DefaultService
Constructors
Functions
Configures Introspection to download an introspection Json schema
Map a GraphQL scalar type to the Java/Kotlin type. The adapter must be configured at runtime via com.apollographql.apollo3.ApolloClient.Builder.addCustomScalarAdapter.
Map a GraphQL scalar type to the Java/Kotlin type and provided adapter expression. The adapter will be configured at compile time and you must not call com.apollographql.apollo3.ApolloClient.Builder.addCustomScalarAdapter.
Map the given GraphQL scalar to java.lang.Boolean and use the builtin adapter
Map the given GraphQL scalar to java.lang.Double and use the builtin adapter
Map the given GraphQL scalar to java.lang.Float and use the builtin adapter
Map the given GraphQL scalar to java.lang.Integer and use the builtin adapter
Map the given GraphQL scalar to java.lang.Long and use the builtin adapter
Map the given GraphQL scalar to java.lang.Object and use the builtin adapter
Map the given GraphQL scalar to java.lang.String and use the builtin adapter
Map the given GraphQL scalar to kotlin.Any and use the builtin adapter
Map the given GraphQL scalar to kotlin.Boolean and use the builtin adapter
Map the given GraphQL scalar to kotlin.Double and use the builtin adapter
Map the given GraphQL scalar to kotlin.Float and use the builtin adapter
Map the given GraphQL scalar to kotlin.Int and use the builtin adapter
Map the given GraphQL scalar to kotlin.Long and use the builtin adapter
Map the given GraphQL scalar to kotlin.String and use the builtin adapter
Map the given GraphQL scalar to com.apollographql.apollo3.api.Upload and use the builtin adapter
overrides the way the operation manifest is connected. Use this if you want to connect the generated operation manifest. For an example you can use this to send the modified queries to your backend for whitelisting
overrides the way operationOutput is connected. Use this if you want to connect the generated operationOutput. For an example you can use this to send the modified queries to your backend for whitelisting
Overrides the way the generated models are connected. Use this if you want to connect the generated models to another task than the default destination.
A helper method to configure a PackageNameGenerator that will use the file path relative to the source roots to generate the packageNames
Configures operation safelisting (requires an Apollo Studio account)
Overrides the way the generated test builders are connected. Use this if you want to connect the generated test builders to another task than the default destination.
By default, the used coordinates are computed automatically from all modules sharing a schema. This means that changing a query in a module might trigger task execution in a completely different module. If your used coordinates do not change too often, you can opt-in to save them in a file that is read instead of checking all modules.
A shorthand method that configures defaults that match Apollo Android 2.x codegen
Properties
A list of Regex patterns matching schema coordinates for types and fields that should be generated whether they are used by queries/fragments in this module or not.
A list of Regex patterns for GraphQL enums that should be generated as Java classes.
By default, Apollo uses Sha256
hashing algorithm to generate an ID for the query. To provide a custom ID generation logic, pass an instance
that implements the OperationIdGenerator. How the ID is generated is indifferent to the compiler. It can be a hashing algorithm or generated by a backend.
The file where to write the operation manifest. If you want a RegularFileProperty that carries the task dependency, use operationManifestConnection.
The file where the operation output will be written. It's called operationOutputFile but this an "input" parameter for the compiler If you want a RegularFileProperty that carries the task dependency, use operationManifestConnection
A generator to generate the operation output from a list of operations. OperationOutputGenerator is similar to OperationIdGenerator but can work on lists. This is useful if you need to register/whitelist your operations on your server all at once.
The directory where the generated models will be written. It's called outputDir but this an "input" parameter for the compiler If you want a DirectoryProperty that carries the task dependency, use outputDirConnection
Use packageNameGenerator to customize how to generate package names from file paths.
A shorthand property that will be used if schemaFiles is empty
A list of Regex patterns for GraphQL enums that should be generated as Kotlin sealed classes instead of the default Kotlin enums.
The directory where the test builders will be written. If you want a DirectoryProperty that carries the task dependency, use outputDirConnection