SchemaProps
- class aws_cdk.aws_appsync.SchemaProps(*, file_path)
Bases:
objectThe options for configuring a schema from an existing file.
- Parameters:
file_path (
str) – The file path for the schema. When this option is configured, then the schema will be generated from an existing file from disk.- ExampleMetadata:
infused
Example:
schema = appsync.SchemaFile(file_path="mySchemaFile") api = appsync.GraphqlApi(self, "api", name="myApi", definition=appsync.Definition.from_schema(schema), enhanced_metrics_config=appsync.EnhancedMetricsConfig( data_source_level_metrics_behavior=appsync.DataSourceLevelMetricsBehavior.PER_DATA_SOURCE_METRICS, operation_level_metrics_config=appsync.OperationLevelMetricsConfig.ENABLED, resolver_level_metrics_behavior=appsync.ResolverLevelMetricsBehavior.PER_RESOLVER_METRICS ) ) none_dS = api.add_none_data_source("none", metrics_config=appsync.DataSourceMetricsConfig.ENABLED ) none_dS.create_resolver("noneResolver", type_name="Mutation", field_name="addDemoMetricsConfig", metrics_config=appsync.ResolverMetricsConfig.ENABLED )
Attributes
- file_path
The file path for the schema.
When this option is configured, then the schema will be generated from an existing file from disk.