ApolloCodegenConfiguration.OutputOptions


STRUCT

ApolloCodegenConfiguration.OutputOptions

Swift
1public struct OutputOptions: Codable, Equatable

Properties

additionalInflectionRules

Swift
1public let additionalInflectionRules: [InflectionRule]

Any non-default rules for pluralization or singularization you wish to include.

queryStringLiteralFormat

Swift
1public let queryStringLiteralFormat: QueryStringLiteralFormat

Formatting of the GraphQL query string literal that is included in each generated operation object.

deprecatedEnumCases

Swift
1public let deprecatedEnumCases: Composition

How deprecated enum cases from the schema should be handled.

schemaDocumentation

Swift
1public let schemaDocumentation: Composition

Whether schema documentation is added to the generated files.

apqs

Swift
1public let apqs: APQConfig

Whether the generated operations should use Automatic Persisted Queries.

See APQConfig for more information on Automatic Persisted Queries.

warningsOnDeprecatedUsage

Swift
1public let warningsOnDeprecatedUsage: Composition

Annotate generated Swift code with the Swift available attribute and deprecated argument for parts of the GraphQL schema annotated with the built-in @deprecated directive.

Methods

init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:apqs:warningsOnDeprecatedUsage:)

Swift
1public init(
2  additionalInflectionRules: [InflectionRule] = [],
3  queryStringLiteralFormat: QueryStringLiteralFormat = .multiline,
4  deprecatedEnumCases: Composition = .include,
5  schemaDocumentation: Composition = .include,
6  apqs: APQConfig = .disabled,
7  warningsOnDeprecatedUsage: Composition = .include
8)

Designated initializer.

  • Parameters:

  • additionalInflectionRules: Any non-default rules for pluralization or singularization you wish to include.

  • queryStringLiteralFormat: Formatting of the GraphQL query string literal that is included in each generated operation object.

  • deprecatedEnumCases: How deprecated enum cases from the schema should be handled.

  • schemaDocumentation: Whether schema documentation is added to the generated files.

  • apqs: Whether the generated operations should use Automatic Persisted Queries.

  • warningsOnDeprecatedUsage: Annotate generated Swift code with the Swift available attribute and deprecated argument for parts of the GraphQL schema annotated with the built-in @deprecated directive.

Feedback

Edit on GitHub

Forums