UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 1.07 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SchemaFile=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),fs_1=require("fs");class SchemaFile{constructor(options){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_appsync_SchemaProps(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SchemaFile),error}this.definition=fs_1.readFileSync(options.filePath).toString("utf-8")}static fromAsset(filePath){return new SchemaFile({filePath})}bind(api,_options){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_appsync_IGraphqlApi(api),jsiiDeprecationWarnings.aws_cdk_lib_aws_appsync_SchemaBindOptions(_options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return{apiId:api.apiId,definition:this.definition}}}exports.SchemaFile=SchemaFile,_a=JSII_RTTI_SYMBOL_1,SchemaFile[_a]={fqn:"aws-cdk-lib.aws_appsync.SchemaFile",version:"2.70.0"};