From a674eb0b07bf30dbccc7fb259cd73e046141b02e Mon Sep 17 00:00:00 2001 From: Michael Giraldo Date: Tue, 7 Apr 2026 19:15:24 -0700 Subject: [PATCH 1/3] fix(appsync-modelgen-plugin): replace relay 12 dependency chain --- packages/appsync-modelgen-plugin/package.json | 6 +- .../src/scalars/index.ts | 31 +++-- .../src/types/disposable-compat.d.ts | 7 ++ .../src/visitors/appsync-dart-visitor.ts | 26 ++--- .../visitors/appsync-json-metadata-visitor.ts | 2 +- .../appsync-model-introspection-visitor.ts | 2 +- .../src/visitors/appsync-visitor.ts | 12 +- yarn.lock | 108 +++++++++++++++++- 8 files changed, 158 insertions(+), 36 deletions(-) create mode 100644 packages/appsync-modelgen-plugin/src/types/disposable-compat.d.ts diff --git a/packages/appsync-modelgen-plugin/package.json b/packages/appsync-modelgen-plugin/package.json index 8971efa63..e418a7510 100644 --- a/packages/appsync-modelgen-plugin/package.json +++ b/packages/appsync-modelgen-plugin/package.json @@ -27,9 +27,9 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@graphql-codegen/plugin-helpers": "^3.1.1", - "@graphql-codegen/visitor-plugin-common": "^1.22.0", - "@graphql-tools/utils": "^6.0.18", + "@graphql-codegen/plugin-helpers": "^6.1.1", + "@graphql-codegen/visitor-plugin-common": "^6.2.4", + "@graphql-tools/utils": "^11.0.0", "chalk": "^3.0.0", "change-case": "^4.1.1", "graphql-transformer-common": "^4.25.1", diff --git a/packages/appsync-modelgen-plugin/src/scalars/index.ts b/packages/appsync-modelgen-plugin/src/scalars/index.ts index 0dd89c0af..a9efcdec0 100644 --- a/packages/appsync-modelgen-plugin/src/scalars/index.ts +++ b/packages/appsync-modelgen-plugin/src/scalars/index.ts @@ -1,7 +1,18 @@ import { NormalizedScalarsMap } from '@graphql-codegen/visitor-plugin-common'; import { AMPLIFY_CORE_PREFIX } from '../configs/dart-config'; -export const JAVA_SCALAR_MAP: NormalizedScalarsMap = { +const createScalarMap = (scalarTypes: Record): NormalizedScalarsMap => { + const normalizedScalars: NormalizedScalarsMap = {}; + Object.entries(scalarTypes).forEach(([scalarName, scalarType]) => { + normalizedScalars[scalarName] = { + input: scalarType, + output: scalarType, + }; + }); + return normalizedScalars; +}; + +export const JAVA_SCALAR_MAP: NormalizedScalarsMap = createScalarMap({ ID: 'String', String: 'String', Int: 'Integer', @@ -16,7 +27,7 @@ export const JAVA_SCALAR_MAP: NormalizedScalarsMap = { AWSURL: 'String', AWSPhone: 'String', AWSIPAddress: 'String', -}; +}); // Package that needs to be imported when using the types export const JAVA_TYPE_IMPORT_MAP: Record = { @@ -26,7 +37,7 @@ export const JAVA_TYPE_IMPORT_MAP: Record = { 'Temporal.Timestamp': 'com.amplifyframework.core.model.temporal.Temporal', }; -export const SWIFT_SCALAR_MAP: NormalizedScalarsMap = { +export const SWIFT_SCALAR_MAP: NormalizedScalarsMap = createScalarMap({ ID: 'String', String: 'String', Int: 'Int', @@ -41,9 +52,9 @@ export const SWIFT_SCALAR_MAP: NormalizedScalarsMap = { AWSURL: 'String', AWSPhone: 'String', AWSIPAddress: 'String', -}; +}); -export const TYPESCRIPT_SCALAR_MAP: NormalizedScalarsMap = { +export const TYPESCRIPT_SCALAR_MAP: NormalizedScalarsMap = createScalarMap({ ID: 'string', String: 'string', Int: 'number', @@ -58,9 +69,9 @@ export const TYPESCRIPT_SCALAR_MAP: NormalizedScalarsMap = { AWSURL: 'string', AWSPhone: 'string', AWSIPAddress: 'string', -}; +}); -export const METADATA_SCALAR_MAP: NormalizedScalarsMap = { +export const METADATA_SCALAR_MAP: NormalizedScalarsMap = createScalarMap({ ID: 'ID', Boolean: 'Boolean', String: 'String', @@ -75,9 +86,9 @@ export const METADATA_SCALAR_MAP: NormalizedScalarsMap = { Int: 'Int', Float: 'Float', AWSTimestamp: 'AWSTimestamp', -}; +}); -export const DART_SCALAR_MAP: NormalizedScalarsMap = { +export const DART_SCALAR_MAP: NormalizedScalarsMap = createScalarMap({ ID: 'String', String: 'String', Int: 'int', @@ -92,4 +103,4 @@ export const DART_SCALAR_MAP: NormalizedScalarsMap = { AWSURL: 'String', AWSPhone: 'String', AWSIPAddress: 'String', -}; +}); diff --git a/packages/appsync-modelgen-plugin/src/types/disposable-compat.d.ts b/packages/appsync-modelgen-plugin/src/types/disposable-compat.d.ts new file mode 100644 index 000000000..b30806d9a --- /dev/null +++ b/packages/appsync-modelgen-plugin/src/types/disposable-compat.d.ts @@ -0,0 +1,7 @@ +// TypeScript 4.7 does not ship the standard Disposable globals that newer +// graphql-tools type declarations reference. This package does not use those +// contracts directly, so lightweight ambient declarations keep the package +// buildable until the repo's TypeScript floor moves forward. +interface Disposable {} + +interface AsyncDisposable {} diff --git a/packages/appsync-modelgen-plugin/src/visitors/appsync-dart-visitor.ts b/packages/appsync-modelgen-plugin/src/visitors/appsync-dart-visitor.ts index 118621779..8c9fe7b5e 100644 --- a/packages/appsync-modelgen-plugin/src/visitors/appsync-dart-visitor.ts +++ b/packages/appsync-modelgen-plugin/src/visitors/appsync-dart-visitor.ts @@ -613,9 +613,9 @@ export class AppSyncModelDartVisitor< case 'String': toStringVal = `"$${fieldName}"`; break; - case this.scalars['AWSDate']: - case this.scalars['AWSTime']: - case this.scalars['AWSDateTime']: + case this.getScalarType('AWSDate'): + case this.getScalarType('AWSTime'): + case this.getScalarType('AWSDateTime'): toStringVal = `(${fieldName} != null ? ${fieldName}!.format() : "null")`; break; default: @@ -768,25 +768,25 @@ export class AppSyncModelDartVisitor< //regular type const fieldNativeType = this.getNativeType({ ...field, isList: false }); switch (fieldNativeType) { - case this.scalars['AWSDate']: - case this.scalars['AWSTime']: - case this.scalars['AWSDateTime']: + case this.getScalarType('AWSDate'): + case this.getScalarType('AWSTime'): + case this.getScalarType('AWSDateTime'): return field.isList ? `${fieldName} = (json['${varName}'] as ${this.getNullableTypeStr( 'List', )})?.map((e) => ${fieldNativeType}.fromString(e)).toList()` : `${fieldName} = json['${varName}'] != null ? ${fieldNativeType}.fromString(json['${varName}']) : null`; - case this.scalars['AWSTimestamp']: + case this.getScalarType('AWSTimestamp'): return field.isList ? `${fieldName} = (json['${varName}'] as ${this.getNullableTypeStr( 'List', )})?.map((e) => ${fieldNativeType}.fromSeconds(e)).toList()` : `${fieldName} = json['${varName}'] != null ? ${fieldNativeType}.fromSeconds(json['${varName}']) : null`; - case this.scalars['Int']: + case this.getScalarType('Int'): return field.isList ? `${fieldName} = (json['${varName}'] as ${this.getNullableTypeStr('List')})?.map((e) => (e as num).toInt()).toList()` : `${fieldName} = (json['${varName}'] as ${this.getNullableTypeStr('num')})?.toInt()`; - case this.scalars['Float']: + case this.getScalarType('Float'): return field.isList ? `${fieldName} = (json['${varName}'] as ${this.getNullableTypeStr('List')})?.map((e) => (e as num).toDouble()).toList()` : `${fieldName} = (json['${varName}'] as ${this.getNullableTypeStr('num')})?.toDouble()`; @@ -825,11 +825,11 @@ export class AppSyncModelDartVisitor< } const fieldNativeType = this.getNativeType({ ...field, isList: false }); switch (fieldNativeType) { - case this.scalars['AWSDate']: - case this.scalars['AWSTime']: - case this.scalars['AWSDateTime']: + case this.getScalarType('AWSDate'): + case this.getScalarType('AWSTime'): + case this.getScalarType('AWSDateTime'): return field.isList ? `'${varName}': ${fieldName}?.map((e) => e.format()).toList()` : `'${varName}': ${fieldName}?.format()`; - case this.scalars['AWSTimestamp']: + case this.getScalarType('AWSTimestamp'): return field.isList ? `'${varName}': ${fieldName}?.map((e) => e.toSeconds()).toList()` : `'${varName}': ${fieldName}?.toSeconds()`; diff --git a/packages/appsync-modelgen-plugin/src/visitors/appsync-json-metadata-visitor.ts b/packages/appsync-modelgen-plugin/src/visitors/appsync-json-metadata-visitor.ts index 55704f9d9..72991d91f 100644 --- a/packages/appsync-modelgen-plugin/src/visitors/appsync-json-metadata-visitor.ts +++ b/packages/appsync-modelgen-plugin/src/visitors/appsync-json-metadata-visitor.ts @@ -265,7 +265,7 @@ export class AppSyncJSONVisitor< private getType(gqlType: string): JSONModelFieldType { // Todo: Handle unlisted scalars if (gqlType in METADATA_SCALAR_MAP) { - return METADATA_SCALAR_MAP[gqlType as keyof typeof METADATA_SCALAR_MAP]; + return METADATA_SCALAR_MAP[gqlType as keyof typeof METADATA_SCALAR_MAP].output as JSONModelFieldType; } if (gqlType in this.enumMap) { return { enum: this.enumMap[gqlType].name }; diff --git a/packages/appsync-modelgen-plugin/src/visitors/appsync-model-introspection-visitor.ts b/packages/appsync-modelgen-plugin/src/visitors/appsync-model-introspection-visitor.ts index c6dbb1cde..2b97971a7 100644 --- a/packages/appsync-modelgen-plugin/src/visitors/appsync-model-introspection-visitor.ts +++ b/packages/appsync-modelgen-plugin/src/visitors/appsync-model-introspection-visitor.ts @@ -273,7 +273,7 @@ export class AppSyncModelIntrospectionVisitor< protected getType(gqlType: string): FieldType | InputFieldType | UnionFieldType | InterfaceFieldType { // Todo: Handle unlisted scalars if (gqlType in METADATA_SCALAR_MAP) { - return METADATA_SCALAR_MAP[gqlType] as FieldType; + return METADATA_SCALAR_MAP[gqlType].output as FieldType; } if (gqlType in this.enumMap) { return { enum: this.enumMap[gqlType].name }; diff --git a/packages/appsync-modelgen-plugin/src/visitors/appsync-visitor.ts b/packages/appsync-modelgen-plugin/src/visitors/appsync-visitor.ts index 079bf9afb..b2fd20cca 100644 --- a/packages/appsync-modelgen-plugin/src/visitors/appsync-visitor.ts +++ b/packages/appsync-modelgen-plugin/src/visitors/appsync-visitor.ts @@ -161,7 +161,7 @@ export interface RawAppSyncModelConfig extends RawConfig { * @type string * @description semantic version of amplify-codegen package */ - codegenVersion: string; + codegenVersion?: string; } // Todo: need to figure out how to share config @@ -584,7 +584,7 @@ export class AppSyncModelVisitor< const typeName = field.type; let typeNameStr: string = ''; if (typeName in this.scalars) { - typeNameStr = this.scalars[typeName]; + typeNameStr = this.getScalarType(typeName); } else if (this.isModelType(field)) { typeNameStr = this.getModelName(this.modelMap[typeName]); } else if (this.isEnumType(field)) { @@ -598,6 +598,14 @@ export class AppSyncModelVisitor< return field.isList ? this.getListType(typeNameStr, field) : typeNameStr; } + protected getScalarType(typeName: string, kind: 'input' | 'output' = 'output'): string { + const scalar = this.scalars[typeName]; + if (!scalar) { + throw new Error(`Unknown scalar ${typeName}`); + } + return scalar[kind]; + } + protected getListType(typeStr: string, field: CodeGenField): string { return `List<${typeStr}>`; } diff --git a/yarn.lock b/yarn.lock index 64e0f8cef..b2254708f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,6 +40,15 @@ signedsource "^1.0.0" yargs "^15.3.1" +"@ardatan/relay-compiler@^13.0.1": + version "13.0.1" + resolved "https://registry.yarnpkg.com/@ardatan/relay-compiler/-/relay-compiler-13.0.1.tgz#b00a4c1f986156fa2472db8036e9087877d37be3" + integrity sha512-afG3YPwuSA0E5foouZusz5GlXKs74dObv4cuWyLyfKsYFj2r7oGRNB28v18HvwuLSQtQFCi+DpIe0TZkgQDYyg== + dependencies: + "@babel/runtime" "^7.29.2" + immutable "^5.1.5" + invariant "^2.2.4" + "@ardatan/sync-fetch@^0.0.1": version "0.0.1" resolved "https://registry.npmjs.org/@ardatan/sync-fetch/-/sync-fetch-0.0.1.tgz#3385d3feedceb60a896518a1db857ec1e945348f" @@ -6101,6 +6110,11 @@ dependencies: regenerator-runtime "^0.14.0" +"@babel/runtime@^7.29.2": + version "7.29.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.29.2.tgz#9a6e2d05f4b6692e1801cd4fb176ad823930ed5e" + integrity sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g== + "@babel/template@^7.22.15", "@babel/template@^7.3.3": version "7.22.15" resolved "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" @@ -6461,9 +6475,20 @@ lodash "~4.17.0" tslib "~2.4.0" +"@graphql-codegen/plugin-helpers@^6.1.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-6.2.1.tgz#8e00b06c35e36bed93f78278024ed6ff01da1c68" + integrity sha512-shRr26TfVZ6KFBjzRYUj02gLNh6yaECz9gTGgI6riANw5sSH9PONwTsBRYkEgU+6IXiL7VQeCumahvxSGFbRlQ== + dependencies: + "@graphql-tools/utils" "^11.0.0" + change-case-all "1.0.15" + common-tags "1.8.2" + import-from "4.0.0" + tslib "~2.6.0" + "@graphql-codegen/schema-ast@^2.6.1": version "2.6.1" - resolved "https://registry.npmjs.org/@graphql-codegen/schema-ast/-/schema-ast-2.6.1.tgz#8ba1b38827c034b51ecd3ce88622c2ae6cd3fe1a" + resolved "https://registry.yarnpkg.com/@graphql-codegen/schema-ast/-/schema-ast-2.6.1.tgz#8ba1b38827c034b51ecd3ce88622c2ae6cd3fe1a" integrity sha512-5TNW3b1IHJjCh07D2yQNGDQzUpUl2AD+GVe1Dzjqyx/d2Fn0TPMxLsHsKPS4Plg4saO8FK/QO70wLsP7fdbQ1w== dependencies: "@graphql-codegen/plugin-helpers" "^3.1.2" @@ -6472,7 +6497,7 @@ "@graphql-codegen/testing@^1.17.7": version "1.18.3" - resolved "https://registry.npmjs.org/@graphql-codegen/testing/-/testing-1.18.3.tgz#35ffe200c13c29aa93f41cb62b043552b860c72a" + resolved "https://registry.yarnpkg.com/@graphql-codegen/testing/-/testing-1.18.3.tgz#35ffe200c13c29aa93f41cb62b043552b860c72a" integrity sha512-ULw2TiADFokbM4ccecLtAf/tBoYOUKfoNPHelE7IE3Ci8gH9GGLLJzkiylz6u06WxHFl6h5njvo8c4gT1XcgTQ== dependencies: "@graphql-codegen/plugin-helpers" "^3.1.1" @@ -6484,7 +6509,7 @@ "@graphql-codegen/typescript@^2.8.3": version "2.8.8" - resolved "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.8.8.tgz#8c3b9153e334db43c65f8f31ced69b4c60d14861" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript/-/typescript-2.8.8.tgz#8c3b9153e334db43c65f8f31ced69b4c60d14861" integrity sha512-A0oUi3Oy6+DormOlrTC4orxT9OBZkIglhbJBcDmk34jAKKUgesukXRd4yOhmTrnbchpXz2T8IAOFB3FWIaK4Rw== dependencies: "@graphql-codegen/plugin-helpers" "^3.1.2" @@ -6495,7 +6520,7 @@ "@graphql-codegen/visitor-plugin-common@2.13.8": version "2.13.8" - resolved "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.13.8.tgz#09bc6317b227e5a278f394f4cef0d6c2d1910597" + resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.13.8.tgz#09bc6317b227e5a278f394f4cef0d6c2d1910597" integrity sha512-IQWu99YV4wt8hGxIbBQPtqRuaWZhkQRG2IZKbMoSvh0vGeWb3dB0n0hSgKaOOxDY+tljtOf9MTcUYvJslQucMQ== dependencies: "@graphql-codegen/plugin-helpers" "^3.1.2" @@ -6525,6 +6550,22 @@ parse-filepath "^1.0.2" tslib "~2.3.0" +"@graphql-codegen/visitor-plugin-common@^6.2.4": + version "6.2.4" + resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-6.2.4.tgz#73906f34e8baaaadf5bfe5fefece4d86f835aebc" + integrity sha512-iwiVCc7Mv8/XAa3K35AdFQ9chJSDv/gYEnBeQFF/Sq/W8EyJoHypOGOTTLk7OSrWO4xea65ggv0e7fGt7rPJjQ== + dependencies: + "@graphql-codegen/plugin-helpers" "^6.1.1" + "@graphql-tools/optimize" "^2.0.0" + "@graphql-tools/relay-operation-optimizer" "^7.1.1" + "@graphql-tools/utils" "^11.0.0" + auto-bind "~4.0.0" + change-case-all "1.0.15" + dependency-graph "^1.0.0" + graphql-tag "^2.11.0" + parse-filepath "^1.0.2" + tslib "~2.6.0" + "@graphql-tools/apollo-engine-loader@^8.0.0": version "8.0.0" resolved "https://registry.npmjs.org/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-8.0.0.tgz#ac1f351cbe41508411784f25757f5557b0f27489" @@ -6550,6 +6591,13 @@ dependencies: tslib "^2.4.0" +"@graphql-tools/optimize@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-2.0.0.tgz#7a9779d180824511248a50c5a241eff6e7a2d906" + integrity sha512-nhdT+CRGDZ+bk68ic+Jw1OZ99YCDIKYA5AlVAnBHJvMawSx9YQqQAIj4refNc1/LRieGiuWvhbG3jvPVYho0Dg== + dependencies: + tslib "^2.4.0" + "@graphql-tools/relay-operation-optimizer@^6.3.0", "@graphql-tools/relay-operation-optimizer@^6.5.0": version "6.5.18" resolved "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.18.tgz#a1b74a8e0a5d0c795b8a4d19629b654cf66aa5ab" @@ -6559,6 +6607,15 @@ "@graphql-tools/utils" "^9.2.1" tslib "^2.4.0" +"@graphql-tools/relay-operation-optimizer@^7.1.1": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-7.1.2.tgz#5116f0d13b73a2231fd3a5adff9dc5db442e03ee" + integrity sha512-n/yNuj9aQVdk1bxHvnbqQdvZ5P3Ru8L7BoDlBGK9OXr2Q44XBhFIonqaxREqAWyMme5WnE+DjUswa5H70PQbRg== + dependencies: + "@ardatan/relay-compiler" "^13.0.1" + "@graphql-tools/utils" "^11.0.0" + tslib "^2.4.0" + "@graphql-tools/schema@^9.0.0": version "9.0.19" resolved "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz#c4ad373b5e1b8a0cf365163435b7d236ebdd06e7" @@ -6579,6 +6636,16 @@ dset "^3.1.2" tslib "^2.4.0" +"@graphql-tools/utils@^11.0.0": + version "11.0.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-11.0.0.tgz#f54a09372e96c32416fcbd0eb8e9e0f1338900bd" + integrity sha512-bM1HeZdXA2C3LSIeLOnH/bcqSgbQgKEDrjxODjqi3y58xai2TkNrtYcQSoWzGbt9VMN1dORGjR7Vem8SPnUFQA== + dependencies: + "@graphql-typed-document-node/core" "^3.1.1" + "@whatwg-node/promise-helpers" "^1.0.0" + cross-inspect "1.0.1" + tslib "^2.4.0" + "@graphql-tools/utils@^6.0.18": version "6.2.4" resolved "https://registry.npmjs.org/@graphql-tools/utils/-/utils-6.2.4.tgz#38a2314d2e5e229ad4f78cca44e1199e18d55856" @@ -10028,6 +10095,13 @@ fast-url-parser "^1.1.3" tslib "^2.3.1" +"@whatwg-node/promise-helpers@^1.0.0": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@whatwg-node/promise-helpers/-/promise-helpers-1.3.2.tgz#3b54987ad6517ef6db5920c66a6f0dada606587d" + integrity sha512-Nst5JdK47VIl9UcGwtv2Rcgyn5lWtZ0/mhRQ4G8NN2isxpq2TO30iqHzmwoJycjWuyUfg3GFXqP/gFHXeV57IA== + dependencies: + tslib "^2.6.3" + "@wry/equality@^0.1.2": version "0.1.11" resolved "https://registry.npmjs.org/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790" @@ -11690,6 +11764,13 @@ cross-inspect@1.0.0: dependencies: tslib "^2.4.0" +cross-inspect@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cross-inspect/-/cross-inspect-1.0.1.tgz#15f6f65e4ca963cf4cc1a2b5fef18f6ca328712b" + integrity sha512-Pcw1JTvZLSJH83iiGWt6fRcT+BjZlCDRVwYLbUcHzv/CRpB7r0MlSrGbIyQvVSNyGnbt7G4AXuyCiDR3POvZ1A== + dependencies: + tslib "^2.4.0" + cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" @@ -11882,6 +11963,11 @@ dependency-graph@^0.11.0: resolved "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27" integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg== +dependency-graph@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-1.0.0.tgz#bb5e85aec1310bc13b22dbd76e3196c4ee4c10d2" + integrity sha512-cW3gggJ28HZ/LExwxP2B++aiKxhJXMSIt9K48FOXQkm+vuG5gyatXnLsONRJdzO/7VfjDIiaOOa/bs4l464Lwg== + deprecation@^2.0.0: version "2.3.1" resolved "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" @@ -13648,7 +13734,7 @@ immutable-tuple@^0.4.9: resolved "https://registry.npmjs.org/immutable-tuple/-/immutable-tuple-0.4.10.tgz#e0b1625384f514084a7a84b749a3bb26e9179929" integrity sha512-45jheDbc3Kr5Cw8EtDD+4woGRUV0utIrJBZT8XH0TPZRfm8tzT0/sLGGzyyCCFqFMG5Pv5Igf3WY/arn6+8V9Q== -immutable@^4.3.8, immutable@~3.7.6: +immutable@^4.3.8, immutable@^5.1.5, immutable@~3.7.6: version "4.3.8" resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.8.tgz#02d183c7727fb2bb1d5d0380da0d779dce9296a7" integrity sha512-d/Ld9aLbKpNwyl0KiM2CT1WYvkitQ1TSvmRtkcV8FKStiDoA7Slzgjmb/1G2yhKM1p0XeNOieaTbFZmU1d3Xuw== @@ -15597,7 +15683,7 @@ no-case@^3.0.4: nock@13.3.0: version "13.3.0" - resolved "https://registry.npmjs.org/nock/-/nock-13.3.0.tgz#b13069c1a03f1ad63120f994b04bfd2556925768" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.3.0.tgz#b13069c1a03f1ad63120f994b04bfd2556925768" integrity sha512-HHqYQ6mBeiMc+N038w8LkMpDCRquCHWeNmN3v6645P3NhN2+qXOBqvPqo7Rt1VyCMzKhJ733wZqw5B7cQVFNPg== dependencies: debug "^4.1.0" @@ -17918,6 +18004,11 @@ tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3 resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== +tslib@^2.6.3: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + tslib@~2.0.1: version "2.0.3" resolved "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" @@ -17938,6 +18029,11 @@ tslib@~2.4.0: resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== +tslib@~2.6.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" From 43f7620d7c4f024c7037b420174620cc54020916 Mon Sep 17 00:00:00 2001 From: Michael Giraldo Date: Tue, 7 Apr 2026 20:01:13 -0700 Subject: [PATCH 2/3] build: raise monorepo TypeScript floor to 5.2 --- .eslintignore | 2 + .eslintrc.js | 3 +- package.json | 18 +- .../amplify-codegen-e2e-core/package.json | 4 +- .../amplify-codegen-e2e-tests/package.json | 20 +- packages/appsync-modelgen-plugin/package.json | 19 +- .../appsync-dart-visitor.test.ts.snap | 2124 ++-- ...java-api-lazyload-css-visitor.test.ts.snap | 1398 +-- .../appsync-java-visitor.test.ts.snap | 2290 ++--- .../appsync-javascript-visitor.test.ts.snap | 20 +- ...appsync-json-metadata-visitor.test.ts.snap | 4506 ++++---- ...c-model-introspection-visitor.test.ts.snap | 9016 ++++++++--------- .../appsync-swift-visitor.test.ts.snap | 474 +- .../appsync-typescript-visitor.test.ts.snap | 30 +- .../appsync-visitor.test.ts.snap | 164 +- .../appsync-javascript-visitor.test.ts | 92 +- .../appsync-json-metadata-visitor.test.ts | 1336 +-- .../visitors/appsync-swift-visitor.test.ts | 730 +- .../appsync-dart-visitor.test.ts.snap | 590 +- .../appsync-java-visitor.test.ts.snap | 742 +- .../appsync-javascript-visitor.test.ts.snap | 44 +- .../appsync-swift-visitor.test.ts.snap | 136 +- .../src/types/disposable-compat.d.ts | 7 - packages/graphql-docs-generator/package.json | 25 +- packages/graphql-types-generator/package.json | 25 +- .../test/__snapshots__/jsonOutput.ts.snap | 1678 +-- .../angular/__snapshots__/angularv6.ts.snap | 88 +- .../test/angular/__snapshots__/index.js.snap | 490 +- .../flow/__snapshots__/codeGeneration.js.snap | 204 +- .../graphql-types-generator/test/loading.ts | 19 +- .../__snapshots__/codeGeneration.js.snap | 172 +- .../__snapshots__/codeGeneration.ts.snap | 466 +- .../__snapshots__/codeGeneration.js.snap | 326 +- yarn.lock | 1916 ++-- 34 files changed, 14628 insertions(+), 14546 deletions(-) create mode 100644 .eslintignore delete mode 100644 packages/appsync-modelgen-plugin/src/types/disposable-compat.d.ts diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..efb6ad875 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +packages/graphql-types-generator/fixtures/angular.ts +packages/graphql-types-generator/fixtures/output.ts diff --git a/.eslintrc.js b/.eslintrc.js index f69e5e33e..a3a35b713 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -75,6 +75,7 @@ module.exports = { 'function-paren-newline': 'off', // https://eslint.org/docs/rules/function-paren-newline 'global-require': 'off', // https://eslint.org/docs/rules/global-require 'import/no-dynamic-require': 'off', // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md + 'no-empty-function': ['error', { allow: ['constructors', 'arrowFunctions'] }], 'no-inner-declarations': 'off', // https://eslint.org/docs/rules/no-inner-declarations // New rules @@ -130,7 +131,6 @@ module.exports = { 'no-use-before-define': 'off', // https://eslint.org/docs/rules/no-use-before-define 'prefer-destructuring': 'off', // https://eslint.org/docs/rules/prefer-destructuring 'prefer-object-spread': 'off', // https://eslint.org/docs/rules/prefer-object-spread - '@typescript-eslint/camelcase': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-use-before-define': 'off', @@ -187,7 +187,6 @@ module.exports = { 'default-case': 'off', 'no-return-assign': 'off', 'import/no-duplicates': 'off', - '@typescript-eslint/interface-name-prefix': 'off', 'no-throw-literal': 'off', 'react/static-property-placement': 'off', 'import/no-extraneous-dependencies': ['error', {devDependencies: true}], diff --git a/package.json b/package.json index a4c8e924f..7a7f3b06c 100644 --- a/package.json +++ b/package.json @@ -86,10 +86,10 @@ "@types/cli-progress": "3.11.0", "@types/fs-extra": "^8.0.1", "@types/glob": "^7.2.0", - "@types/jest": "^27.0.0", + "@types/jest": "^29.5.12", "@types/js-yaml": "^4.0.0", - "@typescript-eslint/eslint-plugin": "^4.0.0", - "@typescript-eslint/parser": "^4.0.0", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", "amplify-headless-interface": "^1.13.1", "@aws-sdk/client-codebuild": "^3.996.0", "@aws-sdk/client-s3": "^3.996.0", @@ -116,17 +116,17 @@ "globby": "^11.1.0", "graphql-transformer-core": "^8.0.0", "husky": "^4.0.0", - "jest": "^27.0.0", - "jest-circus": "^27.0.0", - "jest-junit": "^12.0.0", + "jest": "^29.7.0", + "jest-circus": "^29.7.0", + "jest-junit": "^16.0.0", "js-yaml": "^4.0.0", "lnk": "1.1.0", "prettier": "^1.19.1", "pretty-quick": "^4.0.0", "rimraf": "^3.0.0", - "ts-jest": "^27.0.0", - "ts-node": "^8.10.1", - "typescript": "4.7.4" + "ts-jest": "^29.1.2", + "ts-node": "^10.9.2", + "typescript": "5.2.2" }, "resolutions": { "**/@aws-amplify/amplify-codegen-e2e-tests/**/cookie": "^0.7.0", diff --git a/packages/amplify-codegen-e2e-core/package.json b/packages/amplify-codegen-e2e-core/package.json index daa62b6dc..ea5bcf3d7 100644 --- a/packages/amplify-codegen-e2e-core/package.json +++ b/packages/amplify-codegen-e2e-core/package.json @@ -41,8 +41,8 @@ "fs-extra": "^8.1.0", "globby": "^11.1.0", "ini": "^3.0.1", - "jest-circus": "^27.5.1", - "jest-environment-node": "^26.6.2", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", "lodash": "^4.17.19", "node-pty": "1.1.0", "retimer": "2.0.0", diff --git a/packages/amplify-codegen-e2e-tests/package.json b/packages/amplify-codegen-e2e-tests/package.json index 8fd8e0547..dad60d7e4 100644 --- a/packages/amplify-codegen-e2e-tests/package.json +++ b/packages/amplify-codegen-e2e-tests/package.json @@ -53,9 +53,9 @@ }, "devDependencies": { "@aws-amplify/backend": "^1.0.0", - "@types/jest": "^27.0.0", + "@types/jest": "^29.5.12", "graphql": "^15.8.0", - "ts-node": "^8.10.1" + "ts-node": "^10.9.2" }, "peerDependencies": { "@aws-amplify/amplify-cli-core": "^4.4.1", @@ -67,9 +67,16 @@ "testRunner": "@aws-amplify/amplify-codegen-e2e-core/runner", "testEnvironment": "@aws-amplify/amplify-codegen-e2e-core/environment", "transform": { - "^.+\\.tsx?$": "ts-jest" + "^.+\\.tsx?$": [ + "ts-jest", + { + "diagnostics": false + } + ] + }, + "testEnvironmentOptions": { + "url": "http://localhost" }, - "testURL": "http://localhost", "testRegex": "(src/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", "testPathIgnorePatterns": [ "/node_modules/", @@ -106,10 +113,7 @@ "/src/setup-tests.ts" ], "globals": { - "window": {}, - "ts-jest": { - "diagnostics": false - } + "window": {} } }, "jest-junit": { diff --git a/packages/appsync-modelgen-plugin/package.json b/packages/appsync-modelgen-plugin/package.json index e418a7510..76dd7f3b6 100644 --- a/packages/appsync-modelgen-plugin/package.json +++ b/packages/appsync-modelgen-plugin/package.json @@ -21,7 +21,7 @@ "build": "yarn generate-schemas && yarn generate-standalone-validation-function && tsc", "watch": "tsc -w", "test-watch": "jest --watch", - "test": "jest", + "test": "jest --coverage --coverageReporters=clover --coverageReporters=text", "generate-schemas": "ts-node ./scripts/generateSchemas.ts --overwrite", "generate-standalone-validation-function": "ts-node ./scripts/generateStandaloneValidationFunction.ts", "extract-api": "ts-node ../../scripts/extract-api.ts" @@ -61,9 +61,13 @@ }, "jest": { "transform": { - "^.+\\.tsx?$": "ts-jest" + "^.+\\.tsx?$": [ + "ts-jest", + { + "diagnostics": false + } + ] }, - "collectCoverage": true, "collectCoverageFrom": [ "src/**/*.ts" ], @@ -74,16 +78,7 @@ "lines": 80 } }, - "coverageReporters": [ - "clover", - "text" - ], "testRegex": "(src/__tests__/.*.test.ts)$", - "globals": { - "ts-jest": { - "diagnostics": false - } - }, "moduleFileExtensions": [ "ts", "js" diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-dart-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-dart-visitor.test.ts.snap index 960d46142..cdff1f491 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-dart-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-dart-visitor.test.ts.snap @@ -4,14 +4,14 @@ exports[`AppSync Dart Visitor Amplify Core dependency used in imports Should use "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -120,12 +120,12 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"rating=\\" + (_rating != null ? _rating!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"status=\\" + (_status != null ? amplify_core.enumToString(_status)! : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("rating=" + (_rating != null ? _rating!.toString() : "null") + ", "); + buffer.write("status=" + (_status != null ? amplify_core.enumToString(_status)! : "null")); + buffer.write("}"); return buffer.toString(); } @@ -186,16 +186,16 @@ class Post extends amplify_core.Model { 'comments': _comments }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); - static final RATING = amplify_core.QueryField(fieldName: \\"rating\\"); - static final STATUS = amplify_core.QueryField(fieldName: \\"status\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); + static final RATING = amplify_core.QueryField(fieldName: "rating"); + static final STATUS = amplify_core.QueryField(fieldName: "status"); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -310,11 +310,11 @@ class Comment extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"post=\\" + (_post != null ? _post!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\"); - buffer.write(\\"}\\"); + buffer.write("Comment {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", "); + buffer.write("content=" + "$_content"); + buffer.write("}"); return buffer.toString(); } @@ -357,17 +357,17 @@ class Comment extends amplify_core.Model { 'content': _content }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final POST = amplify_core.QueryField( - fieldName: \\"post\\", + fieldName: "post", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment\\"; - modelSchemaDefinition.pluralName = \\"Comments\\"; + modelSchemaDefinition.name = "Comment"; + modelSchemaDefinition.pluralName = "Comments"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"postID\\", \\"content\\"], name: \\"byPost\\") + amplify_core.ModelIndex(fields: const ["postID", "content"], name: "byPost") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -406,14 +406,14 @@ exports[`AppSync Dart Visitor Amplify Core dependency used in imports Should use "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -522,12 +522,12 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"rating=\\" + (_rating != null ? _rating!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"status=\\" + (_status != null ? amplify_core.enumToString(_status)! : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("rating=" + (_rating != null ? _rating!.toString() : "null") + ", "); + buffer.write("status=" + (_status != null ? amplify_core.enumToString(_status)! : "null")); + buffer.write("}"); return buffer.toString(); } @@ -588,16 +588,16 @@ class Post extends amplify_core.Model { 'comments': _comments }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); - static final RATING = amplify_core.QueryField(fieldName: \\"rating\\"); - static final STATUS = amplify_core.QueryField(fieldName: \\"status\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); + static final RATING = amplify_core.QueryField(fieldName: "rating"); + static final STATUS = amplify_core.QueryField(fieldName: "status"); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -712,11 +712,11 @@ class Comment extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"post=\\" + (_post != null ? _post!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\"); - buffer.write(\\"}\\"); + buffer.write("Comment {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", "); + buffer.write("content=" + "$_content"); + buffer.write("}"); return buffer.toString(); } @@ -759,17 +759,17 @@ class Comment extends amplify_core.Model { 'content': _content }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final POST = amplify_core.QueryField( - fieldName: \\"post\\", + fieldName: "post", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment\\"; - modelSchemaDefinition.pluralName = \\"Comments\\"; + modelSchemaDefinition.name = "Comment"; + modelSchemaDefinition.pluralName = "Comments"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"postID\\", \\"content\\"], name: \\"byPost\\") + amplify_core.ModelIndex(fields: const ["postID", "content"], name: "byPost") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -808,14 +808,14 @@ exports[`AppSync Dart Visitor CustomType (non-model) Tests should generate corre "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -927,13 +927,13 @@ class Address { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Address {\\"); - buffer.write(\\"line1=\\" + \\"$_line1\\" + \\", \\"); - buffer.write(\\"line2=\\" + \\"$_line2\\" + \\", \\"); - buffer.write(\\"city=\\" + \\"$_city\\" + \\", \\"); - buffer.write(\\"state=\\" + \\"$_state\\" + \\", \\"); - buffer.write(\\"postalCode=\\" + \\"$_postalCode\\"); - buffer.write(\\"}\\"); + buffer.write("Address {"); + buffer.write("line1=" + "$_line1" + ", "); + buffer.write("line2=" + "$_line2" + ", "); + buffer.write("city=" + "$_city" + ", "); + buffer.write("state=" + "$_state" + ", "); + buffer.write("postalCode=" + "$_postalCode"); + buffer.write("}"); return buffer.toString(); } @@ -983,8 +983,8 @@ class Address { }; static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Address\\"; - modelSchemaDefinition.pluralName = \\"Addresses\\"; + modelSchemaDefinition.name = "Address"; + modelSchemaDefinition.pluralName = "Addresses"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.customTypeField( fieldName: 'line1', @@ -1023,14 +1023,14 @@ exports[`AppSync Dart Visitor CustomType (non-model) Tests should generate corre "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1111,11 +1111,11 @@ class Contact { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Contact {\\"); - buffer.write(\\"contactName=\\" + \\"$_contactName\\" + \\", \\"); - buffer.write(\\"phone=\\" + (_phone != null ? _phone!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"mailingAddresses=\\" + (_mailingAddresses != null ? _mailingAddresses!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Contact {"); + buffer.write("contactName=" + "$_contactName" + ", "); + buffer.write("phone=" + (_phone != null ? _phone!.toString() : "null") + ", "); + buffer.write("mailingAddresses=" + (_mailingAddresses != null ? _mailingAddresses!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -1164,8 +1164,8 @@ class Contact { }; static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Contact\\"; - modelSchemaDefinition.pluralName = \\"Contacts\\"; + modelSchemaDefinition.name = "Contact"; + modelSchemaDefinition.pluralName = "Contacts"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.customTypeField( fieldName: 'contactName', @@ -1193,14 +1193,14 @@ exports[`AppSync Dart Visitor CustomType (non-model) Tests should generate corre "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1224,7 +1224,7 @@ export 'Phone.dart'; class ModelProvider implements amplify_core.ModelProviderInterface { @override - String version = \\"b65f704d832381d9985dd162ae40c075\\"; + String version = "b65f704d832381d9985dd162ae40c075"; @override List modelSchemas = [Person.schema]; @override @@ -1235,10 +1235,10 @@ class ModelProvider implements amplify_core.ModelProviderInterface { amplify_core.ModelType getModelTypeByModelName(String modelName) { switch(modelName) { - case \\"Person\\": + case "Person": return Person.classType; default: - throw Exception(\\"Failed to find model in model provider for model name: \\" + modelName); + throw Exception("Failed to find model in model provider for model name: " + modelName); } } } @@ -1256,14 +1256,14 @@ exports[`AppSync Dart Visitor CustomType (non-model) Tests should generate corre "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1356,12 +1356,12 @@ class Person extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Person {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"phone=\\" + (_phone != null ? _phone!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"mailingAddresses=\\" + (_mailingAddresses != null ? _mailingAddresses!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Person {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("phone=" + (_phone != null ? _phone!.toString() : "null") + ", "); + buffer.write("mailingAddresses=" + (_mailingAddresses != null ? _mailingAddresses!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -1414,13 +1414,13 @@ class Person extends amplify_core.Model { 'mailingAddresses': _mailingAddresses }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final PHONE = amplify_core.QueryField(fieldName: \\"phone\\"); - static final MAILINGADDRESSES = amplify_core.QueryField(fieldName: \\"mailingAddresses\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final PHONE = amplify_core.QueryField(fieldName: "phone"); + static final MAILINGADDRESSES = amplify_core.QueryField(fieldName: "mailingAddresses"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Person\\"; - modelSchemaDefinition.pluralName = \\"People\\"; + modelSchemaDefinition.name = "Person"; + modelSchemaDefinition.pluralName = "People"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -1464,14 +1464,14 @@ exports[`AppSync Dart Visitor Dart Specific Tests should generate the model prov "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1489,7 +1489,7 @@ export 'SimpleModel.dart'; class ModelProvider implements amplify_core.ModelProviderInterface { @override - String version = \\"20078c21a81919792555926e238b194e\\"; + String version = "20078c21a81919792555926e238b194e"; @override List modelSchemas = [SimpleModel.schema]; @override @@ -1500,10 +1500,10 @@ class ModelProvider implements amplify_core.ModelProviderInterface { amplify_core.ModelType getModelTypeByModelName(String modelName) { switch(modelName) { - case \\"SimpleModel\\": + case "SimpleModel": return SimpleModel.classType; default: - throw Exception(\\"Failed to find model in model provider for model name: \\" + modelName); + throw Exception("Failed to find model in model provider for model name: " + modelName); } } } @@ -1521,14 +1521,14 @@ exports[`AppSync Dart Visitor Enum Generation should generate a class for enum t "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1588,10 +1588,10 @@ class SimpleModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"SimpleModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"status=\\" + (_status != null ? amplify_core.enumToString(_status)! : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("SimpleModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("status=" + (_status != null ? amplify_core.enumToString(_status)! : "null")); + buffer.write("}"); return buffer.toString(); } @@ -1625,11 +1625,11 @@ class SimpleModel extends amplify_core.Model { 'status': _status }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final STATUS = amplify_core.QueryField(fieldName: \\"status\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final STATUS = amplify_core.QueryField(fieldName: "status"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"SimpleModel\\"; - modelSchemaDefinition.pluralName = \\"SimpleModels\\"; + modelSchemaDefinition.name = "SimpleModel"; + modelSchemaDefinition.pluralName = "SimpleModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -1660,14 +1660,14 @@ exports[`AppSync Dart Visitor Enum Generation should generate a class for enum t "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1689,14 +1689,14 @@ exports[`AppSync Dart Visitor Field tests should generate correct output for app "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1820,19 +1820,19 @@ class TemporalTimeModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"TemporalTimeModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"date=\\" + (_date != null ? _date!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"time=\\" + (_time != null ? _time!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"dateTime=\\" + (_dateTime != null ? _dateTime!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"timestamp=\\" + (_timestamp != null ? _timestamp!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"intNum=\\" + (_intNum != null ? _intNum!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"dateList=\\" + (_dateList != null ? _dateList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"timeList=\\" + (_timeList != null ? _timeList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"dateTimeList=\\" + (_dateTimeList != null ? _dateTimeList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"timestampList=\\" + (_timestampList != null ? _timestampList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"intList=\\" + (_intList != null ? _intList!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("TemporalTimeModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("date=" + (_date != null ? _date!.format() : "null") + ", "); + buffer.write("time=" + (_time != null ? _time!.format() : "null") + ", "); + buffer.write("dateTime=" + (_dateTime != null ? _dateTime!.format() : "null") + ", "); + buffer.write("timestamp=" + (_timestamp != null ? _timestamp!.toString() : "null") + ", "); + buffer.write("intNum=" + (_intNum != null ? _intNum!.toString() : "null") + ", "); + buffer.write("dateList=" + (_dateList != null ? _dateList!.toString() : "null") + ", "); + buffer.write("timeList=" + (_timeList != null ? _timeList!.toString() : "null") + ", "); + buffer.write("dateTimeList=" + (_dateTimeList != null ? _dateTimeList!.toString() : "null") + ", "); + buffer.write("timestampList=" + (_timestampList != null ? _timestampList!.toString() : "null") + ", "); + buffer.write("intList=" + (_intList != null ? _intList!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -1911,20 +1911,20 @@ class TemporalTimeModel extends amplify_core.Model { 'intList': _intList }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final DATE = amplify_core.QueryField(fieldName: \\"date\\"); - static final TIME = amplify_core.QueryField(fieldName: \\"time\\"); - static final DATETIME = amplify_core.QueryField(fieldName: \\"dateTime\\"); - static final TIMESTAMP = amplify_core.QueryField(fieldName: \\"timestamp\\"); - static final INTNUM = amplify_core.QueryField(fieldName: \\"intNum\\"); - static final DATELIST = amplify_core.QueryField(fieldName: \\"dateList\\"); - static final TIMELIST = amplify_core.QueryField(fieldName: \\"timeList\\"); - static final DATETIMELIST = amplify_core.QueryField(fieldName: \\"dateTimeList\\"); - static final TIMESTAMPLIST = amplify_core.QueryField(fieldName: \\"timestampList\\"); - static final INTLIST = amplify_core.QueryField(fieldName: \\"intList\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final DATE = amplify_core.QueryField(fieldName: "date"); + static final TIME = amplify_core.QueryField(fieldName: "time"); + static final DATETIME = amplify_core.QueryField(fieldName: "dateTime"); + static final TIMESTAMP = amplify_core.QueryField(fieldName: "timestamp"); + static final INTNUM = amplify_core.QueryField(fieldName: "intNum"); + static final DATELIST = amplify_core.QueryField(fieldName: "dateList"); + static final TIMELIST = amplify_core.QueryField(fieldName: "timeList"); + static final DATETIMELIST = amplify_core.QueryField(fieldName: "dateTimeList"); + static final TIMESTAMPLIST = amplify_core.QueryField(fieldName: "timestampList"); + static final INTLIST = amplify_core.QueryField(fieldName: "intList"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"TemporalTimeModel\\"; - modelSchemaDefinition.pluralName = \\"TemporalTimeModels\\"; + modelSchemaDefinition.name = "TemporalTimeModel"; + modelSchemaDefinition.pluralName = "TemporalTimeModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2014,14 +2014,14 @@ exports[`AppSync Dart Visitor Field tests should generate correct output for enu "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2144,15 +2144,15 @@ class TestEnumModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"TestEnumModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"enumVal=\\" + (_enumVal != null ? amplify_core.enumToString(_enumVal)! : \\"null\\") + \\", \\"); - buffer.write(\\"nullableEnumVal=\\" + (_nullableEnumVal != null ? amplify_core.enumToString(_nullableEnumVal)! : \\"null\\") + \\", \\"); - buffer.write(\\"enumList=\\" + (_enumList != null ? _enumList!.map((e) => amplify_core.enumToString(e)).toString() : \\"null\\") + \\", \\"); - buffer.write(\\"enumNullableList=\\" + (_enumNullableList != null ? _enumNullableList!.map((e) => amplify_core.enumToString(e)).toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableEnumList=\\" + (_nullableEnumList != null ? _nullableEnumList!.map((e) => amplify_core.enumToString(e)).toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableEnumNullableList=\\" + (_nullableEnumNullableList != null ? _nullableEnumNullableList!.map((e) => amplify_core.enumToString(e)).toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("TestEnumModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("enumVal=" + (_enumVal != null ? amplify_core.enumToString(_enumVal)! : "null") + ", "); + buffer.write("nullableEnumVal=" + (_nullableEnumVal != null ? amplify_core.enumToString(_nullableEnumVal)! : "null") + ", "); + buffer.write("enumList=" + (_enumList != null ? _enumList!.map((e) => amplify_core.enumToString(e)).toString() : "null") + ", "); + buffer.write("enumNullableList=" + (_enumNullableList != null ? _enumNullableList!.map((e) => amplify_core.enumToString(e)).toString() : "null") + ", "); + buffer.write("nullableEnumList=" + (_nullableEnumList != null ? _nullableEnumList!.map((e) => amplify_core.enumToString(e)).toString() : "null") + ", "); + buffer.write("nullableEnumNullableList=" + (_nullableEnumNullableList != null ? _nullableEnumNullableList!.map((e) => amplify_core.enumToString(e)).toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -2227,16 +2227,16 @@ class TestEnumModel extends amplify_core.Model { 'nullableEnumNullableList': _nullableEnumNullableList }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final ENUMVAL = amplify_core.QueryField(fieldName: \\"enumVal\\"); - static final NULLABLEENUMVAL = amplify_core.QueryField(fieldName: \\"nullableEnumVal\\"); - static final ENUMLIST = amplify_core.QueryField(fieldName: \\"enumList\\"); - static final ENUMNULLABLELIST = amplify_core.QueryField(fieldName: \\"enumNullableList\\"); - static final NULLABLEENUMLIST = amplify_core.QueryField(fieldName: \\"nullableEnumList\\"); - static final NULLABLEENUMNULLABLELIST = amplify_core.QueryField(fieldName: \\"nullableEnumNullableList\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final ENUMVAL = amplify_core.QueryField(fieldName: "enumVal"); + static final NULLABLEENUMVAL = amplify_core.QueryField(fieldName: "nullableEnumVal"); + static final ENUMLIST = amplify_core.QueryField(fieldName: "enumList"); + static final ENUMNULLABLELIST = amplify_core.QueryField(fieldName: "enumNullableList"); + static final NULLABLEENUMLIST = amplify_core.QueryField(fieldName: "nullableEnumList"); + static final NULLABLEENUMNULLABLELIST = amplify_core.QueryField(fieldName: "nullableEnumNullableList"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"TestEnumModel\\"; - modelSchemaDefinition.pluralName = \\"TestEnumModels\\"; + modelSchemaDefinition.name = "TestEnumModel"; + modelSchemaDefinition.pluralName = "TestEnumModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2301,14 +2301,14 @@ exports[`AppSync Dart Visitor Field tests should generate correct output for reg "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2431,15 +2431,15 @@ class TestModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"TestModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"floatVal=\\" + (_floatVal != null ? _floatVal!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"floatNullableVal=\\" + (_floatNullableVal != null ? _floatNullableVal!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"floatList=\\" + (_floatList != null ? _floatList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"floatNullableList=\\" + (_floatNullableList != null ? _floatNullableList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableFloatList=\\" + (_nullableFloatList != null ? _nullableFloatList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableFloatNullableList=\\" + (_nullableFloatNullableList != null ? _nullableFloatNullableList!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("TestModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("floatVal=" + (_floatVal != null ? _floatVal!.toString() : "null") + ", "); + buffer.write("floatNullableVal=" + (_floatNullableVal != null ? _floatNullableVal!.toString() : "null") + ", "); + buffer.write("floatList=" + (_floatList != null ? _floatList!.toString() : "null") + ", "); + buffer.write("floatNullableList=" + (_floatNullableList != null ? _floatNullableList!.toString() : "null") + ", "); + buffer.write("nullableFloatList=" + (_nullableFloatList != null ? _nullableFloatList!.toString() : "null") + ", "); + buffer.write("nullableFloatNullableList=" + (_nullableFloatNullableList != null ? _nullableFloatNullableList!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -2498,16 +2498,16 @@ class TestModel extends amplify_core.Model { 'nullableFloatNullableList': _nullableFloatNullableList }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final FLOATVAL = amplify_core.QueryField(fieldName: \\"floatVal\\"); - static final FLOATNULLABLEVAL = amplify_core.QueryField(fieldName: \\"floatNullableVal\\"); - static final FLOATLIST = amplify_core.QueryField(fieldName: \\"floatList\\"); - static final FLOATNULLABLELIST = amplify_core.QueryField(fieldName: \\"floatNullableList\\"); - static final NULLABLEFLOATLIST = amplify_core.QueryField(fieldName: \\"nullableFloatList\\"); - static final NULLABLEFLOATNULLABLELIST = amplify_core.QueryField(fieldName: \\"nullableFloatNullableList\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final FLOATVAL = amplify_core.QueryField(fieldName: "floatVal"); + static final FLOATNULLABLEVAL = amplify_core.QueryField(fieldName: "floatNullableVal"); + static final FLOATLIST = amplify_core.QueryField(fieldName: "floatList"); + static final FLOATNULLABLELIST = amplify_core.QueryField(fieldName: "floatNullableList"); + static final NULLABLEFLOATLIST = amplify_core.QueryField(fieldName: "nullableFloatList"); + static final NULLABLEFLOATNULLABLELIST = amplify_core.QueryField(fieldName: "nullableFloatNullableList"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"TestModel\\"; - modelSchemaDefinition.pluralName = \\"TestModels\\"; + modelSchemaDefinition.name = "TestModel"; + modelSchemaDefinition.pluralName = "TestModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2572,14 +2572,14 @@ exports[`AppSync Dart Visitor Many To Many V2 Tests Should generate the intermed "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2663,11 +2663,11 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\"); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("content=" + "$_content"); + buffer.write("}"); return buffer.toString(); } @@ -2723,15 +2723,15 @@ class Post extends amplify_core.Model { 'tags': _tags }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final TAGS = amplify_core.QueryField( - fieldName: \\"tags\\", + fieldName: "tags", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'PostTags')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2831,10 +2831,10 @@ class Tag extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Tag {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"label=\\" + \\"$_label\\"); - buffer.write(\\"}\\"); + buffer.write("Tag {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("label=" + "$_label"); + buffer.write("}"); return buffer.toString(); } @@ -2885,14 +2885,14 @@ class Tag extends amplify_core.Model { 'posts': _posts }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final LABEL = amplify_core.QueryField(fieldName: \\"label\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final LABEL = amplify_core.QueryField(fieldName: "label"); static final POSTS = amplify_core.QueryField( - fieldName: \\"posts\\", + fieldName: "posts", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'PostTags')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Tag\\"; - modelSchemaDefinition.pluralName = \\"Tags\\"; + modelSchemaDefinition.name = "Tag"; + modelSchemaDefinition.pluralName = "Tags"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2995,11 +2995,11 @@ class PostTags extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"PostTags {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"post=\\" + (_post != null ? _post!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"tag=\\" + (_tag != null ? _tag!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("PostTags {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", "); + buffer.write("tag=" + (_tag != null ? _tag!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -3046,20 +3046,20 @@ class PostTags extends amplify_core.Model { 'tag': _tag }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final POST = amplify_core.QueryField( - fieldName: \\"post\\", + fieldName: "post", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); static final TAG = amplify_core.QueryField( - fieldName: \\"tag\\", + fieldName: "tag", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Tag')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"PostTags\\"; - modelSchemaDefinition.pluralName = \\"PostTags\\"; + modelSchemaDefinition.name = "PostTags"; + modelSchemaDefinition.pluralName = "PostTags"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"postID\\"], name: \\"byPost\\"), - amplify_core.ModelIndex(fields: const [\\"tagID\\"], name: \\"byTag\\") + amplify_core.ModelIndex(fields: const ["postID"], name: "byPost"), + amplify_core.ModelIndex(fields: const ["tagID"], name: "byTag") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3099,14 +3099,14 @@ exports[`AppSync Dart Visitor Model Directive should generate a class for a Simp "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3173,11 +3173,11 @@ class SimpleModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"SimpleModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("SimpleModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -3216,12 +3216,12 @@ class SimpleModel extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"SimpleModel\\"; - modelSchemaDefinition.pluralName = \\"SimpleModels\\"; + modelSchemaDefinition.name = "SimpleModel"; + modelSchemaDefinition.pluralName = "SimpleModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3258,14 +3258,14 @@ exports[`AppSync Dart Visitor Model Directive should generate a class for a mode "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3332,11 +3332,11 @@ class SimpleModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"SimpleModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("SimpleModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -3375,12 +3375,12 @@ class SimpleModel extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"SimpleModel\\"; - modelSchemaDefinition.pluralName = \\"SimpleModels\\"; + modelSchemaDefinition.name = "SimpleModel"; + modelSchemaDefinition.pluralName = "SimpleModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3417,14 +3417,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should generate AuthRule "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3503,12 +3503,12 @@ class TodoWithAuth extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"TodoWithAuth {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("TodoWithAuth {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -3546,17 +3546,17 @@ class TodoWithAuth extends amplify_core.Model { 'updatedAt': _updatedAt }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"TodoWithAuth\\"; - modelSchemaDefinition.pluralName = \\"TodoWithAuths\\"; + modelSchemaDefinition.name = "TodoWithAuth"; + modelSchemaDefinition.pluralName = "TodoWithAuths"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.GROUPS, - groupClaim: \\"cognito:groups\\", - groups: [ \\"admin\\" ], + groupClaim: "cognito:groups", + groups: [ "admin" ], provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -3566,8 +3566,8 @@ class TodoWithAuth extends amplify_core.Model { ]), amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.OWNER, - ownerField: \\"owner\\", - identityClaim: \\"cognito:username\\", + ownerField: "owner", + identityClaim: "cognito:username", provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -3624,14 +3624,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should generate class wi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3698,11 +3698,11 @@ class customClaim extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"customClaim {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("customClaim {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -3741,18 +3741,18 @@ class customClaim extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"customClaim\\"; - modelSchemaDefinition.pluralName = \\"customClaims\\"; + modelSchemaDefinition.name = "customClaim"; + modelSchemaDefinition.pluralName = "customClaims"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.OWNER, - ownerField: \\"owner\\", - identityClaim: \\"user_id\\", + ownerField: "owner", + identityClaim: "user_id", provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -3797,14 +3797,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should generate class wi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3871,11 +3871,11 @@ class customClaim extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"customClaim {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("customClaim {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -3914,18 +3914,18 @@ class customClaim extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"customClaim\\"; - modelSchemaDefinition.pluralName = \\"customClaims\\"; + modelSchemaDefinition.name = "customClaim"; + modelSchemaDefinition.pluralName = "customClaims"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.GROUPS, - groupClaim: \\"user_groups\\", - groups: [ \\"Moderator\\" ], + groupClaim: "user_groups", + groups: [ "Moderator" ], provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -3970,14 +3970,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should generate class wi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -4044,11 +4044,11 @@ class dynamicGroups extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"dynamicGroups {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("dynamicGroups {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -4087,18 +4087,18 @@ class dynamicGroups extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"dynamicGroups\\"; - modelSchemaDefinition.pluralName = \\"dynamicGroups\\"; + modelSchemaDefinition.name = "dynamicGroups"; + modelSchemaDefinition.pluralName = "dynamicGroups"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.GROUPS, - groupClaim: \\"cognito:groups\\", - groupsField: \\"groups\\", + groupClaim: "cognito:groups", + groupsField: "groups", provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -4143,14 +4143,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should generate class wi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -4217,11 +4217,11 @@ class simpleOwnerAuth extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"simpleOwnerAuth {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("simpleOwnerAuth {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -4260,18 +4260,18 @@ class simpleOwnerAuth extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"simpleOwnerAuth\\"; - modelSchemaDefinition.pluralName = \\"simpleOwnerAuths\\"; + modelSchemaDefinition.name = "simpleOwnerAuth"; + modelSchemaDefinition.pluralName = "simpleOwnerAuths"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.OWNER, - ownerField: \\"owner\\", - identityClaim: \\"cognito:username\\", + ownerField: "owner", + identityClaim: "cognito:username", provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -4316,14 +4316,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should generate class wi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -4390,11 +4390,11 @@ class allowRead extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"allowRead {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("allowRead {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -4433,18 +4433,18 @@ class allowRead extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"allowRead\\"; - modelSchemaDefinition.pluralName = \\"allowReads\\"; + modelSchemaDefinition.name = "allowRead"; + modelSchemaDefinition.pluralName = "allowReads"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.OWNER, - ownerField: \\"owner\\", - identityClaim: \\"cognito:username\\", + ownerField: "owner", + identityClaim: "cognito:username", provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -4488,14 +4488,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should generate class wi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -4562,11 +4562,11 @@ class privateType extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"privateType {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("privateType {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -4605,12 +4605,12 @@ class privateType extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"privateType\\"; - modelSchemaDefinition.pluralName = \\"privateTypes\\"; + modelSchemaDefinition.name = "privateType"; + modelSchemaDefinition.pluralName = "privateTypes"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( @@ -4658,14 +4658,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should generate class wi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -4732,11 +4732,11 @@ class publicType extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"publicType {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("publicType {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -4775,12 +4775,12 @@ class publicType extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"publicType\\"; - modelSchemaDefinition.pluralName = \\"publicTypes\\"; + modelSchemaDefinition.name = "publicType"; + modelSchemaDefinition.pluralName = "publicTypes"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( @@ -4828,14 +4828,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should generate class wi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -4902,11 +4902,11 @@ class staticGroups extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"staticGroups {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"bar=\\" + \\"$_bar\\"); - buffer.write(\\"}\\"); + buffer.write("staticGroups {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("bar=" + "$_bar"); + buffer.write("}"); return buffer.toString(); } @@ -4945,18 +4945,18 @@ class staticGroups extends amplify_core.Model { 'bar': _bar }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final BAR = amplify_core.QueryField(fieldName: \\"bar\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final BAR = amplify_core.QueryField(fieldName: "bar"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"staticGroups\\"; - modelSchemaDefinition.pluralName = \\"staticGroups\\"; + modelSchemaDefinition.name = "staticGroups"; + modelSchemaDefinition.pluralName = "staticGroups"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.GROUPS, - groupClaim: \\"cognito:groups\\", - groups: [ \\"Admin\\" ], + groupClaim: "cognito:groups", + groups: [ "Admin" ], provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -5001,14 +5001,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should include authRules "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -5093,11 +5093,11 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"author=\\" + \\"$_author\\"); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("author=" + "$_author"); + buffer.write("}"); return buffer.toString(); } @@ -5136,18 +5136,18 @@ class Post extends amplify_core.Model { 'author': _author }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); - static final AUTHOR = amplify_core.QueryField(fieldName: \\"author\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); + static final AUTHOR = amplify_core.QueryField(fieldName: "author"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.OWNER, - ownerField: \\"author\\", - identityClaim: \\"cognito:username\\", + ownerField: "author", + identityClaim: "cognito:username", provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -5192,14 +5192,14 @@ exports[`AppSync Dart Visitor Model with Auth Directive should support multiple "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -5284,11 +5284,11 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"owner=\\" + \\"$_owner\\"); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("owner=" + "$_owner"); + buffer.write("}"); return buffer.toString(); } @@ -5327,18 +5327,18 @@ class Post extends amplify_core.Model { 'owner': _owner }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); - static final OWNER = amplify_core.QueryField(fieldName: \\"owner\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); + static final OWNER = amplify_core.QueryField(fieldName: "owner"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.GROUPS, - groupClaim: \\"cognito:groups\\", - groups: [ \\"admin\\" ], + groupClaim: "cognito:groups", + groups: [ "admin" ], provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -5348,8 +5348,8 @@ class Post extends amplify_core.Model { ]), amplify_core.AuthRule( authStrategy: amplify_core.AuthStrategy.OWNER, - ownerField: \\"owner\\", - identityClaim: \\"cognito:username\\", + ownerField: "owner", + identityClaim: "cognito:username", provider: amplify_core.AuthRuleProvider.USERPOOLS, operations: const [ amplify_core.ModelOperation.CREATE, @@ -5400,14 +5400,14 @@ exports[`AppSync Dart Visitor Model with Connection Directive should generate cl "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -5468,9 +5468,9 @@ class Todo extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Todo {\\"); - buffer.write(\\"id=\\" + \\"$id\\"); - buffer.write(\\"}\\"); + buffer.write("Todo {"); + buffer.write("id=" + "$id"); + buffer.write("}"); return buffer.toString(); } @@ -5516,13 +5516,13 @@ class Todo extends amplify_core.Model { 'tasks': _tasks }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final TASKS = amplify_core.QueryField( - fieldName: \\"tasks\\", + fieldName: "tasks", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Task')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Todo\\"; - modelSchemaDefinition.pluralName = \\"Todos\\"; + modelSchemaDefinition.name = "Todo"; + modelSchemaDefinition.pluralName = "Todos"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -5554,14 +5554,14 @@ exports[`AppSync Dart Visitor Model with Connection Directive should generate cl "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -5621,10 +5621,10 @@ class Task extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Task {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"todo=\\" + (_todo != null ? _todo!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Task {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("todo=" + (_todo != null ? _todo!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -5662,13 +5662,13 @@ class Task extends amplify_core.Model { 'todo': _todo }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final TODO = amplify_core.QueryField( - fieldName: \\"todo\\", + fieldName: "todo", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Todo')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Task\\"; - modelSchemaDefinition.pluralName = \\"Tasks\\"; + modelSchemaDefinition.name = "Task"; + modelSchemaDefinition.pluralName = "Tasks"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -5700,14 +5700,14 @@ exports[`AppSync Dart Visitor Model with Connection Directive should support con "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -5791,11 +5791,11 @@ class Blog extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Blog {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"test=\\" + (_test != null ? _test!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Blog {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("test=" + (_test != null ? _test!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -5851,15 +5851,15 @@ class Blog extends amplify_core.Model { 'test': _test }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final POSTS = amplify_core.QueryField( - fieldName: \\"posts\\", + fieldName: "posts", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); - static final TEST = amplify_core.QueryField(fieldName: \\"test\\"); + static final TEST = amplify_core.QueryField(fieldName: "test"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Blog\\"; - modelSchemaDefinition.pluralName = \\"Blogs\\"; + modelSchemaDefinition.name = "Blog"; + modelSchemaDefinition.pluralName = "Blogs"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -5904,14 +5904,14 @@ exports[`AppSync Dart Visitor Model with Connection Directive should support con "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -5987,11 +5987,11 @@ class Comment extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"post=\\" + (_post != null ? _post!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\"); - buffer.write(\\"}\\"); + buffer.write("Comment {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", "); + buffer.write("content=" + "$_content"); + buffer.write("}"); return buffer.toString(); } @@ -6034,17 +6034,17 @@ class Comment extends amplify_core.Model { 'content': _content }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final POST = amplify_core.QueryField( - fieldName: \\"post\\", + fieldName: "post", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment\\"; - modelSchemaDefinition.pluralName = \\"Comments\\"; + modelSchemaDefinition.name = "Comment"; + modelSchemaDefinition.pluralName = "Comments"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"postID\\", \\"content\\"], name: \\"byPost\\") + amplify_core.ModelIndex(fields: const ["postID", "content"], name: "byPost") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -6083,14 +6083,14 @@ exports[`AppSync Dart Visitor Model with Connection Directive should support con "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -6174,11 +6174,11 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"blog=\\" + (_blog != null ? _blog!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("blog=" + (_blog != null ? _blog!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -6238,20 +6238,20 @@ class Post extends amplify_core.Model { 'comments': _comments }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static final BLOG = amplify_core.QueryField( - fieldName: \\"blog\\", + fieldName: "blog", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Blog')); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"blogID\\"], name: \\"byBlog\\") + amplify_core.ModelIndex(fields: const ["blogID"], name: "byBlog") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -6297,14 +6297,14 @@ exports[`AppSync Dart Visitor Model with Key Directive should generate a class f "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -6403,13 +6403,13 @@ class authorBook extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"authorBook {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"author_id=\\" + \\"$_author_id\\" + \\", \\"); - buffer.write(\\"book_id=\\" + \\"$_book_id\\" + \\", \\"); - buffer.write(\\"author=\\" + \\"$_author\\" + \\", \\"); - buffer.write(\\"book=\\" + \\"$_book\\"); - buffer.write(\\"}\\"); + buffer.write("authorBook {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("author_id=" + "$_author_id" + ", "); + buffer.write("book_id=" + "$_book_id" + ", "); + buffer.write("author=" + "$_author" + ", "); + buffer.write("book=" + "$_book"); + buffer.write("}"); return buffer.toString(); } @@ -6458,18 +6458,18 @@ class authorBook extends amplify_core.Model { 'book': _book }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final AUTHOR_ID = amplify_core.QueryField(fieldName: \\"author_id\\"); - static final BOOK_ID = amplify_core.QueryField(fieldName: \\"book_id\\"); - static final AUTHOR = amplify_core.QueryField(fieldName: \\"author\\"); - static final BOOK = amplify_core.QueryField(fieldName: \\"book\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final AUTHOR_ID = amplify_core.QueryField(fieldName: "author_id"); + static final BOOK_ID = amplify_core.QueryField(fieldName: "book_id"); + static final AUTHOR = amplify_core.QueryField(fieldName: "author"); + static final BOOK = amplify_core.QueryField(fieldName: "book"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"authorBook\\"; - modelSchemaDefinition.pluralName = \\"authorBooks\\"; + modelSchemaDefinition.name = "authorBook"; + modelSchemaDefinition.pluralName = "authorBooks"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"author_id\\"], name: \\"byAuthor\\"), - amplify_core.ModelIndex(fields: const [\\"book_id\\"], name: \\"byBook\\") + amplify_core.ModelIndex(fields: const ["author_id"], name: "byAuthor"), + amplify_core.ModelIndex(fields: const ["book_id"], name: "byBook") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -6519,14 +6519,14 @@ exports[`AppSync Dart Visitor Null Safety Tests should generate correct internal "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -6579,9 +6579,9 @@ class TestModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"TestModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\"); - buffer.write(\\"}\\"); + buffer.write("TestModel {"); + buffer.write("id=" + "$id"); + buffer.write("}"); return buffer.toString(); } @@ -6610,10 +6610,10 @@ class TestModel extends amplify_core.Model { 'id': id }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"TestModel\\"; - modelSchemaDefinition.pluralName = \\"TestModels\\"; + modelSchemaDefinition.name = "TestModel"; + modelSchemaDefinition.pluralName = "TestModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); }); @@ -6638,14 +6638,14 @@ exports[`AppSync Dart Visitor Null Safety Tests should generate correct model fi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -6722,10 +6722,10 @@ class Blog extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Blog {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\"); - buffer.write(\\"}\\"); + buffer.write("Blog {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name"); + buffer.write("}"); return buffer.toString(); } @@ -6776,14 +6776,14 @@ class Blog extends amplify_core.Model { 'posts': _posts }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final POSTS = amplify_core.QueryField( - fieldName: \\"posts\\", + fieldName: "posts", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Blog\\"; - modelSchemaDefinition.pluralName = \\"Blogs\\"; + modelSchemaDefinition.name = "Blog"; + modelSchemaDefinition.pluralName = "Blogs"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -6821,14 +6821,14 @@ exports[`AppSync Dart Visitor Null Safety Tests should generate correct model fi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -6904,11 +6904,11 @@ class Comment extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"post=\\" + (_post != null ? _post!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\"); - buffer.write(\\"}\\"); + buffer.write("Comment {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", "); + buffer.write("content=" + "$_content"); + buffer.write("}"); return buffer.toString(); } @@ -6951,17 +6951,17 @@ class Comment extends amplify_core.Model { 'content': _content }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final POST = amplify_core.QueryField( - fieldName: \\"post\\", + fieldName: "post", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment\\"; - modelSchemaDefinition.pluralName = \\"Comments\\"; + modelSchemaDefinition.name = "Comment"; + modelSchemaDefinition.pluralName = "Comments"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"postID\\", \\"content\\"], name: \\"byPost\\") + amplify_core.ModelIndex(fields: const ["postID", "content"], name: "byPost") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -7000,14 +7000,14 @@ exports[`AppSync Dart Visitor Null Safety Tests should generate correct model fi "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -7091,11 +7091,11 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"blog=\\" + (_blog != null ? _blog!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("blog=" + (_blog != null ? _blog!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -7155,20 +7155,20 @@ class Post extends amplify_core.Model { 'comments': _comments }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static final BLOG = amplify_core.QueryField( - fieldName: \\"blog\\", + fieldName: "blog", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Blog')); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"blogID\\"], name: \\"byBlog\\") + amplify_core.ModelIndex(fields: const ["blogID"], name: "byBlog") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -7214,14 +7214,14 @@ exports[`AppSync Dart Visitor Null Safety Tests should generate correct null saf "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -7289,9 +7289,9 @@ class TestModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"TestModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\"); - buffer.write(\\"}\\"); + buffer.write("TestModel {"); + buffer.write("id=" + "$id"); + buffer.write("}"); return buffer.toString(); } @@ -7354,16 +7354,16 @@ class TestModel extends amplify_core.Model { 'nullableListOfModels': _nullableListOfModels }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final LISTOFMODELS = amplify_core.QueryField( - fieldName: \\"listOfModels\\", + fieldName: "listOfModels", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'ListItem')); static final NULLABLELISTOFMODELS = amplify_core.QueryField( - fieldName: \\"nullableListOfModels\\", + fieldName: "nullableListOfModels", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'ListItem')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"TestModel\\"; - modelSchemaDefinition.pluralName = \\"TestModels\\"; + modelSchemaDefinition.name = "TestModel"; + modelSchemaDefinition.pluralName = "TestModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -7402,14 +7402,14 @@ exports[`AppSync Dart Visitor Null Safety Tests should generate correct null saf "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -7532,15 +7532,15 @@ class TestModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"TestModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"floatVal=\\" + (_floatVal != null ? _floatVal!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"floatNullableVal=\\" + (_floatNullableVal != null ? _floatNullableVal!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"floatList=\\" + (_floatList != null ? _floatList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"floatNullableList=\\" + (_floatNullableList != null ? _floatNullableList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableFloatList=\\" + (_nullableFloatList != null ? _nullableFloatList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableFloatNullableList=\\" + (_nullableFloatNullableList != null ? _nullableFloatNullableList!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("TestModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("floatVal=" + (_floatVal != null ? _floatVal!.toString() : "null") + ", "); + buffer.write("floatNullableVal=" + (_floatNullableVal != null ? _floatNullableVal!.toString() : "null") + ", "); + buffer.write("floatList=" + (_floatList != null ? _floatList!.toString() : "null") + ", "); + buffer.write("floatNullableList=" + (_floatNullableList != null ? _floatNullableList!.toString() : "null") + ", "); + buffer.write("nullableFloatList=" + (_nullableFloatList != null ? _nullableFloatList!.toString() : "null") + ", "); + buffer.write("nullableFloatNullableList=" + (_nullableFloatNullableList != null ? _nullableFloatNullableList!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -7599,16 +7599,16 @@ class TestModel extends amplify_core.Model { 'nullableFloatNullableList': _nullableFloatNullableList }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final FLOATVAL = amplify_core.QueryField(fieldName: \\"floatVal\\"); - static final FLOATNULLABLEVAL = amplify_core.QueryField(fieldName: \\"floatNullableVal\\"); - static final FLOATLIST = amplify_core.QueryField(fieldName: \\"floatList\\"); - static final FLOATNULLABLELIST = amplify_core.QueryField(fieldName: \\"floatNullableList\\"); - static final NULLABLEFLOATLIST = amplify_core.QueryField(fieldName: \\"nullableFloatList\\"); - static final NULLABLEFLOATNULLABLELIST = amplify_core.QueryField(fieldName: \\"nullableFloatNullableList\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final FLOATVAL = amplify_core.QueryField(fieldName: "floatVal"); + static final FLOATNULLABLEVAL = amplify_core.QueryField(fieldName: "floatNullableVal"); + static final FLOATLIST = amplify_core.QueryField(fieldName: "floatList"); + static final FLOATNULLABLELIST = amplify_core.QueryField(fieldName: "floatNullableList"); + static final NULLABLEFLOATLIST = amplify_core.QueryField(fieldName: "nullableFloatList"); + static final NULLABLEFLOATNULLABLELIST = amplify_core.QueryField(fieldName: "nullableFloatNullableList"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"TestModel\\"; - modelSchemaDefinition.pluralName = \\"TestModels\\"; + modelSchemaDefinition.name = "TestModel"; + modelSchemaDefinition.pluralName = "TestModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -7673,14 +7673,14 @@ exports[`AppSync Dart Visitor Null Safety Tests should generate correct null saf "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -7872,21 +7872,21 @@ class TestModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"TestModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"floatVal=\\" + (_floatVal != null ? _floatVal!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"floatNullableVal=\\" + (_floatNullableVal != null ? _floatNullableVal!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"floatList=\\" + (_floatList != null ? _floatList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"floatNullableList=\\" + (_floatNullableList != null ? _floatNullableList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableFloatList=\\" + (_nullableFloatList != null ? _nullableFloatList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableFloatNullableList=\\" + (_nullableFloatNullableList != null ? _nullableFloatNullableList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"intVal=\\" + (_intVal != null ? _intVal!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"intNullableVal=\\" + (_intNullableVal != null ? _intNullableVal!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"intList=\\" + (_intList != null ? _intList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"intNullableList=\\" + (_intNullableList != null ? _intNullableList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableIntList=\\" + (_nullableIntList != null ? _nullableIntList!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"nullableIntNullableList=\\" + (_nullableIntNullableList != null ? _nullableIntNullableList!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("TestModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("floatVal=" + (_floatVal != null ? _floatVal!.toString() : "null") + ", "); + buffer.write("floatNullableVal=" + (_floatNullableVal != null ? _floatNullableVal!.toString() : "null") + ", "); + buffer.write("floatList=" + (_floatList != null ? _floatList!.toString() : "null") + ", "); + buffer.write("floatNullableList=" + (_floatNullableList != null ? _floatNullableList!.toString() : "null") + ", "); + buffer.write("nullableFloatList=" + (_nullableFloatList != null ? _nullableFloatList!.toString() : "null") + ", "); + buffer.write("nullableFloatNullableList=" + (_nullableFloatNullableList != null ? _nullableFloatNullableList!.toString() : "null") + ", "); + buffer.write("intVal=" + (_intVal != null ? _intVal!.toString() : "null") + ", "); + buffer.write("intNullableVal=" + (_intNullableVal != null ? _intNullableVal!.toString() : "null") + ", "); + buffer.write("intList=" + (_intList != null ? _intList!.toString() : "null") + ", "); + buffer.write("intNullableList=" + (_intNullableList != null ? _intNullableList!.toString() : "null") + ", "); + buffer.write("nullableIntList=" + (_nullableIntList != null ? _nullableIntList!.toString() : "null") + ", "); + buffer.write("nullableIntNullableList=" + (_nullableIntNullableList != null ? _nullableIntNullableList!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -7975,22 +7975,22 @@ class TestModel extends amplify_core.Model { 'nullableIntNullableList': _nullableIntNullableList }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final FLOATVAL = amplify_core.QueryField(fieldName: \\"floatVal\\"); - static final FLOATNULLABLEVAL = amplify_core.QueryField(fieldName: \\"floatNullableVal\\"); - static final FLOATLIST = amplify_core.QueryField(fieldName: \\"floatList\\"); - static final FLOATNULLABLELIST = amplify_core.QueryField(fieldName: \\"floatNullableList\\"); - static final NULLABLEFLOATLIST = amplify_core.QueryField(fieldName: \\"nullableFloatList\\"); - static final NULLABLEFLOATNULLABLELIST = amplify_core.QueryField(fieldName: \\"nullableFloatNullableList\\"); - static final INTVAL = amplify_core.QueryField(fieldName: \\"intVal\\"); - static final INTNULLABLEVAL = amplify_core.QueryField(fieldName: \\"intNullableVal\\"); - static final INTLIST = amplify_core.QueryField(fieldName: \\"intList\\"); - static final INTNULLABLELIST = amplify_core.QueryField(fieldName: \\"intNullableList\\"); - static final NULLABLEINTLIST = amplify_core.QueryField(fieldName: \\"nullableIntList\\"); - static final NULLABLEINTNULLABLELIST = amplify_core.QueryField(fieldName: \\"nullableIntNullableList\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final FLOATVAL = amplify_core.QueryField(fieldName: "floatVal"); + static final FLOATNULLABLEVAL = amplify_core.QueryField(fieldName: "floatNullableVal"); + static final FLOATLIST = amplify_core.QueryField(fieldName: "floatList"); + static final FLOATNULLABLELIST = amplify_core.QueryField(fieldName: "floatNullableList"); + static final NULLABLEFLOATLIST = amplify_core.QueryField(fieldName: "nullableFloatList"); + static final NULLABLEFLOATNULLABLELIST = amplify_core.QueryField(fieldName: "nullableFloatNullableList"); + static final INTVAL = amplify_core.QueryField(fieldName: "intVal"); + static final INTNULLABLEVAL = amplify_core.QueryField(fieldName: "intNullableVal"); + static final INTLIST = amplify_core.QueryField(fieldName: "intList"); + static final INTNULLABLELIST = amplify_core.QueryField(fieldName: "intNullableList"); + static final NULLABLEINTLIST = amplify_core.QueryField(fieldName: "nullableIntList"); + static final NULLABLEINTNULLABLELIST = amplify_core.QueryField(fieldName: "nullableIntNullableList"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"TestModel\\"; - modelSchemaDefinition.pluralName = \\"TestModels\\"; + modelSchemaDefinition.name = "TestModel"; + modelSchemaDefinition.pluralName = "TestModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -8095,14 +8095,14 @@ exports[`AppSync Dart Visitor Read-only Field Tests should generate the read-onl "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -8172,12 +8172,12 @@ class SimpleModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"SimpleModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("SimpleModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -8215,11 +8215,11 @@ class SimpleModel extends amplify_core.Model { 'updatedAt': _updatedAt }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"SimpleModel\\"; - modelSchemaDefinition.pluralName = \\"SimpleModels\\"; + modelSchemaDefinition.name = "SimpleModel"; + modelSchemaDefinition.pluralName = "SimpleModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -8264,14 +8264,14 @@ exports[`AppSync Dart Visitor Read-only and Null Safety Combined Tests should ge "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -8341,12 +8341,12 @@ class SimpleModel extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"SimpleModel {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("SimpleModel {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -8384,11 +8384,11 @@ class SimpleModel extends amplify_core.Model { 'updatedAt': _updatedAt }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"SimpleModel\\"; - modelSchemaDefinition.pluralName = \\"SimpleModels\\"; + modelSchemaDefinition.name = "SimpleModel"; + modelSchemaDefinition.pluralName = "SimpleModels"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -8433,14 +8433,14 @@ exports[`AppSync Dart Visitor custom primary key model generation references fie "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -8558,13 +8558,13 @@ class NoticeStaff extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"NoticeStaff {\\"); - buffer.write(\\"read_at=\\" + (_read_at != null ? _read_at!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"noticeId=\\" + \\"$_noticeId\\" + \\", \\"); - buffer.write(\\"staffId=\\" + \\"$_staffId\\" + \\", \\"); - buffer.write(\\"notice=\\" + (_notice != null ? _notice!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"staff=\\" + (_staff != null ? _staff!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("NoticeStaff {"); + buffer.write("read_at=" + (_read_at != null ? _read_at!.format() : "null") + ", "); + buffer.write("noticeId=" + "$_noticeId" + ", "); + buffer.write("staffId=" + "$_staffId" + ", "); + buffer.write("notice=" + (_notice != null ? _notice!.toString() : "null") + ", "); + buffer.write("staff=" + (_staff != null ? _staff!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -8620,18 +8620,18 @@ class NoticeStaff extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final READ_AT = amplify_core.QueryField(fieldName: \\"read_at\\"); - static final NOTICEID = amplify_core.QueryField(fieldName: \\"noticeId\\"); - static final STAFFID = amplify_core.QueryField(fieldName: \\"staffId\\"); + static final READ_AT = amplify_core.QueryField(fieldName: "read_at"); + static final NOTICEID = amplify_core.QueryField(fieldName: "noticeId"); + static final STAFFID = amplify_core.QueryField(fieldName: "staffId"); static final NOTICE = amplify_core.QueryField( - fieldName: \\"notice\\", + fieldName: "notice", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Notice')); static final STAFF = amplify_core.QueryField( - fieldName: \\"staff\\", + fieldName: "staff", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Staff')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"NoticeStaff\\"; - modelSchemaDefinition.pluralName = \\"NoticeStaffs\\"; + modelSchemaDefinition.name = "NoticeStaff"; + modelSchemaDefinition.pluralName = "NoticeStaffs"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( @@ -8646,7 +8646,7 @@ class NoticeStaff extends amplify_core.Model { ]; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"noticeId\\", \\"staffId\\"], name: null) + amplify_core.ModelIndex(fields: const ["noticeId", "staffId"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( @@ -8753,14 +8753,14 @@ exports[`AppSync Dart Visitor custom primary key model generation references fie "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -8839,12 +8839,12 @@ class NoticeStaff extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"NoticeStaff {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"read_at=\\" + (_read_at != null ? _read_at!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"notice=\\" + (_notice != null ? _notice!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"staff=\\" + (_staff != null ? _staff!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("NoticeStaff {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("read_at=" + (_read_at != null ? _read_at!.format() : "null") + ", "); + buffer.write("notice=" + (_notice != null ? _notice!.toString() : "null") + ", "); + buffer.write("staff=" + (_staff != null ? _staff!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -8896,17 +8896,17 @@ class NoticeStaff extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final READ_AT = amplify_core.QueryField(fieldName: \\"read_at\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final READ_AT = amplify_core.QueryField(fieldName: "read_at"); static final NOTICE = amplify_core.QueryField( - fieldName: \\"notice\\", + fieldName: "notice", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Notice')); static final STAFF = amplify_core.QueryField( - fieldName: \\"staff\\", + fieldName: "staff", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Staff')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"NoticeStaff\\"; - modelSchemaDefinition.pluralName = \\"NoticeStaffs\\"; + modelSchemaDefinition.name = "NoticeStaff"; + modelSchemaDefinition.pluralName = "NoticeStaffs"; modelSchemaDefinition.authRules = [ amplify_core.AuthRule( @@ -9006,14 +9006,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -9097,12 +9097,12 @@ class ModelWithImplicitID extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"ModelWithImplicitID {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("ModelWithImplicitID {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -9140,11 +9140,11 @@ class ModelWithImplicitID extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"ModelWithImplicitID\\"; - modelSchemaDefinition.pluralName = \\"ModelWithImplicitIDS\\"; + modelSchemaDefinition.name = "ModelWithImplicitID"; + modelSchemaDefinition.pluralName = "ModelWithImplicitIDS"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -9232,14 +9232,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -9323,12 +9323,12 @@ class ModelWithExplicitID extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"ModelWithExplicitID {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("ModelWithExplicitID {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -9366,11 +9366,11 @@ class ModelWithExplicitID extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"ModelWithExplicitID\\"; - modelSchemaDefinition.pluralName = \\"ModelWithExplicitIDS\\"; + modelSchemaDefinition.name = "ModelWithExplicitID"; + modelSchemaDefinition.pluralName = "ModelWithExplicitIDS"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -9458,14 +9458,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -9540,12 +9540,12 @@ class ModelWithExplicitIDAndSDI extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"ModelWithExplicitIDAndSDI {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"parentID=\\" + \\"$_parentID\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("ModelWithExplicitIDAndSDI {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("parentID=" + "$_parentID" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -9583,14 +9583,14 @@ class ModelWithExplicitIDAndSDI extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final PARENTID = amplify_core.QueryField(fieldName: \\"parentID\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final PARENTID = amplify_core.QueryField(fieldName: "parentID"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"ModelWithExplicitIDAndSDI\\"; - modelSchemaDefinition.pluralName = \\"ModelWithExplicitIDAndSDIS\\"; + modelSchemaDefinition.name = "ModelWithExplicitIDAndSDI"; + modelSchemaDefinition.pluralName = "ModelWithExplicitIDAndSDIS"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"parentID\\"], name: \\"byParent\\") + amplify_core.ModelIndex(fields: const ["parentID"], name: "byParent") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -9679,14 +9679,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -9797,13 +9797,13 @@ class ModelWithIDPlusSortKeys extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"ModelWithIDPlusSortKeys {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"rating=\\" + (_rating != null ? _rating!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("ModelWithIDPlusSortKeys {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("rating=" + (_rating != null ? _rating!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -9843,15 +9843,15 @@ class ModelWithIDPlusSortKeys extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); - static final RATING = amplify_core.QueryField(fieldName: \\"rating\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); + static final RATING = amplify_core.QueryField(fieldName: "rating"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"ModelWithIDPlusSortKeys\\"; - modelSchemaDefinition.pluralName = \\"ModelWithIDPlusSortKeys\\"; + modelSchemaDefinition.name = "ModelWithIDPlusSortKeys"; + modelSchemaDefinition.pluralName = "ModelWithIDPlusSortKeys"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\", \\"title\\", \\"rating\\"], name: null) + amplify_core.ModelIndex(fields: const ["id", "title", "rating"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -9959,14 +9959,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -10072,12 +10072,12 @@ class ModelWithExplicitlyDefinedPK extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"ModelWithExplicitlyDefinedPK {\\"); - buffer.write(\\"modelID=\\" + \\"$_modelID\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("ModelWithExplicitlyDefinedPK {"); + buffer.write("modelID=" + "$_modelID" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -10115,14 +10115,14 @@ class ModelWithExplicitlyDefinedPK extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final MODELID = amplify_core.QueryField(fieldName: \\"modelID\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final MODELID = amplify_core.QueryField(fieldName: "modelID"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"ModelWithExplicitlyDefinedPK\\"; - modelSchemaDefinition.pluralName = \\"ModelWithExplicitlyDefinedPKS\\"; + modelSchemaDefinition.name = "ModelWithExplicitlyDefinedPK"; + modelSchemaDefinition.pluralName = "ModelWithExplicitlyDefinedPKS"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"modelID\\"], name: null) + amplify_core.ModelIndex(fields: const ["modelID"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( @@ -10215,14 +10215,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -10346,13 +10346,13 @@ class ModelWithExplicitlyDefinedPKPlusSortKeysAsCompositeKey extends amplify_cor String toString() { var buffer = new StringBuffer(); - buffer.write(\\"ModelWithExplicitlyDefinedPKPlusSortKeysAsCompositeKey {\\"); - buffer.write(\\"modelID=\\" + \\"$_modelID\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"rating=\\" + (_rating != null ? _rating!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("ModelWithExplicitlyDefinedPKPlusSortKeysAsCompositeKey {"); + buffer.write("modelID=" + "$_modelID" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("rating=" + (_rating != null ? _rating!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -10392,15 +10392,15 @@ class ModelWithExplicitlyDefinedPKPlusSortKeysAsCompositeKey extends amplify_cor }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final MODELID = amplify_core.QueryField(fieldName: \\"modelID\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); - static final RATING = amplify_core.QueryField(fieldName: \\"rating\\"); + static final MODELID = amplify_core.QueryField(fieldName: "modelID"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); + static final RATING = amplify_core.QueryField(fieldName: "rating"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"ModelWithExplicitlyDefinedPKPlusSortKeysAsCompositeKey\\"; - modelSchemaDefinition.pluralName = \\"ModelWithExplicitlyDefinedPKPlusSortKeysAsCompositeKeys\\"; + modelSchemaDefinition.name = "ModelWithExplicitlyDefinedPKPlusSortKeysAsCompositeKey"; + modelSchemaDefinition.pluralName = "ModelWithExplicitlyDefinedPKPlusSortKeysAsCompositeKeys"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"modelID\\", \\"title\\", \\"rating\\"], name: null) + amplify_core.ModelIndex(fields: const ["modelID", "title", "rating"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( @@ -10512,14 +10512,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -10621,12 +10621,12 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -10680,17 +10680,17 @@ class Post extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\", \\"title\\"], name: null) + amplify_core.ModelIndex(fields: const ["id", "title"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -10794,14 +10794,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -10909,14 +10909,14 @@ class Comment extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"postCommentsId=\\" + \\"$_postCommentsId\\" + \\", \\"); - buffer.write(\\"postCommentsTitle=\\" + \\"$_postCommentsTitle\\"); - buffer.write(\\"}\\"); + buffer.write("Comment {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null") + ", "); + buffer.write("postCommentsId=" + "$_postCommentsId" + ", "); + buffer.write("postCommentsTitle=" + "$_postCommentsTitle"); + buffer.write("}"); return buffer.toString(); } @@ -10963,16 +10963,16 @@ class Comment extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); - static final POSTCOMMENTSID = amplify_core.QueryField(fieldName: \\"postCommentsId\\"); - static final POSTCOMMENTSTITLE = amplify_core.QueryField(fieldName: \\"postCommentsTitle\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); + static final POSTCOMMENTSID = amplify_core.QueryField(fieldName: "postCommentsId"); + static final POSTCOMMENTSTITLE = amplify_core.QueryField(fieldName: "postCommentsTitle"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment\\"; - modelSchemaDefinition.pluralName = \\"Comments\\"; + modelSchemaDefinition.name = "Comment"; + modelSchemaDefinition.pluralName = "Comments"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\", \\"content\\"], name: null) + amplify_core.ModelIndex(fields: const ["id", "content"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -11081,14 +11081,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -11216,14 +11216,14 @@ class Project extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Project {\\"); - buffer.write(\\"projectId=\\" + \\"$_projectId\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"projectTeamTeamId=\\" + \\"$_projectTeamTeamId\\" + \\", \\"); - buffer.write(\\"projectTeamName=\\" + \\"$_projectTeamName\\"); - buffer.write(\\"}\\"); + buffer.write("Project {"); + buffer.write("projectId=" + "$_projectId" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null") + ", "); + buffer.write("projectTeamTeamId=" + "$_projectTeamTeamId" + ", "); + buffer.write("projectTeamName=" + "$_projectTeamName"); + buffer.write("}"); return buffer.toString(); } @@ -11279,19 +11279,19 @@ class Project extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final PROJECTID = amplify_core.QueryField(fieldName: \\"projectId\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final PROJECTID = amplify_core.QueryField(fieldName: "projectId"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final TEAM = amplify_core.QueryField( - fieldName: \\"team\\", + fieldName: "team", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Team')); - static final PROJECTTEAMTEAMID = amplify_core.QueryField(fieldName: \\"projectTeamTeamId\\"); - static final PROJECTTEAMNAME = amplify_core.QueryField(fieldName: \\"projectTeamName\\"); + static final PROJECTTEAMTEAMID = amplify_core.QueryField(fieldName: "projectTeamTeamId"); + static final PROJECTTEAMNAME = amplify_core.QueryField(fieldName: "projectTeamName"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Project\\"; - modelSchemaDefinition.pluralName = \\"Projects\\"; + modelSchemaDefinition.name = "Project"; + modelSchemaDefinition.pluralName = "Projects"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"projectId\\", \\"name\\"], name: null) + amplify_core.ModelIndex(fields: const ["projectId", "name"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( @@ -11411,14 +11411,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -11532,13 +11532,13 @@ class Team extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Team {\\"); - buffer.write(\\"teamId=\\" + \\"$_teamId\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"project=\\" + (_project != null ? _project!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Team {"); + buffer.write("teamId=" + "$_teamId" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("project=" + (_project != null ? _project!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -11584,17 +11584,17 @@ class Team extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final TEAMID = amplify_core.QueryField(fieldName: \\"teamId\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final TEAMID = amplify_core.QueryField(fieldName: "teamId"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final PROJECT = amplify_core.QueryField( - fieldName: \\"project\\", + fieldName: "project", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Project')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Team\\"; - modelSchemaDefinition.pluralName = \\"Teams\\"; + modelSchemaDefinition.name = "Team"; + modelSchemaDefinition.pluralName = "Teams"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"teamId\\", \\"name\\"], name: null) + amplify_core.ModelIndex(fields: const ["teamId", "name"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( @@ -11702,14 +11702,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -11824,14 +11824,14 @@ class CpkOneToOneBidirectionalParent extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"CpkOneToOneBidirectionalParent {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"cpkOneToOneBidirectionalParentExplicitChildId=\\" + \\"$_cpkOneToOneBidirectionalParentExplicitChildId\\" + \\", \\"); - buffer.write(\\"cpkOneToOneBidirectionalParentExplicitChildName=\\" + \\"$_cpkOneToOneBidirectionalParentExplicitChildName\\"); - buffer.write(\\"}\\"); + buffer.write("CpkOneToOneBidirectionalParent {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null") + ", "); + buffer.write("cpkOneToOneBidirectionalParentExplicitChildId=" + "$_cpkOneToOneBidirectionalParentExplicitChildId" + ", "); + buffer.write("cpkOneToOneBidirectionalParentExplicitChildName=" + "$_cpkOneToOneBidirectionalParentExplicitChildName"); + buffer.write("}"); return buffer.toString(); } @@ -11887,19 +11887,19 @@ class CpkOneToOneBidirectionalParent extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final EXPLICITCHILD = amplify_core.QueryField( - fieldName: \\"explicitChild\\", + fieldName: "explicitChild", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'CpkOneToOneBidirectionalChildExplicit')); - static final CPKONETOONEBIDIRECTIONALPARENTEXPLICITCHILDID = amplify_core.QueryField(fieldName: \\"cpkOneToOneBidirectionalParentExplicitChildId\\"); - static final CPKONETOONEBIDIRECTIONALPARENTEXPLICITCHILDNAME = amplify_core.QueryField(fieldName: \\"cpkOneToOneBidirectionalParentExplicitChildName\\"); + static final CPKONETOONEBIDIRECTIONALPARENTEXPLICITCHILDID = amplify_core.QueryField(fieldName: "cpkOneToOneBidirectionalParentExplicitChildId"); + static final CPKONETOONEBIDIRECTIONALPARENTEXPLICITCHILDNAME = amplify_core.QueryField(fieldName: "cpkOneToOneBidirectionalParentExplicitChildName"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"CpkOneToOneBidirectionalParent\\"; - modelSchemaDefinition.pluralName = \\"CpkOneToOneBidirectionalParents\\"; + modelSchemaDefinition.name = "CpkOneToOneBidirectionalParent"; + modelSchemaDefinition.pluralName = "CpkOneToOneBidirectionalParents"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\", \\"name\\"], name: null) + amplify_core.ModelIndex(fields: const ["id", "name"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -12015,14 +12015,14 @@ exports[`AppSync Dart Visitor custom primary key model generation should generat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -12123,13 +12123,13 @@ class CpkOneToOneBidirectionalChildExplicit extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"CpkOneToOneBidirectionalChildExplicit {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"belongsToParent=\\" + (_belongsToParent != null ? _belongsToParent!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("CpkOneToOneBidirectionalChildExplicit {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("belongsToParent=" + (_belongsToParent != null ? _belongsToParent!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -12175,17 +12175,17 @@ class CpkOneToOneBidirectionalChildExplicit extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final BELONGSTOPARENT = amplify_core.QueryField( - fieldName: \\"belongsToParent\\", + fieldName: "belongsToParent", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'CpkOneToOneBidirectionalParent')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"CpkOneToOneBidirectionalChildExplicit\\"; - modelSchemaDefinition.pluralName = \\"CpkOneToOneBidirectionalChildExplicits\\"; + modelSchemaDefinition.name = "CpkOneToOneBidirectionalChildExplicit"; + modelSchemaDefinition.pluralName = "CpkOneToOneBidirectionalChildExplicits"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\", \\"name\\"], name: null) + amplify_core.ModelIndex(fields: const ["id", "name"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -12289,14 +12289,14 @@ exports[`AppSync Dart Visitor custom references double linked references 1`] = ` "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -12378,11 +12378,11 @@ class Foo extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Foo {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Foo {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -12433,16 +12433,16 @@ class Foo extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final BAR1 = amplify_core.QueryField( - fieldName: \\"bar1\\", + fieldName: "bar1", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Bar')); static final BAR2 = amplify_core.QueryField( - fieldName: \\"bar2\\", + fieldName: "bar2", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Bar')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Foo\\"; - modelSchemaDefinition.pluralName = \\"Foos\\"; + modelSchemaDefinition.name = "Foo"; + modelSchemaDefinition.pluralName = "Foos"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -12538,14 +12538,14 @@ exports[`AppSync Dart Visitor custom references double linked references 2`] = ` "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -12627,13 +12627,13 @@ class Bar extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Bar {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"foo1=\\" + (_foo1 != null ? _foo1!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"foo2=\\" + (_foo2 != null ? _foo2!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Bar {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("foo1=" + (_foo1 != null ? _foo1!.toString() : "null") + ", "); + buffer.write("foo2=" + (_foo2 != null ? _foo2!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -12684,16 +12684,16 @@ class Bar extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final FOO1 = amplify_core.QueryField( - fieldName: \\"foo1\\", + fieldName: "foo1", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Foo')); static final FOO2 = amplify_core.QueryField( - fieldName: \\"foo2\\", + fieldName: "foo2", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Foo')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Bar\\"; - modelSchemaDefinition.pluralName = \\"Bars\\"; + modelSchemaDefinition.name = "Bar"; + modelSchemaDefinition.pluralName = "Bars"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -12789,14 +12789,14 @@ exports[`AppSync Dart Visitor custom references hasMany with sortKeyFields on pr "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -12935,14 +12935,14 @@ class Primary extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Primary {\\"); - buffer.write(\\"tenantId=\\" + \\"$_tenantId\\" + \\", \\"); - buffer.write(\\"instanceId=\\" + \\"$_instanceId\\" + \\", \\"); - buffer.write(\\"recordId=\\" + \\"$_recordId\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Primary {"); + buffer.write("tenantId=" + "$_tenantId" + ", "); + buffer.write("instanceId=" + "$_instanceId" + ", "); + buffer.write("recordId=" + "$_recordId" + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -13005,19 +13005,19 @@ class Primary extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final TENANTID = amplify_core.QueryField(fieldName: \\"tenantId\\"); - static final INSTANCEID = amplify_core.QueryField(fieldName: \\"instanceId\\"); - static final RECORDID = amplify_core.QueryField(fieldName: \\"recordId\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final TENANTID = amplify_core.QueryField(fieldName: "tenantId"); + static final INSTANCEID = amplify_core.QueryField(fieldName: "instanceId"); + static final RECORDID = amplify_core.QueryField(fieldName: "recordId"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final RELATED = amplify_core.QueryField( - fieldName: \\"related\\", + fieldName: "related", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Related')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Primary\\"; - modelSchemaDefinition.pluralName = \\"Primaries\\"; + modelSchemaDefinition.name = "Primary"; + modelSchemaDefinition.pluralName = "Primaries"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"tenantId\\", \\"instanceId\\", \\"recordId\\"], name: null) + amplify_core.ModelIndex(fields: const ["tenantId", "instanceId", "recordId"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( @@ -13142,14 +13142,14 @@ exports[`AppSync Dart Visitor custom references hasMany with sortKeyFields on pr "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -13231,13 +13231,13 @@ class Related extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Related {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"primary=\\" + (_primary != null ? _primary!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Related {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("primary=" + (_primary != null ? _primary!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -13284,14 +13284,14 @@ class Related extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final PRIMARY = amplify_core.QueryField( - fieldName: \\"primary\\", + fieldName: "primary", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Primary')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Related\\"; - modelSchemaDefinition.pluralName = \\"Relateds\\"; + modelSchemaDefinition.name = "Related"; + modelSchemaDefinition.pluralName = "Relateds"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -13386,14 +13386,14 @@ exports[`AppSync Dart Visitor custom references hasOne with sortKeyFields on pri "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -13531,14 +13531,14 @@ class Primary extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Primary {\\"); - buffer.write(\\"tenantId=\\" + \\"$_tenantId\\" + \\", \\"); - buffer.write(\\"instanceId=\\" + \\"$_instanceId\\" + \\", \\"); - buffer.write(\\"recordId=\\" + \\"$_recordId\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Primary {"); + buffer.write("tenantId=" + "$_tenantId" + ", "); + buffer.write("instanceId=" + "$_instanceId" + ", "); + buffer.write("recordId=" + "$_recordId" + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -13593,19 +13593,19 @@ class Primary extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final TENANTID = amplify_core.QueryField(fieldName: \\"tenantId\\"); - static final INSTANCEID = amplify_core.QueryField(fieldName: \\"instanceId\\"); - static final RECORDID = amplify_core.QueryField(fieldName: \\"recordId\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final TENANTID = amplify_core.QueryField(fieldName: "tenantId"); + static final INSTANCEID = amplify_core.QueryField(fieldName: "instanceId"); + static final RECORDID = amplify_core.QueryField(fieldName: "recordId"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final RELATED = amplify_core.QueryField( - fieldName: \\"related\\", + fieldName: "related", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Related')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Primary\\"; - modelSchemaDefinition.pluralName = \\"Primaries\\"; + modelSchemaDefinition.name = "Primary"; + modelSchemaDefinition.pluralName = "Primaries"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"tenantId\\", \\"instanceId\\", \\"recordId\\"], name: null) + amplify_core.ModelIndex(fields: const ["tenantId", "instanceId", "recordId"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.field( @@ -13730,14 +13730,14 @@ exports[`AppSync Dart Visitor custom references hasOne with sortKeyFields on pri "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -13819,13 +13819,13 @@ class Related extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Related {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"primary=\\" + (_primary != null ? _primary!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Related {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("primary=" + (_primary != null ? _primary!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -13872,14 +13872,14 @@ class Related extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final PRIMARY = amplify_core.QueryField( - fieldName: \\"primary\\", + fieldName: "primary", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Primary')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Related\\"; - modelSchemaDefinition.pluralName = \\"Relateds\\"; + modelSchemaDefinition.name = "Related"; + modelSchemaDefinition.pluralName = "Relateds"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -13974,14 +13974,14 @@ exports[`AppSync Dart Visitor custom references sets the association to the refe "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -14064,12 +14064,12 @@ class SqlPrimary extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"SqlPrimary {\\"); - buffer.write(\\"id=\\" + (id != null ? id!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("SqlPrimary {"); + buffer.write("id=" + (id != null ? id!.toString() : "null") + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -14124,17 +14124,17 @@ class SqlPrimary extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final RELATED = amplify_core.QueryField( - fieldName: \\"related\\", + fieldName: "related", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'SqlRelated')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"SqlPrimary\\"; - modelSchemaDefinition.pluralName = \\"SqlPrimaries\\"; + modelSchemaDefinition.name = "SqlPrimary"; + modelSchemaDefinition.pluralName = "SqlPrimaries"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\"], name: null) + amplify_core.ModelIndex(fields: const ["id"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -14230,14 +14230,14 @@ exports[`AppSync Dart Visitor custom references sets the association to the refe "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -14319,13 +14319,13 @@ class SqlRelated extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"SqlRelated {\\"); - buffer.write(\\"id=\\" + (id != null ? id!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"primary=\\" + (_primary != null ? _primary!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("SqlRelated {"); + buffer.write("id=" + (id != null ? id!.toString() : "null") + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("primary=" + (_primary != null ? _primary!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -14372,18 +14372,18 @@ class SqlRelated extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final PRIMARY = amplify_core.QueryField( - fieldName: \\"primary\\", + fieldName: "primary", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'SqlPrimary')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"SqlRelated\\"; - modelSchemaDefinition.pluralName = \\"SqlRelateds\\"; + modelSchemaDefinition.name = "SqlRelated"; + modelSchemaDefinition.pluralName = "SqlRelateds"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\"], name: null), - amplify_core.ModelIndex(fields: const [\\"primaryId\\"], name: \\"primary_id\\") + amplify_core.ModelIndex(fields: const ["id"], name: null), + amplify_core.ModelIndex(fields: const ["primaryId"], name: "primary_id") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -14479,14 +14479,14 @@ exports[`AppSync Dart Visitor custom references sets the association to the refe "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -14569,11 +14569,11 @@ class Primary extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Primary {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Primary {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -14632,19 +14632,19 @@ class Primary extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final RELATEDMANY = amplify_core.QueryField( - fieldName: \\"relatedMany\\", + fieldName: "relatedMany", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'RelatedMany')); static final RELATEDONE = amplify_core.QueryField( - fieldName: \\"relatedOne\\", + fieldName: "relatedOne", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'RelatedOne')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Primary\\"; - modelSchemaDefinition.pluralName = \\"Primaries\\"; + modelSchemaDefinition.name = "Primary"; + modelSchemaDefinition.pluralName = "Primaries"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\"], name: null) + amplify_core.ModelIndex(fields: const ["id"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -14741,14 +14741,14 @@ exports[`AppSync Dart Visitor custom references sets the association to the refe "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -14823,12 +14823,12 @@ class RelatedOne extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"RelatedOne {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"primary=\\" + (_primary != null ? _primary!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("RelatedOne {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("primary=" + (_primary != null ? _primary!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -14870,16 +14870,16 @@ class RelatedOne extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final PRIMARY = amplify_core.QueryField( - fieldName: \\"primary\\", + fieldName: "primary", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Primary')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"RelatedOne\\"; - modelSchemaDefinition.pluralName = \\"RelatedOnes\\"; + modelSchemaDefinition.name = "RelatedOne"; + modelSchemaDefinition.pluralName = "RelatedOnes"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\"], name: null) + amplify_core.ModelIndex(fields: const ["id"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -14969,14 +14969,14 @@ exports[`AppSync Dart Visitor custom references sets the association to the refe "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -15051,12 +15051,12 @@ class RelatedMany extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"RelatedMany {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"primary=\\" + (_primary != null ? _primary!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("RelatedMany {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("primary=" + (_primary != null ? _primary!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -15098,16 +15098,16 @@ class RelatedMany extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final PRIMARY = amplify_core.QueryField( - fieldName: \\"primary\\", + fieldName: "primary", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Primary')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"RelatedMany\\"; - modelSchemaDefinition.pluralName = \\"RelatedManies\\"; + modelSchemaDefinition.name = "RelatedMany"; + modelSchemaDefinition.pluralName = "RelatedManies"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\"], name: null) + amplify_core.ModelIndex(fields: const ["id"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -15197,14 +15197,14 @@ exports[`AppSync Dart Visitor custom references sets the association to the refe "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -15286,12 +15286,12 @@ class SqlPrimary extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"SqlPrimary {\\"); - buffer.write(\\"id=\\" + (id != null ? id!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("SqlPrimary {"); + buffer.write("id=" + (id != null ? id!.toString() : "null") + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -15338,17 +15338,17 @@ class SqlPrimary extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final RELATED = amplify_core.QueryField( - fieldName: \\"related\\", + fieldName: "related", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'SqlRelated')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"SqlPrimary\\"; - modelSchemaDefinition.pluralName = \\"SqlPrimaries\\"; + modelSchemaDefinition.name = "SqlPrimary"; + modelSchemaDefinition.pluralName = "SqlPrimaries"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\"], name: null) + amplify_core.ModelIndex(fields: const ["id"], name: null) ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -15444,14 +15444,14 @@ exports[`AppSync Dart Visitor custom references sets the association to the refe "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -15533,13 +15533,13 @@ class SqlRelated extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"SqlRelated {\\"); - buffer.write(\\"id=\\" + (id != null ? id!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"primary=\\" + (_primary != null ? _primary!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("SqlRelated {"); + buffer.write("id=" + (id != null ? id!.toString() : "null") + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("primary=" + (_primary != null ? _primary!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -15586,18 +15586,18 @@ class SqlRelated extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final PRIMARY = amplify_core.QueryField( - fieldName: \\"primary\\", + fieldName: "primary", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'SqlPrimary')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"SqlRelated\\"; - modelSchemaDefinition.pluralName = \\"SqlRelateds\\"; + modelSchemaDefinition.name = "SqlRelated"; + modelSchemaDefinition.pluralName = "SqlRelateds"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"id\\"], name: null), - amplify_core.ModelIndex(fields: const [\\"primaryId\\"], name: \\"primary_id\\") + amplify_core.ModelIndex(fields: const ["id"], name: null), + amplify_core.ModelIndex(fields: const ["primaryId"], name: "primary_id") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-java-api-lazyload-css-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-java-api-lazyload-css-visitor.test.ts.snap index 6fd6f205b..cb2fde204 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-java-api-lazyload-css-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-java-api-lazyload-css-visitor.test.ts.snap @@ -25,18 +25,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the DefaultPKParent type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"DefaultPKParents\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "DefaultPKParents", hasLazySupport = true) +@Index(name = "undefined", fields = {"id"}) public final class DefaultPKParent implements Model { - public static final DefaultPKParentPath rootPath = new DefaultPKParentPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"DefaultPKParent\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"DefaultPKParent\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"DefaultPKChild\\") @HasMany(associatedWith = \\"parent\\", type = DefaultPKChild.class) ModelList children = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final DefaultPKParentPath rootPath = new DefaultPKParentPath("root", false, null); + public static final QueryField ID = field("DefaultPKParent", "id"); + public static final QueryField CONTENT = field("DefaultPKParent", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="DefaultPKChild") @HasMany(associatedWith = "parent", type = DefaultPKChild.class) ModelList children = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -91,12 +91,12 @@ public final class DefaultPKParent implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"DefaultPKParent {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("DefaultPKParent {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -183,19 +183,19 @@ public final class DefaultPKParent implements Model { } /** This is an auto generated class representing the DefaultPKChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"DefaultPKChildren\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "DefaultPKChildren", hasLazySupport = true) +@Index(name = "undefined", fields = {"id"}) public final class DefaultPKChild implements Model { - public static final DefaultPKChildPath rootPath = new DefaultPKChildPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"DefaultPKChild\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"DefaultPKChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"DefaultPKChild\\", \\"defaultPKParentChildrenId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"DefaultPKParent\\") @BelongsTo(targetName = \\"defaultPKParentChildrenId\\", type = DefaultPKParent.class) ModelReference parent; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final DefaultPKChildPath rootPath = new DefaultPKChildPath("root", false, null); + public static final QueryField ID = field("DefaultPKChild", "id"); + public static final QueryField CONTENT = field("DefaultPKChild", "content"); + public static final QueryField PARENT = field("DefaultPKChild", "defaultPKParentChildrenId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="DefaultPKParent") @BelongsTo(targetName = "defaultPKParentChildrenId", type = DefaultPKParent.class) ModelReference parent; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -253,13 +253,13 @@ public final class DefaultPKChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"DefaultPKChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("DefaultPKChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -387,18 +387,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the HasOneParent type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"HasOneParents\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "HasOneParents", hasLazySupport = true) +@Index(name = "undefined", fields = {"id"}) public final class HasOneParent implements Model { - public static final HasOneParentPath rootPath = new HasOneParentPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"HasOneParent\\", \\"id\\"); - public static final QueryField HAS_ONE_PARENT_CHILD_ID = field(\\"HasOneParent\\", \\"hasOneParentChildId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"HasOneChild\\") @HasOne(associatedWith = \\"id\\", type = HasOneChild.class) ModelReference child = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String hasOneParentChildId; + public static final HasOneParentPath rootPath = new HasOneParentPath("root", false, null); + public static final QueryField ID = field("HasOneParent", "id"); + public static final QueryField HAS_ONE_PARENT_CHILD_ID = field("HasOneParent", "hasOneParentChildId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="HasOneChild") @HasOne(associatedWith = "id", type = HasOneChild.class) ModelReference child = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String hasOneParentChildId; public String getId() { return id; } @@ -453,12 +453,12 @@ public final class HasOneParent implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"HasOneParent {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"hasOneParentChildId=\\" + String.valueOf(getHasOneParentChildId())) - .append(\\"}\\") + .append("HasOneParent {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("hasOneParentChildId=" + String.valueOf(getHasOneParentChildId())) + .append("}") .toString(); } @@ -545,17 +545,17 @@ public final class HasOneParent implements Model { } /** This is an auto generated class representing the HasOneChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"HasOneChildren\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "HasOneChildren", hasLazySupport = true) +@Index(name = "undefined", fields = {"id"}) public final class HasOneChild implements Model { - public static final HasOneChildPath rootPath = new HasOneChildPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"HasOneChild\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"HasOneChild\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final HasOneChildPath rootPath = new HasOneChildPath("root", false, null); + public static final QueryField ID = field("HasOneChild", "id"); + public static final QueryField CONTENT = field("HasOneChild", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -606,12 +606,12 @@ public final class HasOneChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"HasOneChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("HasOneChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -724,20 +724,20 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Blog type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Blogs\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"blogId\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Blogs", hasLazySupport = true) +@Index(name = "undefined", fields = {"blogId"}) public final class Blog implements Model { - public static final BlogPath rootPath = new BlogPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Blog\\", \\"id\\"); - public static final QueryField BLOG_ID = field(\\"Blog\\", \\"blogId\\"); - public static final QueryField NAME = field(\\"Blog\\", \\"name\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String blogId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Post\\", isRequired = true) @HasMany(associatedWith = \\"blog\\", type = Post.class) ModelList posts = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final BlogPath rootPath = new BlogPath("root", false, null); + public static final QueryField ID = field("Blog", "id"); + public static final QueryField BLOG_ID = field("Blog", "blogId"); + public static final QueryField NAME = field("Blog", "name"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String blogId; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Post", isRequired = true) @HasMany(associatedWith = "blog", type = Post.class) ModelList posts = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -799,13 +799,13 @@ public final class Blog implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Blog {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"blogId=\\" + String.valueOf(getBlogId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Blog {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("blogId=" + String.valueOf(getBlogId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -920,22 +920,22 @@ public final class Blog implements Model { } /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"postId\\",\\"title\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts", hasLazySupport = true) +@Index(name = "undefined", fields = {"postId","title"}) public final class Post implements Model { - public static final PostPath rootPath = new PostPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Post\\", \\"id\\"); - public static final QueryField POST_ID = field(\\"Post\\", \\"postId\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - public static final QueryField BLOG = field(\\"Post\\", \\"blogPostsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String postId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Blog\\", isRequired = true) @BelongsTo(targetName = \\"blogPostsId\\", type = Blog.class) ModelReference blog; - private final @ModelField(targetType=\\"Comment\\", isRequired = true) @HasMany(associatedWith = \\"post\\", type = Comment.class) ModelList comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final PostPath rootPath = new PostPath("root", false, null); + public static final QueryField ID = field("Post", "id"); + public static final QueryField POST_ID = field("Post", "postId"); + public static final QueryField TITLE = field("Post", "title"); + public static final QueryField BLOG = field("Post", "blogPostsId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String postId; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Blog", isRequired = true) @BelongsTo(targetName = "blogPostsId", type = Blog.class) ModelReference blog; + private final @ModelField(targetType="Comment", isRequired = true) @HasMany(associatedWith = "post", type = Comment.class) ModelList comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -1004,14 +1004,14 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"postId=\\" + String.valueOf(getPostId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"blog=\\" + String.valueOf(getBlog()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("postId=" + String.valueOf(getPostId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("blog=" + String.valueOf(getBlog()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1149,21 +1149,21 @@ public final class Post implements Model { } /** This is an auto generated class representing the Comment type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comments\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"commentId\\",\\"content\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comments", hasLazySupport = true) +@Index(name = "undefined", fields = {"commentId","content"}) public final class Comment implements Model { - public static final CommentPath rootPath = new CommentPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Comment\\", \\"id\\"); - public static final QueryField COMMENT_ID = field(\\"Comment\\", \\"commentId\\"); - public static final QueryField CONTENT = field(\\"Comment\\", \\"content\\"); - public static final QueryField POST = field(\\"Comment\\", \\"postCommentsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String commentId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"Post\\", isRequired = true) @BelongsTo(targetName = \\"postCommentsId\\", type = Post.class) ModelReference post; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final CommentPath rootPath = new CommentPath("root", false, null); + public static final QueryField ID = field("Comment", "id"); + public static final QueryField COMMENT_ID = field("Comment", "commentId"); + public static final QueryField CONTENT = field("Comment", "content"); + public static final QueryField POST = field("Comment", "postCommentsId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String commentId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="Post", isRequired = true) @BelongsTo(targetName = "postCommentsId", type = Post.class) ModelReference post; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -1228,14 +1228,14 @@ public final class Comment implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"commentId=\\" + String.valueOf(getCommentId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"post=\\" + String.valueOf(getPost()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Comment {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("commentId=" + String.valueOf(getCommentId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("post=" + String.valueOf(getPost()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1399,23 +1399,23 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the CompositePKParent type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"CompositePKParents\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"customId\\",\\"content\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "CompositePKParents", hasLazySupport = true) +@Index(name = "undefined", fields = {"customId","content"}) public final class CompositePKParent implements Model { - public static final CompositePKParentPath rootPath = new CompositePKParentPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"CompositePKParent\\", \\"id\\"); - public static final QueryField CUSTOM_ID = field(\\"CompositePKParent\\", \\"customId\\"); - public static final QueryField CONTENT = field(\\"CompositePKParent\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String customId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"CompositePKChild\\") @HasMany(associatedWith = \\"parent\\", type = CompositePKChild.class) ModelList children = null; - private final @ModelField(targetType=\\"ImplicitChild\\") @HasMany(associatedWith = \\"parent\\", type = ImplicitChild.class) ModelList implicitChildren = null; - private final @ModelField(targetType=\\"StrangeExplicitChild\\") @HasMany(associatedWith = \\"parent\\", type = StrangeExplicitChild.class) ModelList strangeChildren = null; - private final @ModelField(targetType=\\"ChildSansBelongsTo\\") @HasMany(associatedWith = \\"compositePKParentChildrenSansBelongsToId\\", type = ChildSansBelongsTo.class) ModelList childrenSansBelongsTo = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final CompositePKParentPath rootPath = new CompositePKParentPath("root", false, null); + public static final QueryField ID = field("CompositePKParent", "id"); + public static final QueryField CUSTOM_ID = field("CompositePKParent", "customId"); + public static final QueryField CONTENT = field("CompositePKParent", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String customId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="CompositePKChild") @HasMany(associatedWith = "parent", type = CompositePKChild.class) ModelList children = null; + private final @ModelField(targetType="ImplicitChild") @HasMany(associatedWith = "parent", type = ImplicitChild.class) ModelList implicitChildren = null; + private final @ModelField(targetType="StrangeExplicitChild") @HasMany(associatedWith = "parent", type = StrangeExplicitChild.class) ModelList strangeChildren = null; + private final @ModelField(targetType="ChildSansBelongsTo") @HasMany(associatedWith = "compositePKParentChildrenSansBelongsToId", type = ChildSansBelongsTo.class) ModelList childrenSansBelongsTo = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -1489,13 +1489,13 @@ public final class CompositePKParent implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"CompositePKParent {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"customId=\\" + String.valueOf(getCustomId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("CompositePKParent {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("customId=" + String.valueOf(getCustomId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1610,24 +1610,24 @@ public final class CompositePKParent implements Model { } /** This is an auto generated class representing the CompositePKChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"CompositePKChildren\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"childId\\",\\"content\\"}) -@Index(name = \\"byParent\\", fields = {\\"parentId\\",\\"parentTitle\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "CompositePKChildren", hasLazySupport = true) +@Index(name = "undefined", fields = {"childId","content"}) +@Index(name = "byParent", fields = {"parentId","parentTitle"}) public final class CompositePKChild implements Model { - public static final CompositePKChildPath rootPath = new CompositePKChildPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"CompositePKChild\\", \\"id\\"); - public static final QueryField CHILD_ID = field(\\"CompositePKChild\\", \\"childId\\"); - public static final QueryField CONTENT = field(\\"CompositePKChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"CompositePKChild\\", \\"parentId\\"); - public static final QueryField PARENT_TITLE = field(\\"CompositePKChild\\", \\"parentTitle\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String childId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"CompositePKParent\\") @BelongsTo(targetName = \\"parentId\\", type = CompositePKParent.class) ModelReference parent; - private final @ModelField(targetType=\\"String\\") String parentTitle; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final CompositePKChildPath rootPath = new CompositePKChildPath("root", false, null); + public static final QueryField ID = field("CompositePKChild", "id"); + public static final QueryField CHILD_ID = field("CompositePKChild", "childId"); + public static final QueryField CONTENT = field("CompositePKChild", "content"); + public static final QueryField PARENT = field("CompositePKChild", "parentId"); + public static final QueryField PARENT_TITLE = field("CompositePKChild", "parentTitle"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String childId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="CompositePKParent") @BelongsTo(targetName = "parentId", type = CompositePKParent.class) ModelReference parent; + private final @ModelField(targetType="String") String parentTitle; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -1699,15 +1699,15 @@ public final class CompositePKChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"CompositePKChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"childId=\\" + String.valueOf(getChildId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"parentTitle=\\" + String.valueOf(getParentTitle()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("CompositePKChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("childId=" + String.valueOf(getChildId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("parentTitle=" + String.valueOf(getParentTitle()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1856,21 +1856,21 @@ public final class CompositePKChild implements Model { } /** This is an auto generated class representing the ImplicitChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"ImplicitChildren\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"childId\\",\\"content\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "ImplicitChildren", hasLazySupport = true) +@Index(name = "undefined", fields = {"childId","content"}) public final class ImplicitChild implements Model { - public static final ImplicitChildPath rootPath = new ImplicitChildPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"ImplicitChild\\", \\"id\\"); - public static final QueryField CHILD_ID = field(\\"ImplicitChild\\", \\"childId\\"); - public static final QueryField CONTENT = field(\\"ImplicitChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"ImplicitChild\\", \\"compositePKParentImplicitChildrenId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String childId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"CompositePKParent\\", isRequired = true) @BelongsTo(targetName = \\"compositePKParentImplicitChildrenId\\", type = CompositePKParent.class) ModelReference parent; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final ImplicitChildPath rootPath = new ImplicitChildPath("root", false, null); + public static final QueryField ID = field("ImplicitChild", "id"); + public static final QueryField CHILD_ID = field("ImplicitChild", "childId"); + public static final QueryField CONTENT = field("ImplicitChild", "content"); + public static final QueryField PARENT = field("ImplicitChild", "compositePKParentImplicitChildrenId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String childId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="CompositePKParent", isRequired = true) @BelongsTo(targetName = "compositePKParentImplicitChildrenId", type = CompositePKParent.class) ModelReference parent; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -1935,14 +1935,14 @@ public final class ImplicitChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"ImplicitChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"childId=\\" + String.valueOf(getChildId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("ImplicitChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("childId=" + String.valueOf(getChildId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2080,24 +2080,24 @@ public final class ImplicitChild implements Model { } /** This is an auto generated class representing the StrangeExplicitChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"StrangeExplicitChildren\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"strangeId\\",\\"content\\"}) -@Index(name = \\"byCompositePKParentX\\", fields = {\\"strangeParentId\\",\\"strangeParentTitle\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "StrangeExplicitChildren", hasLazySupport = true) +@Index(name = "undefined", fields = {"strangeId","content"}) +@Index(name = "byCompositePKParentX", fields = {"strangeParentId","strangeParentTitle"}) public final class StrangeExplicitChild implements Model { - public static final StrangeExplicitChildPath rootPath = new StrangeExplicitChildPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"StrangeExplicitChild\\", \\"id\\"); - public static final QueryField STRANGE_ID = field(\\"StrangeExplicitChild\\", \\"strangeId\\"); - public static final QueryField CONTENT = field(\\"StrangeExplicitChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"StrangeExplicitChild\\", \\"strangeParentId\\"); - public static final QueryField STRANGE_PARENT_TITLE = field(\\"StrangeExplicitChild\\", \\"strangeParentTitle\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String strangeId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"CompositePKParent\\", isRequired = true) @BelongsTo(targetName = \\"strangeParentId\\", type = CompositePKParent.class) ModelReference parent; - private final @ModelField(targetType=\\"String\\") String strangeParentTitle; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final StrangeExplicitChildPath rootPath = new StrangeExplicitChildPath("root", false, null); + public static final QueryField ID = field("StrangeExplicitChild", "id"); + public static final QueryField STRANGE_ID = field("StrangeExplicitChild", "strangeId"); + public static final QueryField CONTENT = field("StrangeExplicitChild", "content"); + public static final QueryField PARENT = field("StrangeExplicitChild", "strangeParentId"); + public static final QueryField STRANGE_PARENT_TITLE = field("StrangeExplicitChild", "strangeParentTitle"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String strangeId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="CompositePKParent", isRequired = true) @BelongsTo(targetName = "strangeParentId", type = CompositePKParent.class) ModelReference parent; + private final @ModelField(targetType="String") String strangeParentTitle; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -2169,15 +2169,15 @@ public final class StrangeExplicitChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"StrangeExplicitChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"strangeId=\\" + String.valueOf(getStrangeId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"strangeParentTitle=\\" + String.valueOf(getStrangeParentTitle()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("StrangeExplicitChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("strangeId=" + String.valueOf(getStrangeId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("strangeParentTitle=" + String.valueOf(getStrangeParentTitle()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2332,26 +2332,26 @@ public final class StrangeExplicitChild implements Model { } /** This is an auto generated class representing the ChildSansBelongsTo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"ChildSansBelongsTos\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"childId\\",\\"content\\"}) -@Index(name = \\"byParent\\", fields = {\\"compositePKParentChildrenSansBelongsToCustomId\\",\\"compositePKParentChildrenSansBelongsToContent\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "ChildSansBelongsTos", hasLazySupport = true) +@Index(name = "undefined", fields = {"childId","content"}) +@Index(name = "byParent", fields = {"compositePKParentChildrenSansBelongsToCustomId","compositePKParentChildrenSansBelongsToContent"}) public final class ChildSansBelongsTo implements Model { - public static final ChildSansBelongsToPath rootPath = new ChildSansBelongsToPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"ChildSansBelongsTo\\", \\"id\\"); - public static final QueryField CHILD_ID = field(\\"ChildSansBelongsTo\\", \\"childId\\"); - public static final QueryField CONTENT = field(\\"ChildSansBelongsTo\\", \\"content\\"); - public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_CUSTOM_ID = field(\\"ChildSansBelongsTo\\", \\"compositePKParentChildrenSansBelongsToCustomId\\"); - public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_CONTENT = field(\\"ChildSansBelongsTo\\", \\"compositePKParentChildrenSansBelongsToContent\\"); - public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_ID = field(\\"ChildSansBelongsTo\\", \\"compositePKParentChildrenSansBelongsToId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String childId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String compositePKParentChildrenSansBelongsToCustomId; - private final @ModelField(targetType=\\"String\\") String compositePKParentChildrenSansBelongsToContent; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String compositePKParentChildrenSansBelongsToId; + public static final ChildSansBelongsToPath rootPath = new ChildSansBelongsToPath("root", false, null); + public static final QueryField ID = field("ChildSansBelongsTo", "id"); + public static final QueryField CHILD_ID = field("ChildSansBelongsTo", "childId"); + public static final QueryField CONTENT = field("ChildSansBelongsTo", "content"); + public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_CUSTOM_ID = field("ChildSansBelongsTo", "compositePKParentChildrenSansBelongsToCustomId"); + public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_CONTENT = field("ChildSansBelongsTo", "compositePKParentChildrenSansBelongsToContent"); + public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_ID = field("ChildSansBelongsTo", "compositePKParentChildrenSansBelongsToId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String childId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="ID", isRequired = true) String compositePKParentChildrenSansBelongsToCustomId; + private final @ModelField(targetType="String") String compositePKParentChildrenSansBelongsToContent; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String compositePKParentChildrenSansBelongsToId; public String getId() { return id; } @@ -2430,16 +2430,16 @@ public final class ChildSansBelongsTo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"ChildSansBelongsTo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"childId=\\" + String.valueOf(getChildId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"compositePKParentChildrenSansBelongsToCustomId=\\" + String.valueOf(getCompositePkParentChildrenSansBelongsToCustomId()) + \\", \\") - .append(\\"compositePKParentChildrenSansBelongsToContent=\\" + String.valueOf(getCompositePkParentChildrenSansBelongsToContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"compositePKParentChildrenSansBelongsToId=\\" + String.valueOf(getCompositePkParentChildrenSansBelongsToId())) - .append(\\"}\\") + .append("ChildSansBelongsTo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("childId=" + String.valueOf(getChildId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("compositePKParentChildrenSansBelongsToCustomId=" + String.valueOf(getCompositePkParentChildrenSansBelongsToCustomId()) + ", ") + .append("compositePKParentChildrenSansBelongsToContent=" + String.valueOf(getCompositePkParentChildrenSansBelongsToContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("compositePKParentChildrenSansBelongsToId=" + String.valueOf(getCompositePkParentChildrenSansBelongsToId())) + .append("}") .toString(); } @@ -2638,19 +2638,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Parent type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Parents\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Parents", hasLazySupport = true) +@Index(name = "undefined", fields = {"id"}) public final class Parent implements Model { - public static final ParentPath rootPath = new ParentPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Parent\\", \\"id\\"); - public static final QueryField PARENT_CHILD_ID = field(\\"Parent\\", \\"parentChildId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"HasOneChild\\") @HasOne(associatedWith = \\"id\\", type = HasOneChild.class) ModelReference child = null; - private final @ModelField(targetType=\\"HasManyChild\\") @HasMany(associatedWith = \\"parent\\", type = HasManyChild.class) ModelList children = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String parentChildId; + public static final ParentPath rootPath = new ParentPath("root", false, null); + public static final QueryField ID = field("Parent", "id"); + public static final QueryField PARENT_CHILD_ID = field("Parent", "parentChildId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="HasOneChild") @HasOne(associatedWith = "id", type = HasOneChild.class) ModelReference child = null; + private final @ModelField(targetType="HasManyChild") @HasMany(associatedWith = "parent", type = HasManyChild.class) ModelList children = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String parentChildId; public String getId() { return id; } @@ -2709,12 +2709,12 @@ public final class Parent implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Parent {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"parentChildId=\\" + String.valueOf(getParentChildId())) - .append(\\"}\\") + .append("Parent {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("parentChildId=" + String.valueOf(getParentChildId())) + .append("}") .toString(); } @@ -2801,17 +2801,17 @@ public final class Parent implements Model { } /** This is an auto generated class representing the HasOneChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"HasOneChildren\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "HasOneChildren", hasLazySupport = true) +@Index(name = "undefined", fields = {"id"}) public final class HasOneChild implements Model { - public static final HasOneChildPath rootPath = new HasOneChildPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"HasOneChild\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"HasOneChild\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final HasOneChildPath rootPath = new HasOneChildPath("root", false, null); + public static final QueryField ID = field("HasOneChild", "id"); + public static final QueryField CONTENT = field("HasOneChild", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -2862,12 +2862,12 @@ public final class HasOneChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"HasOneChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("HasOneChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2954,19 +2954,19 @@ public final class HasOneChild implements Model { } /** This is an auto generated class representing the HasManyChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"HasManyChildren\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "HasManyChildren", hasLazySupport = true) +@Index(name = "undefined", fields = {"id"}) public final class HasManyChild implements Model { - public static final HasManyChildPath rootPath = new HasManyChildPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"HasManyChild\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"HasManyChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"HasManyChild\\", \\"parentChildrenId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"Parent\\") @BelongsTo(targetName = \\"parentChildrenId\\", type = Parent.class) ModelReference parent; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final HasManyChildPath rootPath = new HasManyChildPath("root", false, null); + public static final QueryField ID = field("HasManyChild", "id"); + public static final QueryField CONTENT = field("HasManyChild", "content"); + public static final QueryField PARENT = field("HasManyChild", "parentChildrenId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="Parent") @BelongsTo(targetName = "parentChildrenId", type = Parent.class) ModelReference parent; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3024,13 +3024,13 @@ public final class HasManyChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"HasManyChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("HasManyChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3159,22 +3159,22 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Project type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Projects\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"projectId\\",\\"name\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Projects", hasLazySupport = true) +@Index(name = "undefined", fields = {"projectId","name"}) public final class Project implements Model { - public static final ProjectPath rootPath = new ProjectPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Project\\", \\"id\\"); - public static final QueryField PROJECT_ID = field(\\"Project\\", \\"projectId\\"); - public static final QueryField NAME = field(\\"Project\\", \\"name\\"); - public static final QueryField PROJECT_TEAM_ID = field(\\"Project\\", \\"projectTeamId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String projectId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Team\\") @HasOne(associatedWith = \\"teamId\\", type = Team.class) ModelReference team = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String projectTeamId; + public static final ProjectPath rootPath = new ProjectPath("root", false, null); + public static final QueryField ID = field("Project", "id"); + public static final QueryField PROJECT_ID = field("Project", "projectId"); + public static final QueryField NAME = field("Project", "name"); + public static final QueryField PROJECT_TEAM_ID = field("Project", "projectTeamId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String projectId; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Team") @HasOne(associatedWith = "teamId", type = Team.class) ModelReference team = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String projectTeamId; public String getId() { return id; } @@ -3243,14 +3243,14 @@ public final class Project implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Project {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"projectId=\\" + String.valueOf(getProjectId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"projectTeamId=\\" + String.valueOf(getProjectTeamId())) - .append(\\"}\\") + .append("Project {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("projectId=" + String.valueOf(getProjectId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("projectTeamId=" + String.valueOf(getProjectTeamId())) + .append("}") .toString(); } @@ -3382,21 +3382,21 @@ public final class Project implements Model { } /** This is an auto generated class representing the Team type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Teams\\", hasLazySupport = true) -@Index(name = \\"undefined\\", fields = {\\"teamId\\",\\"name\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Teams", hasLazySupport = true) +@Index(name = "undefined", fields = {"teamId","name"}) public final class Team implements Model { - public static final TeamPath rootPath = new TeamPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Team\\", \\"id\\"); - public static final QueryField TEAM_ID = field(\\"Team\\", \\"teamId\\"); - public static final QueryField NAME = field(\\"Team\\", \\"name\\"); - public static final QueryField PROJECT = field(\\"Team\\", \\"teamProjectId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String teamId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Project\\") @BelongsTo(targetName = \\"teamProjectId\\", type = Project.class) ModelReference project; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final TeamPath rootPath = new TeamPath("root", false, null); + public static final QueryField ID = field("Team", "id"); + public static final QueryField TEAM_ID = field("Team", "teamId"); + public static final QueryField NAME = field("Team", "name"); + public static final QueryField PROJECT = field("Team", "teamProjectId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String teamId; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Project") @BelongsTo(targetName = "teamProjectId", type = Project.class) ModelReference project; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3461,14 +3461,14 @@ public final class Team implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Team {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"teamId=\\" + String.valueOf(getTeamId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"project=\\" + String.valueOf(getProject()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Team {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("teamId=" + String.valueOf(getTeamId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("project=" + String.valueOf(getProject()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3623,17 +3623,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the DefaultPKParent type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"DefaultPKParents\\") -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "DefaultPKParents") +@Index(name = "undefined", fields = {"id"}) public final class DefaultPKParent implements Model { - public static final QueryField ID = field(\\"DefaultPKParent\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"DefaultPKParent\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"DefaultPKChild\\") @HasMany(associatedWith = \\"parent\\", type = DefaultPKChild.class) List children = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("DefaultPKParent", "id"); + public static final QueryField CONTENT = field("DefaultPKParent", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="DefaultPKChild") @HasMany(associatedWith = "parent", type = DefaultPKChild.class) List children = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3688,12 +3688,12 @@ public final class DefaultPKParent implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"DefaultPKParent {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("DefaultPKParent {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3780,18 +3780,18 @@ public final class DefaultPKParent implements Model { } /** This is an auto generated class representing the DefaultPKChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"DefaultPKChildren\\") -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "DefaultPKChildren") +@Index(name = "undefined", fields = {"id"}) public final class DefaultPKChild implements Model { - public static final QueryField ID = field(\\"DefaultPKChild\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"DefaultPKChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"DefaultPKChild\\", \\"defaultPKParentChildrenId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"DefaultPKParent\\") @BelongsTo(targetName = \\"defaultPKParentChildrenId\\", type = DefaultPKParent.class) DefaultPKParent parent; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("DefaultPKChild", "id"); + public static final QueryField CONTENT = field("DefaultPKChild", "content"); + public static final QueryField PARENT = field("DefaultPKChild", "defaultPKParentChildrenId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="DefaultPKParent") @BelongsTo(targetName = "defaultPKParentChildrenId", type = DefaultPKParent.class) DefaultPKParent parent; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3849,13 +3849,13 @@ public final class DefaultPKChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"DefaultPKChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("DefaultPKChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3981,17 +3981,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the HasOneParent type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"HasOneParents\\") -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "HasOneParents") +@Index(name = "undefined", fields = {"id"}) public final class HasOneParent implements Model { - public static final QueryField ID = field(\\"HasOneParent\\", \\"id\\"); - public static final QueryField HAS_ONE_PARENT_CHILD_ID = field(\\"HasOneParent\\", \\"hasOneParentChildId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"HasOneChild\\") @HasOne(associatedWith = \\"id\\", type = HasOneChild.class) HasOneChild child = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String hasOneParentChildId; + public static final QueryField ID = field("HasOneParent", "id"); + public static final QueryField HAS_ONE_PARENT_CHILD_ID = field("HasOneParent", "hasOneParentChildId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="HasOneChild") @HasOne(associatedWith = "id", type = HasOneChild.class) HasOneChild child = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String hasOneParentChildId; public String getId() { return id; } @@ -4046,12 +4046,12 @@ public final class HasOneParent implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"HasOneParent {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"hasOneParentChildId=\\" + String.valueOf(getHasOneParentChildId())) - .append(\\"}\\") + .append("HasOneParent {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("hasOneParentChildId=" + String.valueOf(getHasOneParentChildId())) + .append("}") .toString(); } @@ -4138,16 +4138,16 @@ public final class HasOneParent implements Model { } /** This is an auto generated class representing the HasOneChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"HasOneChildren\\") -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "HasOneChildren") +@Index(name = "undefined", fields = {"id"}) public final class HasOneChild implements Model { - public static final QueryField ID = field(\\"HasOneChild\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"HasOneChild\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("HasOneChild", "id"); + public static final QueryField CONTENT = field("HasOneChild", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4198,12 +4198,12 @@ public final class HasOneChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"HasOneChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("HasOneChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4313,19 +4313,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Blog type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Blogs\\") -@Index(name = \\"undefined\\", fields = {\\"blogId\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Blogs") +@Index(name = "undefined", fields = {"blogId"}) public final class Blog implements Model { - public static final QueryField ID = field(\\"Blog\\", \\"id\\"); - public static final QueryField BLOG_ID = field(\\"Blog\\", \\"blogId\\"); - public static final QueryField NAME = field(\\"Blog\\", \\"name\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String blogId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Post\\", isRequired = true) @HasMany(associatedWith = \\"blog\\", type = Post.class) List posts = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Blog", "id"); + public static final QueryField BLOG_ID = field("Blog", "blogId"); + public static final QueryField NAME = field("Blog", "name"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String blogId; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Post", isRequired = true) @HasMany(associatedWith = "blog", type = Post.class) List posts = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4387,13 +4387,13 @@ public final class Blog implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Blog {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"blogId=\\" + String.valueOf(getBlogId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Blog {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("blogId=" + String.valueOf(getBlogId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4508,21 +4508,21 @@ public final class Blog implements Model { } /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\") -@Index(name = \\"undefined\\", fields = {\\"postId\\",\\"title\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts") +@Index(name = "undefined", fields = {"postId","title"}) public final class Post implements Model { - public static final QueryField ID = field(\\"Post\\", \\"id\\"); - public static final QueryField POST_ID = field(\\"Post\\", \\"postId\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - public static final QueryField BLOG = field(\\"Post\\", \\"blogPostsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String postId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Blog\\", isRequired = true) @BelongsTo(targetName = \\"blogPostsId\\", type = Blog.class) Blog blog; - private final @ModelField(targetType=\\"Comment\\", isRequired = true) @HasMany(associatedWith = \\"post\\", type = Comment.class) List comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Post", "id"); + public static final QueryField POST_ID = field("Post", "postId"); + public static final QueryField TITLE = field("Post", "title"); + public static final QueryField BLOG = field("Post", "blogPostsId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String postId; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Blog", isRequired = true) @BelongsTo(targetName = "blogPostsId", type = Blog.class) Blog blog; + private final @ModelField(targetType="Comment", isRequired = true) @HasMany(associatedWith = "post", type = Comment.class) List comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4591,14 +4591,14 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"postId=\\" + String.valueOf(getPostId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"blog=\\" + String.valueOf(getBlog()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("postId=" + String.valueOf(getPostId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("blog=" + String.valueOf(getBlog()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4736,20 +4736,20 @@ public final class Post implements Model { } /** This is an auto generated class representing the Comment type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comments\\") -@Index(name = \\"undefined\\", fields = {\\"commentId\\",\\"content\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comments") +@Index(name = "undefined", fields = {"commentId","content"}) public final class Comment implements Model { - public static final QueryField ID = field(\\"Comment\\", \\"id\\"); - public static final QueryField COMMENT_ID = field(\\"Comment\\", \\"commentId\\"); - public static final QueryField CONTENT = field(\\"Comment\\", \\"content\\"); - public static final QueryField POST = field(\\"Comment\\", \\"postCommentsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String commentId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"Post\\", isRequired = true) @BelongsTo(targetName = \\"postCommentsId\\", type = Post.class) Post post; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Comment", "id"); + public static final QueryField COMMENT_ID = field("Comment", "commentId"); + public static final QueryField CONTENT = field("Comment", "content"); + public static final QueryField POST = field("Comment", "postCommentsId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String commentId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="Post", isRequired = true) @BelongsTo(targetName = "postCommentsId", type = Post.class) Post post; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4814,14 +4814,14 @@ public final class Comment implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"commentId=\\" + String.valueOf(getCommentId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"post=\\" + String.valueOf(getPost()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Comment {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("commentId=" + String.valueOf(getCommentId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("post=" + String.valueOf(getPost()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4982,22 +4982,22 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the CompositePKParent type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"CompositePKParents\\") -@Index(name = \\"undefined\\", fields = {\\"customId\\",\\"content\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "CompositePKParents") +@Index(name = "undefined", fields = {"customId","content"}) public final class CompositePKParent implements Model { - public static final QueryField ID = field(\\"CompositePKParent\\", \\"id\\"); - public static final QueryField CUSTOM_ID = field(\\"CompositePKParent\\", \\"customId\\"); - public static final QueryField CONTENT = field(\\"CompositePKParent\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String customId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"CompositePKChild\\") @HasMany(associatedWith = \\"parent\\", type = CompositePKChild.class) List children = null; - private final @ModelField(targetType=\\"ImplicitChild\\") @HasMany(associatedWith = \\"parent\\", type = ImplicitChild.class) List implicitChildren = null; - private final @ModelField(targetType=\\"StrangeExplicitChild\\") @HasMany(associatedWith = \\"parent\\", type = StrangeExplicitChild.class) List strangeChildren = null; - private final @ModelField(targetType=\\"ChildSansBelongsTo\\") @HasMany(associatedWith = \\"compositePKParentChildrenSansBelongsToId\\", type = ChildSansBelongsTo.class) List childrenSansBelongsTo = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("CompositePKParent", "id"); + public static final QueryField CUSTOM_ID = field("CompositePKParent", "customId"); + public static final QueryField CONTENT = field("CompositePKParent", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String customId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="CompositePKChild") @HasMany(associatedWith = "parent", type = CompositePKChild.class) List children = null; + private final @ModelField(targetType="ImplicitChild") @HasMany(associatedWith = "parent", type = ImplicitChild.class) List implicitChildren = null; + private final @ModelField(targetType="StrangeExplicitChild") @HasMany(associatedWith = "parent", type = StrangeExplicitChild.class) List strangeChildren = null; + private final @ModelField(targetType="ChildSansBelongsTo") @HasMany(associatedWith = "compositePKParentChildrenSansBelongsToId", type = ChildSansBelongsTo.class) List childrenSansBelongsTo = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -5071,13 +5071,13 @@ public final class CompositePKParent implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"CompositePKParent {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"customId=\\" + String.valueOf(getCustomId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("CompositePKParent {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("customId=" + String.valueOf(getCustomId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -5192,23 +5192,23 @@ public final class CompositePKParent implements Model { } /** This is an auto generated class representing the CompositePKChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"CompositePKChildren\\") -@Index(name = \\"undefined\\", fields = {\\"childId\\",\\"content\\"}) -@Index(name = \\"byParent\\", fields = {\\"parentId\\",\\"parentTitle\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "CompositePKChildren") +@Index(name = "undefined", fields = {"childId","content"}) +@Index(name = "byParent", fields = {"parentId","parentTitle"}) public final class CompositePKChild implements Model { - public static final QueryField ID = field(\\"CompositePKChild\\", \\"id\\"); - public static final QueryField CHILD_ID = field(\\"CompositePKChild\\", \\"childId\\"); - public static final QueryField CONTENT = field(\\"CompositePKChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"CompositePKChild\\", \\"parentId\\"); - public static final QueryField PARENT_TITLE = field(\\"CompositePKChild\\", \\"parentTitle\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String childId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"CompositePKParent\\") @BelongsTo(targetName = \\"parentId\\", type = CompositePKParent.class) CompositePKParent parent; - private final @ModelField(targetType=\\"String\\") String parentTitle; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("CompositePKChild", "id"); + public static final QueryField CHILD_ID = field("CompositePKChild", "childId"); + public static final QueryField CONTENT = field("CompositePKChild", "content"); + public static final QueryField PARENT = field("CompositePKChild", "parentId"); + public static final QueryField PARENT_TITLE = field("CompositePKChild", "parentTitle"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String childId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="CompositePKParent") @BelongsTo(targetName = "parentId", type = CompositePKParent.class) CompositePKParent parent; + private final @ModelField(targetType="String") String parentTitle; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -5280,15 +5280,15 @@ public final class CompositePKChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"CompositePKChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"childId=\\" + String.valueOf(getChildId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"parentTitle=\\" + String.valueOf(getParentTitle()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("CompositePKChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("childId=" + String.valueOf(getChildId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("parentTitle=" + String.valueOf(getParentTitle()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -5437,20 +5437,20 @@ public final class CompositePKChild implements Model { } /** This is an auto generated class representing the ImplicitChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"ImplicitChildren\\") -@Index(name = \\"undefined\\", fields = {\\"childId\\",\\"content\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "ImplicitChildren") +@Index(name = "undefined", fields = {"childId","content"}) public final class ImplicitChild implements Model { - public static final QueryField ID = field(\\"ImplicitChild\\", \\"id\\"); - public static final QueryField CHILD_ID = field(\\"ImplicitChild\\", \\"childId\\"); - public static final QueryField CONTENT = field(\\"ImplicitChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"ImplicitChild\\", \\"compositePKParentImplicitChildrenId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String childId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"CompositePKParent\\", isRequired = true) @BelongsTo(targetName = \\"compositePKParentImplicitChildrenId\\", type = CompositePKParent.class) CompositePKParent parent; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("ImplicitChild", "id"); + public static final QueryField CHILD_ID = field("ImplicitChild", "childId"); + public static final QueryField CONTENT = field("ImplicitChild", "content"); + public static final QueryField PARENT = field("ImplicitChild", "compositePKParentImplicitChildrenId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String childId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="CompositePKParent", isRequired = true) @BelongsTo(targetName = "compositePKParentImplicitChildrenId", type = CompositePKParent.class) CompositePKParent parent; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -5515,14 +5515,14 @@ public final class ImplicitChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"ImplicitChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"childId=\\" + String.valueOf(getChildId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("ImplicitChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("childId=" + String.valueOf(getChildId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -5660,23 +5660,23 @@ public final class ImplicitChild implements Model { } /** This is an auto generated class representing the StrangeExplicitChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"StrangeExplicitChildren\\") -@Index(name = \\"undefined\\", fields = {\\"strangeId\\",\\"content\\"}) -@Index(name = \\"byCompositePKParentX\\", fields = {\\"strangeParentId\\",\\"strangeParentTitle\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "StrangeExplicitChildren") +@Index(name = "undefined", fields = {"strangeId","content"}) +@Index(name = "byCompositePKParentX", fields = {"strangeParentId","strangeParentTitle"}) public final class StrangeExplicitChild implements Model { - public static final QueryField ID = field(\\"StrangeExplicitChild\\", \\"id\\"); - public static final QueryField STRANGE_ID = field(\\"StrangeExplicitChild\\", \\"strangeId\\"); - public static final QueryField CONTENT = field(\\"StrangeExplicitChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"StrangeExplicitChild\\", \\"strangeParentId\\"); - public static final QueryField STRANGE_PARENT_TITLE = field(\\"StrangeExplicitChild\\", \\"strangeParentTitle\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String strangeId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"CompositePKParent\\", isRequired = true) @BelongsTo(targetName = \\"strangeParentId\\", type = CompositePKParent.class) CompositePKParent parent; - private final @ModelField(targetType=\\"String\\") String strangeParentTitle; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("StrangeExplicitChild", "id"); + public static final QueryField STRANGE_ID = field("StrangeExplicitChild", "strangeId"); + public static final QueryField CONTENT = field("StrangeExplicitChild", "content"); + public static final QueryField PARENT = field("StrangeExplicitChild", "strangeParentId"); + public static final QueryField STRANGE_PARENT_TITLE = field("StrangeExplicitChild", "strangeParentTitle"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String strangeId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="CompositePKParent", isRequired = true) @BelongsTo(targetName = "strangeParentId", type = CompositePKParent.class) CompositePKParent parent; + private final @ModelField(targetType="String") String strangeParentTitle; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -5748,15 +5748,15 @@ public final class StrangeExplicitChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"StrangeExplicitChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"strangeId=\\" + String.valueOf(getStrangeId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"strangeParentTitle=\\" + String.valueOf(getStrangeParentTitle()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("StrangeExplicitChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("strangeId=" + String.valueOf(getStrangeId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("strangeParentTitle=" + String.valueOf(getStrangeParentTitle()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -5911,25 +5911,25 @@ public final class StrangeExplicitChild implements Model { } /** This is an auto generated class representing the ChildSansBelongsTo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"ChildSansBelongsTos\\") -@Index(name = \\"undefined\\", fields = {\\"childId\\",\\"content\\"}) -@Index(name = \\"byParent\\", fields = {\\"compositePKParentChildrenSansBelongsToCustomId\\",\\"compositePKParentChildrenSansBelongsToContent\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "ChildSansBelongsTos") +@Index(name = "undefined", fields = {"childId","content"}) +@Index(name = "byParent", fields = {"compositePKParentChildrenSansBelongsToCustomId","compositePKParentChildrenSansBelongsToContent"}) public final class ChildSansBelongsTo implements Model { - public static final QueryField ID = field(\\"ChildSansBelongsTo\\", \\"id\\"); - public static final QueryField CHILD_ID = field(\\"ChildSansBelongsTo\\", \\"childId\\"); - public static final QueryField CONTENT = field(\\"ChildSansBelongsTo\\", \\"content\\"); - public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_CUSTOM_ID = field(\\"ChildSansBelongsTo\\", \\"compositePKParentChildrenSansBelongsToCustomId\\"); - public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_CONTENT = field(\\"ChildSansBelongsTo\\", \\"compositePKParentChildrenSansBelongsToContent\\"); - public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_ID = field(\\"ChildSansBelongsTo\\", \\"compositePKParentChildrenSansBelongsToId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String childId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String compositePKParentChildrenSansBelongsToCustomId; - private final @ModelField(targetType=\\"String\\") String compositePKParentChildrenSansBelongsToContent; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String compositePKParentChildrenSansBelongsToId; + public static final QueryField ID = field("ChildSansBelongsTo", "id"); + public static final QueryField CHILD_ID = field("ChildSansBelongsTo", "childId"); + public static final QueryField CONTENT = field("ChildSansBelongsTo", "content"); + public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_CUSTOM_ID = field("ChildSansBelongsTo", "compositePKParentChildrenSansBelongsToCustomId"); + public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_CONTENT = field("ChildSansBelongsTo", "compositePKParentChildrenSansBelongsToContent"); + public static final QueryField COMPOSITE_PK_PARENT_CHILDREN_SANS_BELONGS_TO_ID = field("ChildSansBelongsTo", "compositePKParentChildrenSansBelongsToId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String childId; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="ID", isRequired = true) String compositePKParentChildrenSansBelongsToCustomId; + private final @ModelField(targetType="String") String compositePKParentChildrenSansBelongsToContent; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String compositePKParentChildrenSansBelongsToId; public String getId() { return id; } @@ -6008,16 +6008,16 @@ public final class ChildSansBelongsTo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"ChildSansBelongsTo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"childId=\\" + String.valueOf(getChildId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"compositePKParentChildrenSansBelongsToCustomId=\\" + String.valueOf(getCompositePkParentChildrenSansBelongsToCustomId()) + \\", \\") - .append(\\"compositePKParentChildrenSansBelongsToContent=\\" + String.valueOf(getCompositePkParentChildrenSansBelongsToContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"compositePKParentChildrenSansBelongsToId=\\" + String.valueOf(getCompositePkParentChildrenSansBelongsToId())) - .append(\\"}\\") + .append("ChildSansBelongsTo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("childId=" + String.valueOf(getChildId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("compositePKParentChildrenSansBelongsToCustomId=" + String.valueOf(getCompositePkParentChildrenSansBelongsToCustomId()) + ", ") + .append("compositePKParentChildrenSansBelongsToContent=" + String.valueOf(getCompositePkParentChildrenSansBelongsToContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("compositePKParentChildrenSansBelongsToId=" + String.valueOf(getCompositePkParentChildrenSansBelongsToId())) + .append("}") .toString(); } @@ -6213,18 +6213,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Parent type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Parents\\") -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Parents") +@Index(name = "undefined", fields = {"id"}) public final class Parent implements Model { - public static final QueryField ID = field(\\"Parent\\", \\"id\\"); - public static final QueryField PARENT_CHILD_ID = field(\\"Parent\\", \\"parentChildId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"HasOneChild\\") @HasOne(associatedWith = \\"id\\", type = HasOneChild.class) HasOneChild child = null; - private final @ModelField(targetType=\\"HasManyChild\\") @HasMany(associatedWith = \\"parent\\", type = HasManyChild.class) List children = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String parentChildId; + public static final QueryField ID = field("Parent", "id"); + public static final QueryField PARENT_CHILD_ID = field("Parent", "parentChildId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="HasOneChild") @HasOne(associatedWith = "id", type = HasOneChild.class) HasOneChild child = null; + private final @ModelField(targetType="HasManyChild") @HasMany(associatedWith = "parent", type = HasManyChild.class) List children = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String parentChildId; public String getId() { return id; } @@ -6283,12 +6283,12 @@ public final class Parent implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Parent {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"parentChildId=\\" + String.valueOf(getParentChildId())) - .append(\\"}\\") + .append("Parent {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("parentChildId=" + String.valueOf(getParentChildId())) + .append("}") .toString(); } @@ -6375,16 +6375,16 @@ public final class Parent implements Model { } /** This is an auto generated class representing the HasOneChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"HasOneChildren\\") -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "HasOneChildren") +@Index(name = "undefined", fields = {"id"}) public final class HasOneChild implements Model { - public static final QueryField ID = field(\\"HasOneChild\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"HasOneChild\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("HasOneChild", "id"); + public static final QueryField CONTENT = field("HasOneChild", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -6435,12 +6435,12 @@ public final class HasOneChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"HasOneChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("HasOneChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -6527,18 +6527,18 @@ public final class HasOneChild implements Model { } /** This is an auto generated class representing the HasManyChild type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"HasManyChildren\\") -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "HasManyChildren") +@Index(name = "undefined", fields = {"id"}) public final class HasManyChild implements Model { - public static final QueryField ID = field(\\"HasManyChild\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"HasManyChild\\", \\"content\\"); - public static final QueryField PARENT = field(\\"HasManyChild\\", \\"parentChildrenId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"Parent\\") @BelongsTo(targetName = \\"parentChildrenId\\", type = Parent.class) Parent parent; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("HasManyChild", "id"); + public static final QueryField CONTENT = field("HasManyChild", "content"); + public static final QueryField PARENT = field("HasManyChild", "parentChildrenId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="Parent") @BelongsTo(targetName = "parentChildrenId", type = Parent.class) Parent parent; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -6596,13 +6596,13 @@ public final class HasManyChild implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"HasManyChild {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"parent=\\" + String.valueOf(getParent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("HasManyChild {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("parent=" + String.valueOf(getParent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -6729,21 +6729,21 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Project type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Projects\\") -@Index(name = \\"undefined\\", fields = {\\"projectId\\",\\"name\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Projects") +@Index(name = "undefined", fields = {"projectId","name"}) public final class Project implements Model { - public static final QueryField ID = field(\\"Project\\", \\"id\\"); - public static final QueryField PROJECT_ID = field(\\"Project\\", \\"projectId\\"); - public static final QueryField NAME = field(\\"Project\\", \\"name\\"); - public static final QueryField PROJECT_TEAM_ID = field(\\"Project\\", \\"projectTeamId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String projectId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Team\\") @HasOne(associatedWith = \\"teamId\\", type = Team.class) Team team = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String projectTeamId; + public static final QueryField ID = field("Project", "id"); + public static final QueryField PROJECT_ID = field("Project", "projectId"); + public static final QueryField NAME = field("Project", "name"); + public static final QueryField PROJECT_TEAM_ID = field("Project", "projectTeamId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String projectId; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Team") @HasOne(associatedWith = "teamId", type = Team.class) Team team = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String projectTeamId; public String getId() { return id; } @@ -6812,14 +6812,14 @@ public final class Project implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Project {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"projectId=\\" + String.valueOf(getProjectId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"projectTeamId=\\" + String.valueOf(getProjectTeamId())) - .append(\\"}\\") + .append("Project {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("projectId=" + String.valueOf(getProjectId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("projectTeamId=" + String.valueOf(getProjectTeamId())) + .append("}") .toString(); } @@ -6951,20 +6951,20 @@ public final class Project implements Model { } /** This is an auto generated class representing the Team type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Teams\\") -@Index(name = \\"undefined\\", fields = {\\"teamId\\",\\"name\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Teams") +@Index(name = "undefined", fields = {"teamId","name"}) public final class Team implements Model { - public static final QueryField ID = field(\\"Team\\", \\"id\\"); - public static final QueryField TEAM_ID = field(\\"Team\\", \\"teamId\\"); - public static final QueryField NAME = field(\\"Team\\", \\"name\\"); - public static final QueryField PROJECT = field(\\"Team\\", \\"teamProjectId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String teamId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Project\\") @BelongsTo(targetName = \\"teamProjectId\\", type = Project.class) Project project; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Team", "id"); + public static final QueryField TEAM_ID = field("Team", "teamId"); + public static final QueryField NAME = field("Team", "name"); + public static final QueryField PROJECT = field("Team", "teamProjectId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String teamId; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Project") @BelongsTo(targetName = "teamProjectId", type = Project.class) Project project; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -7029,14 +7029,14 @@ public final class Team implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Team {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"teamId=\\" + String.valueOf(getTeamId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"project=\\" + String.valueOf(getProject()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Team {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("teamId=" + String.valueOf(getTeamId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("project=" + String.valueOf(getProject()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-java-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-java-visitor.test.ts.snap index fc89a21b3..a263cdb48 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-java-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-java-visitor.test.ts.snap @@ -22,17 +22,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"id\\",\\"title\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"id","title"}) public final class Post implements Model { - public static final QueryField ID = field(\\"Post\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Comment\\") @HasMany(associatedWith = \\"postCommentsId\\", type = Comment.class) List comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Post", "id"); + public static final QueryField TITLE = field("Post", "title"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Comment") @HasMany(associatedWith = "postCommentsId", type = Comment.class) List comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; private PostIdentifier postIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -97,12 +97,12 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -216,20 +216,20 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Comment type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comments\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"id\\",\\"content\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comments", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"id","content"}) public final class Comment implements Model { - public static final QueryField ID = field(\\"Comment\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"Comment\\", \\"content\\"); - public static final QueryField POST_COMMENTS_ID = field(\\"Comment\\", \\"postCommentsId\\"); - public static final QueryField POST_COMMENTS_TITLE = field(\\"Comment\\", \\"postCommentsTitle\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String postCommentsId; - private final @ModelField(targetType=\\"String\\") String postCommentsTitle; + public static final QueryField ID = field("Comment", "id"); + public static final QueryField CONTENT = field("Comment", "content"); + public static final QueryField POST_COMMENTS_ID = field("Comment", "postCommentsId"); + public static final QueryField POST_COMMENTS_TITLE = field("Comment", "postCommentsTitle"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String postCommentsId; + private final @ModelField(targetType="String") String postCommentsTitle; private CommentIdentifier commentIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -304,14 +304,14 @@ public final class Comment implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"postCommentsId=\\" + String.valueOf(getPostCommentsId()) + \\", \\") - .append(\\"postCommentsTitle=\\" + String.valueOf(getPostCommentsTitle())) - .append(\\"}\\") + .append("Comment {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("postCommentsId=" + String.valueOf(getPostCommentsId()) + ", ") + .append("postCommentsTitle=" + String.valueOf(getPostCommentsTitle())) + .append("}") .toString(); } @@ -458,21 +458,21 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Project type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Projects\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"projectId\\",\\"name\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Projects", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"projectId","name"}) public final class Project implements Model { - public static final QueryField PROJECT_ID = field(\\"Project\\", \\"projectId\\"); - public static final QueryField NAME = field(\\"Project\\", \\"name\\"); - public static final QueryField PROJECT_TEAM_TEAM_ID = field(\\"Project\\", \\"projectTeamTeamId\\"); - public static final QueryField PROJECT_TEAM_NAME = field(\\"Project\\", \\"projectTeamName\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String projectId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Team\\") @HasOne(associatedWith = \\"project\\", type = Team.class) Team team = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String projectTeamTeamId; - private final @ModelField(targetType=\\"String\\") String projectTeamName; + public static final QueryField PROJECT_ID = field("Project", "projectId"); + public static final QueryField NAME = field("Project", "name"); + public static final QueryField PROJECT_TEAM_TEAM_ID = field("Project", "projectTeamTeamId"); + public static final QueryField PROJECT_TEAM_NAME = field("Project", "projectTeamName"); + private final @ModelField(targetType="ID", isRequired = true) String projectId; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Team") @HasOne(associatedWith = "project", type = Team.class) Team team = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String projectTeamTeamId; + private final @ModelField(targetType="String") String projectTeamName; private ProjectIdentifier projectIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -551,14 +551,14 @@ public final class Project implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Project {\\") - .append(\\"projectId=\\" + String.valueOf(getProjectId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"projectTeamTeamId=\\" + String.valueOf(getProjectTeamTeamId()) + \\", \\") - .append(\\"projectTeamName=\\" + String.valueOf(getProjectTeamName())) - .append(\\"}\\") + .append("Project {") + .append("projectId=" + String.valueOf(getProjectId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("projectTeamTeamId=" + String.valueOf(getProjectTeamTeamId()) + ", ") + .append("projectTeamName=" + String.valueOf(getProjectTeamName())) + .append("}") .toString(); } @@ -705,18 +705,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Team type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Teams\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"teamId\\",\\"name\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Teams", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"teamId","name"}) public final class Team implements Model { - public static final QueryField TEAM_ID = field(\\"Team\\", \\"teamId\\"); - public static final QueryField NAME = field(\\"Team\\", \\"name\\"); - public static final QueryField PROJECT = field(\\"Team\\", \\"teamProjectProjectId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String teamId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Project\\") @BelongsTo(targetName = \\"teamProjectProjectId\\", targetNames = {\\"teamProjectProjectId\\", \\"teamProjectName\\"}, type = Project.class) Project project; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField TEAM_ID = field("Team", "teamId"); + public static final QueryField NAME = field("Team", "name"); + public static final QueryField PROJECT = field("Team", "teamProjectProjectId"); + private final @ModelField(targetType="ID", isRequired = true) String teamId; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Project") @BelongsTo(targetName = "teamProjectProjectId", targetNames = {"teamProjectProjectId", "teamProjectName"}, type = Project.class) Project project; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; private TeamIdentifier teamIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -784,13 +784,13 @@ public final class Team implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Team {\\") - .append(\\"teamId=\\" + String.valueOf(getTeamId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"project=\\" + String.valueOf(getProject()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Team {") + .append("teamId=" + String.valueOf(getTeamId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("project=" + String.valueOf(getProject()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -924,24 +924,24 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the NoticeStaff type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"NoticeStaffs\\", type = Model.Type.USER, version = 1, authRules = { - @AuthRule(allow = AuthStrategy.PUBLIC, provider = \\"iam\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "NoticeStaffs", type = Model.Type.USER, version = 1, authRules = { + @AuthRule(allow = AuthStrategy.PUBLIC, provider = "iam", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) -@Index(name = \\"undefined\\", fields = {\\"noticeId\\",\\"staffId\\"}) +@Index(name = "undefined", fields = {"noticeId","staffId"}) public final class NoticeStaff implements Model { - public static final QueryField READ_AT = field(\\"NoticeStaff\\", \\"read_at\\"); - public static final QueryField NOTICE_ID = field(\\"NoticeStaff\\", \\"noticeId\\"); - public static final QueryField STAFF_ID = field(\\"NoticeStaff\\", \\"staffId\\"); - public static final QueryField NOTICE = field(\\"NoticeStaff\\", \\"noticeId\\"); - public static final QueryField STAFF = field(\\"NoticeStaff\\", \\"staffId\\"); - private final @ModelField(targetType=\\"AWSDateTime\\") Temporal.DateTime read_at; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String noticeId; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String staffId; - private final @ModelField(targetType=\\"Notice\\") @BelongsTo(targetName = \\"noticeId\\", targetNames = {\\"noticeId\\"}, type = Notice.class) Notice notice; - private final @ModelField(targetType=\\"Staff\\") @BelongsTo(targetName = \\"staffId\\", targetNames = {\\"staffId\\"}, type = Staff.class) Staff staff; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField READ_AT = field("NoticeStaff", "read_at"); + public static final QueryField NOTICE_ID = field("NoticeStaff", "noticeId"); + public static final QueryField STAFF_ID = field("NoticeStaff", "staffId"); + public static final QueryField NOTICE = field("NoticeStaff", "noticeId"); + public static final QueryField STAFF = field("NoticeStaff", "staffId"); + private final @ModelField(targetType="AWSDateTime") Temporal.DateTime read_at; + private final @ModelField(targetType="ID", isRequired = true) String noticeId; + private final @ModelField(targetType="ID", isRequired = true) String staffId; + private final @ModelField(targetType="Notice") @BelongsTo(targetName = "noticeId", targetNames = {"noticeId"}, type = Notice.class) Notice notice; + private final @ModelField(targetType="Staff") @BelongsTo(targetName = "staffId", targetNames = {"staffId"}, type = Staff.class) Staff staff; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; private NoticeStaffIdentifier noticeStaffIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -1023,15 +1023,15 @@ public final class NoticeStaff implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"NoticeStaff {\\") - .append(\\"read_at=\\" + String.valueOf(getReadAt()) + \\", \\") - .append(\\"noticeId=\\" + String.valueOf(getNoticeId()) + \\", \\") - .append(\\"staffId=\\" + String.valueOf(getStaffId()) + \\", \\") - .append(\\"notice=\\" + String.valueOf(getNotice()) + \\", \\") - .append(\\"staff=\\" + String.valueOf(getStaff()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("NoticeStaff {") + .append("read_at=" + String.valueOf(getReadAt()) + ", ") + .append("noticeId=" + String.valueOf(getNoticeId()) + ", ") + .append("staffId=" + String.valueOf(getStaffId()) + ", ") + .append("notice=" + String.valueOf(getNotice()) + ", ") + .append("staff=" + String.valueOf(getStaff()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1197,21 +1197,21 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the NoticeStaff type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"NoticeStaffs\\", type = Model.Type.USER, version = 1, authRules = { - @AuthRule(allow = AuthStrategy.PUBLIC, provider = \\"iam\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "NoticeStaffs", type = Model.Type.USER, version = 1, authRules = { + @AuthRule(allow = AuthStrategy.PUBLIC, provider = "iam", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class NoticeStaff implements Model { - public static final QueryField ID = field(\\"NoticeStaff\\", \\"id\\"); - public static final QueryField READ_AT = field(\\"NoticeStaff\\", \\"read_at\\"); - public static final QueryField NOTICE = field(\\"NoticeStaff\\", \\"noticeId\\"); - public static final QueryField STAFF = field(\\"NoticeStaff\\", \\"staffId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"AWSDateTime\\") Temporal.DateTime read_at; - private final @ModelField(targetType=\\"Notice\\") @BelongsTo(targetName = \\"noticeId\\", targetNames = {\\"noticeId\\"}, type = Notice.class) Notice notice; - private final @ModelField(targetType=\\"Staff\\") @BelongsTo(targetName = \\"staffId\\", targetNames = {\\"staffId\\"}, type = Staff.class) Staff staff; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("NoticeStaff", "id"); + public static final QueryField READ_AT = field("NoticeStaff", "read_at"); + public static final QueryField NOTICE = field("NoticeStaff", "noticeId"); + public static final QueryField STAFF = field("NoticeStaff", "staffId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="AWSDateTime") Temporal.DateTime read_at; + private final @ModelField(targetType="Notice") @BelongsTo(targetName = "noticeId", targetNames = {"noticeId"}, type = Notice.class) Notice notice; + private final @ModelField(targetType="Staff") @BelongsTo(targetName = "staffId", targetNames = {"staffId"}, type = Staff.class) Staff staff; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -1282,14 +1282,14 @@ public final class NoticeStaff implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"NoticeStaff {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"read_at=\\" + String.valueOf(getReadAt()) + \\", \\") - .append(\\"notice=\\" + String.valueOf(getNotice()) + \\", \\") - .append(\\"staff=\\" + String.valueOf(getStaff()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("NoticeStaff {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("read_at=" + String.valueOf(getReadAt()) + ", ") + .append("notice=" + String.valueOf(getNotice()) + ", ") + .append("staff=" + String.valueOf(getStaff()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1441,19 +1441,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the BlogOwnerWithCustomPKS type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"BlogOwnerWithCustomPKS\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"name\\",\\"wea\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "BlogOwnerWithCustomPKS", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"name","wea"}) public final class BlogOwnerWithCustomPKS implements Model { - public static final QueryField ID = field(\\"BlogOwnerWithCustomPKS\\", \\"id\\"); - public static final QueryField NAME = field(\\"BlogOwnerWithCustomPKS\\", \\"name\\"); - public static final QueryField WEA = field(\\"BlogOwnerWithCustomPKS\\", \\"wea\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"String\\", isRequired = true) String wea; - private final @ModelField(targetType=\\"Blog\\") @HasMany(associatedWith = \\"blogOwner\\", type = Blog.class) List blogs = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("BlogOwnerWithCustomPKS", "id"); + public static final QueryField NAME = field("BlogOwnerWithCustomPKS", "name"); + public static final QueryField WEA = field("BlogOwnerWithCustomPKS", "wea"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="String", isRequired = true) String wea; + private final @ModelField(targetType="Blog") @HasMany(associatedWith = "blogOwner", type = Blog.class) List blogs = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; private BlogOwnerWithCustomPKSIdentifier blogOwnerWithCustomPKSIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -1525,13 +1525,13 @@ public final class BlogOwnerWithCustomPKS implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"BlogOwnerWithCustomPKS {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"wea=\\" + String.valueOf(getWea()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("BlogOwnerWithCustomPKS {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("wea=" + String.valueOf(getWea()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1668,22 +1668,22 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Comment type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comments\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"title\\",\\"content\\",\\"likes\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comments", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"title","content","likes"}) public final class Comment implements Model { - public static final QueryField POST = field(\\"Comment\\", \\"postCommentsPostId\\"); - public static final QueryField TITLE = field(\\"Comment\\", \\"title\\"); - public static final QueryField CONTENT = field(\\"Comment\\", \\"content\\"); - public static final QueryField LIKES = field(\\"Comment\\", \\"likes\\"); - public static final QueryField DESCRIPTION = field(\\"Comment\\", \\"description\\"); - private final @ModelField(targetType=\\"Post\\") @BelongsTo(targetName = \\"postCommentsPostId\\", targetNames = {\\"postCommentsPostId\\"}, type = Post.class) Post post; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"Int\\", isRequired = true) Integer likes; - private final @ModelField(targetType=\\"String\\") String description; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField POST = field("Comment", "postCommentsPostId"); + public static final QueryField TITLE = field("Comment", "title"); + public static final QueryField CONTENT = field("Comment", "content"); + public static final QueryField LIKES = field("Comment", "likes"); + public static final QueryField DESCRIPTION = field("Comment", "description"); + private final @ModelField(targetType="Post") @BelongsTo(targetName = "postCommentsPostId", targetNames = {"postCommentsPostId"}, type = Post.class) Post post; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="Int", isRequired = true) Integer likes; + private final @ModelField(targetType="String") String description; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; private CommentIdentifier commentIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -1765,15 +1765,15 @@ public final class Comment implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment {\\") - .append(\\"post=\\" + String.valueOf(getPost()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"likes=\\" + String.valueOf(getLikes()) + \\", \\") - .append(\\"description=\\" + String.valueOf(getDescription()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Comment {") + .append("post=" + String.valueOf(getPost()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("likes=" + String.valueOf(getLikes()) + ", ") + .append("description=" + String.valueOf(getDescription()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1943,25 +1943,25 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"postId\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"postId"}) public final class Post implements Model { - public static final QueryField POST_ID = field(\\"Post\\", \\"postId\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - public static final QueryField RATING = field(\\"Post\\", \\"rating\\"); - public static final QueryField CREATED = field(\\"Post\\", \\"created\\"); - public static final QueryField BLOG_ID = field(\\"Post\\", \\"blogID\\"); - public static final QueryField BLOG = field(\\"Post\\", \\"blogPostsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String postId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Int\\", isRequired = true) Integer rating; - private final @ModelField(targetType=\\"AWSDateTime\\") Temporal.DateTime created; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String blogID; - private final @ModelField(targetType=\\"Blog\\") @BelongsTo(targetName = \\"blogPostsId\\", targetNames = {\\"blogPostsId\\"}, type = Blog.class) Blog blog; - private final @ModelField(targetType=\\"Comment\\") @HasMany(associatedWith = \\"post\\", type = Comment.class) List comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField POST_ID = field("Post", "postId"); + public static final QueryField TITLE = field("Post", "title"); + public static final QueryField RATING = field("Post", "rating"); + public static final QueryField CREATED = field("Post", "created"); + public static final QueryField BLOG_ID = field("Post", "blogID"); + public static final QueryField BLOG = field("Post", "blogPostsId"); + private final @ModelField(targetType="ID", isRequired = true) String postId; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Int", isRequired = true) Integer rating; + private final @ModelField(targetType="AWSDateTime") Temporal.DateTime created; + private final @ModelField(targetType="ID", isRequired = true) String blogID; + private final @ModelField(targetType="Blog") @BelongsTo(targetName = "blogPostsId", targetNames = {"blogPostsId"}, type = Blog.class) Blog blog; + private final @ModelField(targetType="Comment") @HasMany(associatedWith = "post", type = Comment.class) List comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -2050,16 +2050,16 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"postId=\\" + String.valueOf(getPostId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"rating=\\" + String.valueOf(getRating()) + \\", \\") - .append(\\"created=\\" + String.valueOf(getCreated()) + \\", \\") - .append(\\"blogID=\\" + String.valueOf(getBlogId()) + \\", \\") - .append(\\"blog=\\" + String.valueOf(getBlog()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("postId=" + String.valueOf(getPostId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("rating=" + String.valueOf(getRating()) + ", ") + .append("created=" + String.valueOf(getCreated()) + ", ") + .append("blogID=" + String.valueOf(getBlogId()) + ", ") + .append("blog=" + String.valueOf(getBlog()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2251,18 +2251,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Blog type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Blogs\\", type = Model.Type.USER, version = 1) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Blogs", type = Model.Type.USER, version = 1) public final class Blog implements Model { - public static final QueryField ID = field(\\"Blog\\", \\"id\\"); - public static final QueryField NAME = field(\\"Blog\\", \\"name\\"); - public static final QueryField BLOG_OWNER = field(\\"Blog\\", \\"blogOwnerWithCustomPKSBlogsName\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"BlogOwnerWithCustomPKS\\", isRequired = true) @BelongsTo(targetName = \\"blogOwnerWithCustomPKSBlogsName\\", targetNames = {\\"blogOwnerWithCustomPKSBlogsName\\", \\"blogOwnerWithCustomPKSBlogsWea\\"}, type = BlogOwnerWithCustomPKS.class) BlogOwnerWithCustomPKS blogOwner; - private final @ModelField(targetType=\\"Post\\") @HasMany(associatedWith = \\"blog\\", type = Post.class) List posts = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Blog", "id"); + public static final QueryField NAME = field("Blog", "name"); + public static final QueryField BLOG_OWNER = field("Blog", "blogOwnerWithCustomPKSBlogsName"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="BlogOwnerWithCustomPKS", isRequired = true) @BelongsTo(targetName = "blogOwnerWithCustomPKSBlogsName", targetNames = {"blogOwnerWithCustomPKSBlogsName", "blogOwnerWithCustomPKSBlogsWea"}, type = BlogOwnerWithCustomPKS.class) BlogOwnerWithCustomPKS blogOwner; + private final @ModelField(targetType="Post") @HasMany(associatedWith = "blog", type = Post.class) List posts = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -2330,13 +2330,13 @@ public final class Blog implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Blog {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"blogOwner=\\" + String.valueOf(getBlogOwner()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Blog {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("blogOwner=" + String.valueOf(getBlogOwner()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2482,18 +2482,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts") public final class Post implements Model { - public static final QueryField ID = field(\\"Post\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - public static final QueryField CONTENT = field(\\"Post\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"PostTags\\") @HasMany(associatedWith = \\"post\\", type = PostTags.class) List tags = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Post", "id"); + public static final QueryField TITLE = field("Post", "title"); + public static final QueryField CONTENT = field("Post", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="PostTags") @HasMany(associatedWith = "post", type = PostTags.class) List tags = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -2555,13 +2555,13 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2670,16 +2670,16 @@ public final class Post implements Model { } /** This is an auto generated class representing the Tag type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Tags\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Tags") public final class Tag implements Model { - public static final QueryField ID = field(\\"Tag\\", \\"id\\"); - public static final QueryField LABEL = field(\\"Tag\\", \\"label\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String label; - private final @ModelField(targetType=\\"PostTags\\") @HasMany(associatedWith = \\"tag\\", type = PostTags.class) List posts = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Tag", "id"); + public static final QueryField LABEL = field("Tag", "label"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String label; + private final @ModelField(targetType="PostTags") @HasMany(associatedWith = "tag", type = PostTags.class) List posts = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -2734,12 +2734,12 @@ public final class Tag implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Tag {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"label=\\" + String.valueOf(getLabel()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Tag {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("label=" + String.valueOf(getLabel()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2831,19 +2831,19 @@ public final class Tag implements Model { } /** This is an auto generated class representing the PostTags type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"PostTags\\") -@Index(name = \\"byPost\\", fields = {\\"postID\\"}) -@Index(name = \\"byTag\\", fields = {\\"tagID\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "PostTags") +@Index(name = "byPost", fields = {"postID"}) +@Index(name = "byTag", fields = {"tagID"}) public final class PostTags implements Model { - public static final QueryField ID = field(\\"PostTags\\", \\"id\\"); - public static final QueryField POST = field(\\"PostTags\\", \\"postID\\"); - public static final QueryField TAG = field(\\"PostTags\\", \\"tagID\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"Post\\", isRequired = true) @BelongsTo(targetName = \\"postID\\", type = Post.class) Post post; - private final @ModelField(targetType=\\"Tag\\", isRequired = true) @BelongsTo(targetName = \\"tagID\\", type = Tag.class) Tag tag; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("PostTags", "id"); + public static final QueryField POST = field("PostTags", "postID"); + public static final QueryField TAG = field("PostTags", "tagID"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="Post", isRequired = true) @BelongsTo(targetName = "postID", type = Post.class) Post post; + private final @ModelField(targetType="Tag", isRequired = true) @BelongsTo(targetName = "tagID", type = Tag.class) Tag tag; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -2901,13 +2901,13 @@ public final class PostTags implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"PostTags {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"post=\\" + String.valueOf(getPost()) + \\", \\") - .append(\\"tag=\\" + String.valueOf(getTag()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("PostTags {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("post=" + String.valueOf(getPost()) + ", ") + .append("tag=" + String.valueOf(getTag()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3046,19 +3046,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the customClaim type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"customClaims\\", authRules = { - @AuthRule(allow = AuthStrategy.OWNER, ownerField = \\"owner\\", identityClaim = \\"user_id\\", provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "customClaims", authRules = { + @AuthRule(allow = AuthStrategy.OWNER, ownerField = "owner", identityClaim = "user_id", provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class customClaim implements Model { - public static final QueryField ID = field(\\"customClaim\\", \\"id\\"); - public static final QueryField NAME = field(\\"customClaim\\", \\"name\\"); - public static final QueryField BAR = field(\\"customClaim\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("customClaim", "id"); + public static final QueryField NAME = field("customClaim", "name"); + public static final QueryField BAR = field("customClaim", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3116,13 +3116,13 @@ public final class customClaim implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"customClaim {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("customClaim {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3250,19 +3250,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the customClaim type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"customClaims\\", authRules = { - @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = \\"user_groups\\", groups = { \\"Moderator\\" }, provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "customClaims", authRules = { + @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = "user_groups", groups = { "Moderator" }, provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class customClaim implements Model { - public static final QueryField ID = field(\\"customClaim\\", \\"id\\"); - public static final QueryField NAME = field(\\"customClaim\\", \\"name\\"); - public static final QueryField BAR = field(\\"customClaim\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("customClaim", "id"); + public static final QueryField NAME = field("customClaim", "name"); + public static final QueryField BAR = field("customClaim", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3320,13 +3320,13 @@ public final class customClaim implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"customClaim {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("customClaim {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3454,24 +3454,24 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Employee type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Employees\\", authRules = { - @AuthRule(allow = AuthStrategy.OWNER, ownerField = \\"owner\\", identityClaim = \\"cognito:username\\", provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }), - @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = \\"cognito:groups\\", groups = { \\"Admins\\" }, provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Employees", authRules = { + @AuthRule(allow = AuthStrategy.OWNER, ownerField = "owner", identityClaim = "cognito:username", provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }), + @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = "cognito:groups", groups = { "Admins" }, provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class Employee implements Model { - public static final QueryField ID = field(\\"Employee\\", \\"id\\"); - public static final QueryField NAME = field(\\"Employee\\", \\"name\\"); - public static final QueryField ADDRESS = field(\\"Employee\\", \\"address\\"); - public static final QueryField SSN = field(\\"Employee\\", \\"ssn\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"String\\", isRequired = true) String address; - private final @ModelField(targetType=\\"String\\", authRules = { - @AuthRule(allow = AuthStrategy.OWNER, ownerField = \\"owner\\", identityClaim = \\"cognito:username\\", provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) + public static final QueryField ID = field("Employee", "id"); + public static final QueryField NAME = field("Employee", "name"); + public static final QueryField ADDRESS = field("Employee", "address"); + public static final QueryField SSN = field("Employee", "ssn"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="String", isRequired = true) String address; + private final @ModelField(targetType="String", authRules = { + @AuthRule(allow = AuthStrategy.OWNER, ownerField = "owner", identityClaim = "cognito:username", provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) String ssn; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3536,14 +3536,14 @@ public final class Employee implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Employee {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"address=\\" + String.valueOf(getAddress()) + \\", \\") - .append(\\"ssn=\\" + String.valueOf(getSsn()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Employee {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("address=" + String.valueOf(getAddress()) + ", ") + .append("ssn=" + String.valueOf(getSsn()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3699,19 +3699,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the dynamicGroups type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"dynamicGroups\\", authRules = { - @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = \\"cognito:groups\\", groupsField = \\"groups\\", provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "dynamicGroups", authRules = { + @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = "cognito:groups", groupsField = "groups", provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class dynamicGroups implements Model { - public static final QueryField ID = field(\\"dynamicGroups\\", \\"id\\"); - public static final QueryField NAME = field(\\"dynamicGroups\\", \\"name\\"); - public static final QueryField BAR = field(\\"dynamicGroups\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("dynamicGroups", "id"); + public static final QueryField NAME = field("dynamicGroups", "name"); + public static final QueryField BAR = field("dynamicGroups", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3769,13 +3769,13 @@ public final class dynamicGroups implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"dynamicGroups {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("dynamicGroups {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3903,24 +3903,24 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Employee type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Employees\\", authRules = { - @AuthRule(allow = AuthStrategy.OWNER, ownerField = \\"owner\\", identityClaim = \\"cognito:username\\", provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }), - @AuthRule(allow = AuthStrategy.PRIVATE, provider = \\"iam\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Employees", authRules = { + @AuthRule(allow = AuthStrategy.OWNER, ownerField = "owner", identityClaim = "cognito:username", provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }), + @AuthRule(allow = AuthStrategy.PRIVATE, provider = "iam", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class Employee implements Model { - public static final QueryField ID = field(\\"Employee\\", \\"id\\"); - public static final QueryField NAME = field(\\"Employee\\", \\"name\\"); - public static final QueryField ADDRESS = field(\\"Employee\\", \\"address\\"); - public static final QueryField SSN = field(\\"Employee\\", \\"ssn\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"String\\", isRequired = true) String address; - private final @ModelField(targetType=\\"String\\", authRules = { - @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = \\"cognito:groups\\", groups = { \\"Admins\\" }, provider = \\"oidc\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) + public static final QueryField ID = field("Employee", "id"); + public static final QueryField NAME = field("Employee", "name"); + public static final QueryField ADDRESS = field("Employee", "address"); + public static final QueryField SSN = field("Employee", "ssn"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="String", isRequired = true) String address; + private final @ModelField(targetType="String", authRules = { + @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = "cognito:groups", groups = { "Admins" }, provider = "oidc", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) String ssn; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3985,14 +3985,14 @@ public final class Employee implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Employee {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"address=\\" + String.valueOf(getAddress()) + \\", \\") - .append(\\"ssn=\\" + String.valueOf(getSsn()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Employee {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("address=" + String.valueOf(getAddress()) + ", ") + .append("ssn=" + String.valueOf(getSsn()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4148,19 +4148,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the simpleOwnerAuth type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"simpleOwnerAuths\\", authRules = { - @AuthRule(allow = AuthStrategy.OWNER, ownerField = \\"owner\\", identityClaim = \\"cognito:username\\", provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "simpleOwnerAuths", authRules = { + @AuthRule(allow = AuthStrategy.OWNER, ownerField = "owner", identityClaim = "cognito:username", provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class simpleOwnerAuth implements Model { - public static final QueryField ID = field(\\"simpleOwnerAuth\\", \\"id\\"); - public static final QueryField NAME = field(\\"simpleOwnerAuth\\", \\"name\\"); - public static final QueryField BAR = field(\\"simpleOwnerAuth\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("simpleOwnerAuth", "id"); + public static final QueryField NAME = field("simpleOwnerAuth", "name"); + public static final QueryField BAR = field("simpleOwnerAuth", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4218,13 +4218,13 @@ public final class simpleOwnerAuth implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"simpleOwnerAuth {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("simpleOwnerAuth {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4352,19 +4352,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the allowRead type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"allowReads\\", authRules = { - @AuthRule(allow = AuthStrategy.OWNER, ownerField = \\"owner\\", identityClaim = \\"cognito:username\\", provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.DELETE, ModelOperation.UPDATE }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "allowReads", authRules = { + @AuthRule(allow = AuthStrategy.OWNER, ownerField = "owner", identityClaim = "cognito:username", provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.DELETE, ModelOperation.UPDATE }) }) public final class allowRead implements Model { - public static final QueryField ID = field(\\"allowRead\\", \\"id\\"); - public static final QueryField NAME = field(\\"allowRead\\", \\"name\\"); - public static final QueryField BAR = field(\\"allowRead\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("allowRead", "id"); + public static final QueryField NAME = field("allowRead", "name"); + public static final QueryField BAR = field("allowRead", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4422,13 +4422,13 @@ public final class allowRead implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"allowRead {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("allowRead {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4556,19 +4556,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the privateType type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"privateTypes\\", authRules = { +@SuppressWarnings("all") +@ModelConfig(pluralName = "privateTypes", authRules = { @AuthRule(allow = AuthStrategy.PRIVATE, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class privateType implements Model { - public static final QueryField ID = field(\\"privateType\\", \\"id\\"); - public static final QueryField NAME = field(\\"privateType\\", \\"name\\"); - public static final QueryField BAR = field(\\"privateType\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("privateType", "id"); + public static final QueryField NAME = field("privateType", "name"); + public static final QueryField BAR = field("privateType", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4626,13 +4626,13 @@ public final class privateType implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"privateType {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("privateType {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4760,21 +4760,21 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the privateType type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"privateTypes\\", authRules = { +@SuppressWarnings("all") +@ModelConfig(pluralName = "privateTypes", authRules = { @AuthRule(allow = AuthStrategy.PRIVATE, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class privateType implements Model { - public static final QueryField ID = field(\\"privateType\\", \\"id\\"); - public static final QueryField NAME = field(\\"privateType\\", \\"name\\"); - public static final QueryField BAR = field(\\"privateType\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\", authRules = { + public static final QueryField ID = field("privateType", "id"); + public static final QueryField NAME = field("privateType", "name"); + public static final QueryField BAR = field("privateType", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String", authRules = { @AuthRule(allow = AuthStrategy.PRIVATE, operations = { ModelOperation.CREATE, ModelOperation.UPDATE }) }) String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4832,13 +4832,13 @@ public final class privateType implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"privateType {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("privateType {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4966,19 +4966,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the publicType type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"publicTypes\\", authRules = { +@SuppressWarnings("all") +@ModelConfig(pluralName = "publicTypes", authRules = { @AuthRule(allow = AuthStrategy.PUBLIC, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class publicType implements Model { - public static final QueryField ID = field(\\"publicType\\", \\"id\\"); - public static final QueryField NAME = field(\\"publicType\\", \\"name\\"); - public static final QueryField BAR = field(\\"publicType\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("publicType", "id"); + public static final QueryField NAME = field("publicType", "name"); + public static final QueryField BAR = field("publicType", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -5036,13 +5036,13 @@ public final class publicType implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"publicType {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("publicType {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -5170,19 +5170,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the staticGroups type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"staticGroups\\", authRules = { - @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = \\"cognito:groups\\", groups = { \\"Admin\\" }, provider = \\"userPools\\", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) +@SuppressWarnings("all") +@ModelConfig(pluralName = "staticGroups", authRules = { + @AuthRule(allow = AuthStrategy.GROUPS, groupClaim = "cognito:groups", groups = { "Admin" }, provider = "userPools", operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }) }) public final class staticGroups implements Model { - public static final QueryField ID = field(\\"staticGroups\\", \\"id\\"); - public static final QueryField NAME = field(\\"staticGroups\\", \\"name\\"); - public static final QueryField BAR = field(\\"staticGroups\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("staticGroups", "id"); + public static final QueryField NAME = field("staticGroups", "name"); + public static final QueryField BAR = field("staticGroups", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -5240,13 +5240,13 @@ public final class staticGroups implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"staticGroups {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("staticGroups {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -5372,19 +5372,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the MyPost type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"MyPosts\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"postId\\",\\"title\\",\\"createdAt\\",\\"rating\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "MyPosts", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"postId","title","createdAt","rating"}) public final class MyPost implements Model { - public static final QueryField POST_ID = field(\\"MyPost\\", \\"postId\\"); - public static final QueryField TITLE = field(\\"MyPost\\", \\"title\\"); - public static final QueryField CREATED_AT = field(\\"MyPost\\", \\"createdAt\\"); - public static final QueryField RATING = field(\\"MyPost\\", \\"rating\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String postId; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"AWSDateTime\\", isRequired = true) Temporal.DateTime createdAt; - private final @ModelField(targetType=\\"Float\\", isRequired = true) Double rating; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField POST_ID = field("MyPost", "postId"); + public static final QueryField TITLE = field("MyPost", "title"); + public static final QueryField CREATED_AT = field("MyPost", "createdAt"); + public static final QueryField RATING = field("MyPost", "rating"); + private final @ModelField(targetType="ID", isRequired = true) String postId; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="AWSDateTime", isRequired = true) Temporal.DateTime createdAt; + private final @ModelField(targetType="Float", isRequired = true) Double rating; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; private MyPostIdentifier myPostIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -5453,13 +5453,13 @@ public final class MyPost implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"MyPost {\\") - .append(\\"postId=\\" + String.valueOf(getPostId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"rating=\\" + String.valueOf(getRating()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("MyPost {") + .append("postId=" + String.valueOf(getPostId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("rating=" + String.valueOf(getRating()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -5617,14 +5617,14 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the StringModel type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"StringModels\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"customKey\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "StringModels", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"customKey"}) public final class StringModel implements Model { - public static final QueryField CUSTOM_KEY = field(\\"StringModel\\", \\"customKey\\"); - private final @ModelField(targetType=\\"String\\", isRequired = true) String customKey; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField CUSTOM_KEY = field("StringModel", "customKey"); + private final @ModelField(targetType="String", isRequired = true) String customKey; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -5674,11 +5674,11 @@ public final class StringModel implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"StringModel {\\") - .append(\\"customKey=\\" + String.valueOf(getCustomKey()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("StringModel {") + .append("customKey=" + String.valueOf(getCustomKey()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -5770,14 +5770,14 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the IdModel type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"IdModels\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"customKey\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "IdModels", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"customKey"}) public final class IdModel implements Model { - public static final QueryField CUSTOM_KEY = field(\\"IdModel\\", \\"customKey\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String customKey; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField CUSTOM_KEY = field("IdModel", "customKey"); + private final @ModelField(targetType="ID", isRequired = true) String customKey; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -5827,11 +5827,11 @@ public final class IdModel implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"IdModel {\\") - .append(\\"customKey=\\" + String.valueOf(getCustomKey()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("IdModel {") + .append("customKey=" + String.valueOf(getCustomKey()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -5923,14 +5923,14 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the IntModel type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"IntModels\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"customKey\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "IntModels", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"customKey"}) public final class IntModel implements Model { - public static final QueryField CUSTOM_KEY = field(\\"IntModel\\", \\"customKey\\"); - private final @ModelField(targetType=\\"Int\\", isRequired = true) Integer customKey; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField CUSTOM_KEY = field("IntModel", "customKey"); + private final @ModelField(targetType="Int", isRequired = true) Integer customKey; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public Integer resolveIdentifier() { @@ -5980,11 +5980,11 @@ public final class IntModel implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"IntModel {\\") - .append(\\"customKey=\\" + String.valueOf(getCustomKey()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("IntModel {") + .append("customKey=" + String.valueOf(getCustomKey()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -6075,21 +6075,21 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Landmark type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Landmarks\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Landmarks") public final class Landmark implements Model { - public static final QueryField ID = field(\\"Landmark\\", \\"id\\"); - public static final QueryField NAME = field(\\"Landmark\\", \\"name\\"); - public static final QueryField RATING = field(\\"Landmark\\", \\"rating\\"); - public static final QueryField LOCATION = field(\\"Landmark\\", \\"location\\"); - public static final QueryField PARKING = field(\\"Landmark\\", \\"parking\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Int\\", isRequired = true) Integer rating; - private final @ModelField(targetType=\\"Location\\", isRequired = true) Location location; - private final @ModelField(targetType=\\"Location\\") Location parking; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Landmark", "id"); + public static final QueryField NAME = field("Landmark", "name"); + public static final QueryField RATING = field("Landmark", "rating"); + public static final QueryField LOCATION = field("Landmark", "location"); + public static final QueryField PARKING = field("Landmark", "parking"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Int", isRequired = true) Integer rating; + private final @ModelField(targetType="Location", isRequired = true) Location location; + private final @ModelField(targetType="Location") Location parking; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -6161,15 +6161,15 @@ public final class Landmark implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Landmark {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"rating=\\" + String.valueOf(getRating()) + \\", \\") - .append(\\"location=\\" + String.valueOf(getLocation()) + \\", \\") - .append(\\"parking=\\" + String.valueOf(getParking()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Landmark {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("rating=" + String.valueOf(getRating()) + ", ") + .append("location=" + String.valueOf(getLocation()) + ", ") + .append("parking=" + String.valueOf(getParking()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -6604,19 +6604,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the task type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"tasks\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "tasks") public final class task implements Model { - public static final QueryField ID = field(\\"task\\", \\"id\\"); - public static final QueryField TODO = field(\\"task\\", \\"taskTodoId\\"); - public static final QueryField TIME = field(\\"task\\", \\"time\\"); - public static final QueryField CREATED_ON = field(\\"task\\", \\"createdOn\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"Todo\\") @BelongsTo(targetName = \\"taskTodoId\\", type = Todo.class) Todo todo; - private final @ModelField(targetType=\\"AWSTime\\") Temporal.Time time; - private final @ModelField(targetType=\\"AWSDate\\") Temporal.Date createdOn; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("task", "id"); + public static final QueryField TODO = field("task", "taskTodoId"); + public static final QueryField TIME = field("task", "time"); + public static final QueryField CREATED_ON = field("task", "createdOn"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="Todo") @BelongsTo(targetName = "taskTodoId", type = Todo.class) Todo todo; + private final @ModelField(targetType="AWSTime") Temporal.Time time; + private final @ModelField(targetType="AWSDate") Temporal.Date createdOn; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -6681,14 +6681,14 @@ public final class task implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"task {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"todo=\\" + String.valueOf(getTodo()) + \\", \\") - .append(\\"time=\\" + String.valueOf(getTime()) + \\", \\") - .append(\\"createdOn=\\" + String.valueOf(getCreatedOn()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("task {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("todo=" + String.valueOf(getTodo()) + ", ") + .append("time=" + String.valueOf(getTime()) + ", ") + .append("createdOn=" + String.valueOf(getCreatedOn()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -6831,14 +6831,14 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Todo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Todos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Todos") public final class Todo implements Model { - public static final QueryField ID = field(\\"Todo\\", \\"id\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"task\\") @HasMany(associatedWith = \\"todo\\", type = task.class) List tasks = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Todo", "id"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="task") @HasMany(associatedWith = "todo", type = task.class) List tasks = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -6886,11 +6886,11 @@ public final class Todo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Todo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Todo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -6981,17 +6981,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the SimpleModel type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"SimpleModels\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "SimpleModels") public final class SimpleModel implements Model { - public static final QueryField ID = field(\\"SimpleModel\\", \\"id\\"); - public static final QueryField NAME = field(\\"SimpleModel\\", \\"name\\"); - public static final QueryField BAR = field(\\"SimpleModel\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("SimpleModel", "id"); + public static final QueryField NAME = field("SimpleModel", "name"); + public static final QueryField BAR = field("SimpleModel", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -7049,13 +7049,13 @@ public final class SimpleModel implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"SimpleModel {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("SimpleModel {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -7180,17 +7180,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the SimpleModel type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"SimpleModels\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "SimpleModels") public final class SimpleModel implements Model { - public static final QueryField ID = field(\\"SimpleModel\\", \\"id\\"); - public static final QueryField NAME = field(\\"SimpleModel\\", \\"name\\"); - public static final QueryField BAR = field(\\"SimpleModel\\", \\"bar\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"String\\") String bar; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("SimpleModel", "id"); + public static final QueryField NAME = field("SimpleModel", "name"); + public static final QueryField BAR = field("SimpleModel", "bar"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="String") String bar; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -7248,13 +7248,13 @@ public final class SimpleModel implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"SimpleModel {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"bar=\\" + String.valueOf(getBar()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("SimpleModel {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("bar=" + String.valueOf(getBar()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -7379,29 +7379,29 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the ListContainer type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"ListContainers\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "ListContainers") public final class ListContainer implements Model { - public static final QueryField ID = field(\\"ListContainer\\", \\"id\\"); - public static final QueryField NAME = field(\\"ListContainer\\", \\"name\\"); - public static final QueryField LIST = field(\\"ListContainer\\", \\"list\\"); - public static final QueryField REQUIRED_LIST = field(\\"ListContainer\\", \\"requiredList\\"); - public static final QueryField REQUIRED_LIST_OF_REQUIRED = field(\\"ListContainer\\", \\"requiredListOfRequired\\"); - public static final QueryField LIST_OF_REQUIRED = field(\\"ListContainer\\", \\"listOfRequired\\"); - public static final QueryField REQUIRED_LIST_OF_REQUIRED_DATES = field(\\"ListContainer\\", \\"requiredListOfRequiredDates\\"); - public static final QueryField LIST_OF_REQUIRED_FLOATS = field(\\"ListContainer\\", \\"listOfRequiredFloats\\"); - public static final QueryField REQUIRED_LIST_OF_CUSTOM_TYPES = field(\\"ListContainer\\", \\"requiredListOfCustomTypes\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"Int\\") List list; - private final @ModelField(targetType=\\"String\\", isRequired = true) List requiredList; - private final @ModelField(targetType=\\"StatusEnum\\", isRequired = true) List requiredListOfRequired; - private final @ModelField(targetType=\\"Boolean\\") List listOfRequired; - private final @ModelField(targetType=\\"AWSDate\\", isRequired = true) List requiredListOfRequiredDates; - private final @ModelField(targetType=\\"Float\\") List listOfRequiredFloats; - private final @ModelField(targetType=\\"CustomType\\", isRequired = true) List requiredListOfCustomTypes; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("ListContainer", "id"); + public static final QueryField NAME = field("ListContainer", "name"); + public static final QueryField LIST = field("ListContainer", "list"); + public static final QueryField REQUIRED_LIST = field("ListContainer", "requiredList"); + public static final QueryField REQUIRED_LIST_OF_REQUIRED = field("ListContainer", "requiredListOfRequired"); + public static final QueryField LIST_OF_REQUIRED = field("ListContainer", "listOfRequired"); + public static final QueryField REQUIRED_LIST_OF_REQUIRED_DATES = field("ListContainer", "requiredListOfRequiredDates"); + public static final QueryField LIST_OF_REQUIRED_FLOATS = field("ListContainer", "listOfRequiredFloats"); + public static final QueryField REQUIRED_LIST_OF_CUSTOM_TYPES = field("ListContainer", "requiredListOfCustomTypes"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="Int") List list; + private final @ModelField(targetType="String", isRequired = true) List requiredList; + private final @ModelField(targetType="StatusEnum", isRequired = true) List requiredListOfRequired; + private final @ModelField(targetType="Boolean") List listOfRequired; + private final @ModelField(targetType="AWSDate", isRequired = true) List requiredListOfRequiredDates; + private final @ModelField(targetType="Float") List listOfRequiredFloats; + private final @ModelField(targetType="CustomType", isRequired = true) List requiredListOfCustomTypes; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -7501,19 +7501,19 @@ public final class ListContainer implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"ListContainer {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"list=\\" + String.valueOf(getList()) + \\", \\") - .append(\\"requiredList=\\" + String.valueOf(getRequiredList()) + \\", \\") - .append(\\"requiredListOfRequired=\\" + String.valueOf(getRequiredListOfRequired()) + \\", \\") - .append(\\"listOfRequired=\\" + String.valueOf(getListOfRequired()) + \\", \\") - .append(\\"requiredListOfRequiredDates=\\" + String.valueOf(getRequiredListOfRequiredDates()) + \\", \\") - .append(\\"listOfRequiredFloats=\\" + String.valueOf(getListOfRequiredFloats()) + \\", \\") - .append(\\"requiredListOfCustomTypes=\\" + String.valueOf(getRequiredListOfCustomTypes()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("ListContainer {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("list=" + String.valueOf(getList()) + ", ") + .append("requiredList=" + String.valueOf(getRequiredList()) + ", ") + .append("requiredListOfRequired=" + String.valueOf(getRequiredListOfRequired()) + ", ") + .append("listOfRequired=" + String.valueOf(getListOfRequired()) + ", ") + .append("requiredListOfRequiredDates=" + String.valueOf(getRequiredListOfRequiredDates()) + ", ") + .append("listOfRequiredFloats=" + String.valueOf(getListOfRequiredFloats()) + ", ") + .append("requiredListOfCustomTypes=" + String.valueOf(getRequiredListOfCustomTypes()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -7764,23 +7764,23 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the task type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"tasks\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "tasks") public final class task implements Model { - public static final QueryField ID = field(\\"task\\", \\"id\\"); - public static final QueryField TITLE = field(\\"task\\", \\"title\\"); - public static final QueryField DONE = field(\\"task\\", \\"done\\"); - public static final QueryField TODO = field(\\"task\\", \\"taskTodoId\\"); - public static final QueryField TIME = field(\\"task\\", \\"time\\"); - public static final QueryField CREATED_ON = field(\\"task\\", \\"createdOn\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Boolean\\", isRequired = true) Boolean done; - private final @ModelField(targetType=\\"Todo\\") @BelongsTo(targetName = \\"taskTodoId\\", type = Todo.class) Todo todo; - private final @ModelField(targetType=\\"AWSTime\\") Temporal.Time time; - private final @ModelField(targetType=\\"AWSDate\\") Temporal.Date createdOn; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("task", "id"); + public static final QueryField TITLE = field("task", "title"); + public static final QueryField DONE = field("task", "done"); + public static final QueryField TODO = field("task", "taskTodoId"); + public static final QueryField TIME = field("task", "time"); + public static final QueryField CREATED_ON = field("task", "createdOn"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Boolean", isRequired = true) Boolean done; + private final @ModelField(targetType="Todo") @BelongsTo(targetName = "taskTodoId", type = Todo.class) Todo todo; + private final @ModelField(targetType="AWSTime") Temporal.Time time; + private final @ModelField(targetType="AWSDate") Temporal.Date createdOn; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -7859,16 +7859,16 @@ public final class task implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"task {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"done=\\" + String.valueOf(getDone()) + \\", \\") - .append(\\"todo=\\" + String.valueOf(getTodo()) + \\", \\") - .append(\\"time=\\" + String.valueOf(getTime()) + \\", \\") - .append(\\"createdOn=\\" + String.valueOf(getCreatedOn()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("task {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("done=" + String.valueOf(getDone()) + ", ") + .append("todo=" + String.valueOf(getTodo()) + ", ") + .append("time=" + String.valueOf(getTime()) + ", ") + .append("createdOn=" + String.valueOf(getCreatedOn()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -8056,26 +8056,26 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Todo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Todos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Todos") public final class Todo implements Model { - public static final QueryField ID = field(\\"Todo\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Todo\\", \\"title\\"); - public static final QueryField DONE = field(\\"Todo\\", \\"done\\"); - public static final QueryField DESCRIPTION = field(\\"Todo\\", \\"description\\"); - public static final QueryField DUE_DATE = field(\\"Todo\\", \\"due_date\\"); - public static final QueryField VERSION = field(\\"Todo\\", \\"version\\"); - public static final QueryField VALUE = field(\\"Todo\\", \\"value\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Boolean\\", isRequired = true) Boolean done; - private final @ModelField(targetType=\\"String\\") String description; - private final @ModelField(targetType=\\"String\\") String due_date; - private final @ModelField(targetType=\\"Int\\", isRequired = true) Integer version; - private final @ModelField(targetType=\\"Float\\") Double value; - private final @ModelField(targetType=\\"task\\") @HasMany(associatedWith = \\"todo\\", type = task.class) List tasks = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Todo", "id"); + public static final QueryField TITLE = field("Todo", "title"); + public static final QueryField DONE = field("Todo", "done"); + public static final QueryField DESCRIPTION = field("Todo", "description"); + public static final QueryField DUE_DATE = field("Todo", "due_date"); + public static final QueryField VERSION = field("Todo", "version"); + public static final QueryField VALUE = field("Todo", "value"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Boolean", isRequired = true) Boolean done; + private final @ModelField(targetType="String") String description; + private final @ModelField(targetType="String") String due_date; + private final @ModelField(targetType="Int", isRequired = true) Integer version; + private final @ModelField(targetType="Float") Double value; + private final @ModelField(targetType="task") @HasMany(associatedWith = "todo", type = task.class) List tasks = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -8165,17 +8165,17 @@ public final class Todo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Todo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"done=\\" + String.valueOf(getDone()) + \\", \\") - .append(\\"description=\\" + String.valueOf(getDescription()) + \\", \\") - .append(\\"due_date=\\" + String.valueOf(getDueDate()) + \\", \\") - .append(\\"version=\\" + String.valueOf(getVersion()) + \\", \\") - .append(\\"value=\\" + String.valueOf(getValue()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Todo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("done=" + String.valueOf(getDone()) + ", ") + .append("description=" + String.valueOf(getDescription()) + ", ") + .append("due_date=" + String.valueOf(getDueDate()) + ", ") + .append("version=" + String.valueOf(getVersion()) + ", ") + .append("value=" + String.valueOf(getValue()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -8387,15 +8387,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Foo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Foos\\", type = Model.Type.USER, version = 1) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Foos", type = Model.Type.USER, version = 1) public final class Foo implements Model { - public static final QueryField ID = field(\\"Foo\\", \\"id\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"Bar\\") @HasOne(associatedWith = \\"foo1\\", type = Bar.class) Bar bar1 = null; - private final @ModelField(targetType=\\"Bar\\") @HasOne(associatedWith = \\"foo2\\", type = Bar.class) Bar bar2 = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Foo", "id"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="Bar") @HasOne(associatedWith = "foo1", type = Bar.class) Bar bar1 = null; + private final @ModelField(targetType="Bar") @HasOne(associatedWith = "foo2", type = Bar.class) Bar bar2 = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -8453,11 +8453,11 @@ public final class Foo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Foo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Foo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -8558,17 +8558,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Bar type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Bars\\", type = Model.Type.USER, version = 1) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Bars", type = Model.Type.USER, version = 1) public final class Bar implements Model { - public static final QueryField ID = field(\\"Bar\\", \\"id\\"); - public static final QueryField FOO1 = field(\\"Bar\\", \\"bar1Id\\"); - public static final QueryField FOO2 = field(\\"Bar\\", \\"bar2Id\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"Foo\\") @BelongsTo(targetName = \\"bar1Id\\", targetNames = {\\"bar1Id\\"}, type = Foo.class) Foo foo1; - private final @ModelField(targetType=\\"Foo\\") @BelongsTo(targetName = \\"bar2Id\\", targetNames = {\\"bar2Id\\"}, type = Foo.class) Foo foo2; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Bar", "id"); + public static final QueryField FOO1 = field("Bar", "bar1Id"); + public static final QueryField FOO2 = field("Bar", "bar2Id"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="Foo") @BelongsTo(targetName = "bar1Id", targetNames = {"bar1Id"}, type = Foo.class) Foo foo1; + private final @ModelField(targetType="Foo") @BelongsTo(targetName = "bar2Id", targetNames = {"bar2Id"}, type = Foo.class) Foo foo2; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -8632,13 +8632,13 @@ public final class Bar implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Bar {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"foo1=\\" + String.valueOf(getFoo1()) + \\", \\") - .append(\\"foo2=\\" + String.valueOf(getFoo2()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Bar {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("foo1=" + String.valueOf(getFoo1()) + ", ") + .append("foo2=" + String.valueOf(getFoo2()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -8773,21 +8773,21 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Primary type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Primaries\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"tenantId\\",\\"instanceId\\",\\"recordId\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Primaries", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"tenantId","instanceId","recordId"}) public final class Primary implements Model { - public static final QueryField TENANT_ID = field(\\"Primary\\", \\"tenantId\\"); - public static final QueryField INSTANCE_ID = field(\\"Primary\\", \\"instanceId\\"); - public static final QueryField RECORD_ID = field(\\"Primary\\", \\"recordId\\"); - public static final QueryField CONTENT = field(\\"Primary\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String tenantId; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String instanceId; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String recordId; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"Related\\") @HasMany(associatedWith = \\"primary\\", type = Related.class) List related = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField TENANT_ID = field("Primary", "tenantId"); + public static final QueryField INSTANCE_ID = field("Primary", "instanceId"); + public static final QueryField RECORD_ID = field("Primary", "recordId"); + public static final QueryField CONTENT = field("Primary", "content"); + private final @ModelField(targetType="ID", isRequired = true) String tenantId; + private final @ModelField(targetType="ID", isRequired = true) String instanceId; + private final @ModelField(targetType="ID", isRequired = true) String recordId; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="Related") @HasMany(associatedWith = "primary", type = Related.class) List related = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; private PrimaryIdentifier primaryIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -8866,14 +8866,14 @@ public final class Primary implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Primary {\\") - .append(\\"tenantId=\\" + String.valueOf(getTenantId()) + \\", \\") - .append(\\"instanceId=\\" + String.valueOf(getInstanceId()) + \\", \\") - .append(\\"recordId=\\" + String.valueOf(getRecordId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Primary {") + .append("tenantId=" + String.valueOf(getTenantId()) + ", ") + .append("instanceId=" + String.valueOf(getInstanceId()) + ", ") + .append("recordId=" + String.valueOf(getRecordId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -9026,17 +9026,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Related type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Relateds\\", type = Model.Type.USER, version = 1) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Relateds", type = Model.Type.USER, version = 1) public final class Related implements Model { - public static final QueryField ID = field(\\"Related\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"Related\\", \\"content\\"); - public static final QueryField PRIMARY = field(\\"Related\\", \\"primaryTenantId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"Primary\\") @BelongsTo(targetName = \\"primaryTenantId\\", targetNames = {\\"primaryTenantId\\", \\"primaryInstanceId\\", \\"primaryRecordId\\"}, type = Primary.class) Primary primary; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Related", "id"); + public static final QueryField CONTENT = field("Related", "content"); + public static final QueryField PRIMARY = field("Related", "primaryTenantId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="Primary") @BelongsTo(targetName = "primaryTenantId", targetNames = {"primaryTenantId", "primaryInstanceId", "primaryRecordId"}, type = Primary.class) Primary primary; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -9100,13 +9100,13 @@ public final class Related implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Related {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"primary=\\" + String.valueOf(getPrimary()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Related {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("primary=" + String.valueOf(getPrimary()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -9241,21 +9241,21 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Primary type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Primaries\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"tenantId\\",\\"instanceId\\",\\"recordId\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Primaries", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"tenantId","instanceId","recordId"}) public final class Primary implements Model { - public static final QueryField TENANT_ID = field(\\"Primary\\", \\"tenantId\\"); - public static final QueryField INSTANCE_ID = field(\\"Primary\\", \\"instanceId\\"); - public static final QueryField RECORD_ID = field(\\"Primary\\", \\"recordId\\"); - public static final QueryField CONTENT = field(\\"Primary\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String tenantId; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String instanceId; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String recordId; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"Related\\") @HasOne(associatedWith = \\"primary\\", type = Related.class) Related related = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField TENANT_ID = field("Primary", "tenantId"); + public static final QueryField INSTANCE_ID = field("Primary", "instanceId"); + public static final QueryField RECORD_ID = field("Primary", "recordId"); + public static final QueryField CONTENT = field("Primary", "content"); + private final @ModelField(targetType="ID", isRequired = true) String tenantId; + private final @ModelField(targetType="ID", isRequired = true) String instanceId; + private final @ModelField(targetType="ID", isRequired = true) String recordId; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="Related") @HasOne(associatedWith = "primary", type = Related.class) Related related = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; private PrimaryIdentifier primaryIdentifier; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated @@ -9334,14 +9334,14 @@ public final class Primary implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Primary {\\") - .append(\\"tenantId=\\" + String.valueOf(getTenantId()) + \\", \\") - .append(\\"instanceId=\\" + String.valueOf(getInstanceId()) + \\", \\") - .append(\\"recordId=\\" + String.valueOf(getRecordId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Primary {") + .append("tenantId=" + String.valueOf(getTenantId()) + ", ") + .append("instanceId=" + String.valueOf(getInstanceId()) + ", ") + .append("recordId=" + String.valueOf(getRecordId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -9494,17 +9494,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Related type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Relateds\\", type = Model.Type.USER, version = 1) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Relateds", type = Model.Type.USER, version = 1) public final class Related implements Model { - public static final QueryField ID = field(\\"Related\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"Related\\", \\"content\\"); - public static final QueryField PRIMARY = field(\\"Related\\", \\"primaryTenantId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"Primary\\") @BelongsTo(targetName = \\"primaryTenantId\\", targetNames = {\\"primaryTenantId\\", \\"primaryInstanceId\\", \\"primaryRecordId\\"}, type = Primary.class) Primary primary; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Related", "id"); + public static final QueryField CONTENT = field("Related", "content"); + public static final QueryField PRIMARY = field("Related", "primaryTenantId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="Primary") @BelongsTo(targetName = "primaryTenantId", targetNames = {"primaryTenantId", "primaryInstanceId", "primaryRecordId"}, type = Primary.class) Primary primary; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -9568,13 +9568,13 @@ public final class Related implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Related {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"primary=\\" + String.valueOf(getPrimary()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Related {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("primary=" + String.valueOf(getPrimary()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -9709,17 +9709,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the SqlPrimary type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"SqlPrimaries\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "SqlPrimaries", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"id"}) public final class SqlPrimary implements Model { - public static final QueryField ID = field(\\"SqlPrimary\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"SqlPrimary\\", \\"content\\"); - private final @ModelField(targetType=\\"Int\\", isRequired = true) Integer id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"SqlRelated\\") @HasMany(associatedWith = \\"primary\\", type = SqlRelated.class) List related = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("SqlPrimary", "id"); + public static final QueryField CONTENT = field("SqlPrimary", "content"); + private final @ModelField(targetType="Int", isRequired = true) Integer id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="SqlRelated") @HasMany(associatedWith = "primary", type = SqlRelated.class) List related = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public Integer resolveIdentifier() { @@ -9780,12 +9780,12 @@ public final class SqlPrimary implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"SqlPrimary {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("SqlPrimary {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -9903,19 +9903,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the SqlRelated type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"SqlRelateds\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) -@Index(name = \\"primary_id\\", fields = {\\"primaryId\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "SqlRelateds", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"id"}) +@Index(name = "primary_id", fields = {"primaryId"}) public final class SqlRelated implements Model { - public static final QueryField ID = field(\\"SqlRelated\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"SqlRelated\\", \\"content\\"); - public static final QueryField PRIMARY = field(\\"SqlRelated\\", \\"primaryId\\"); - private final @ModelField(targetType=\\"Int\\", isRequired = true) Integer id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"SqlPrimary\\") @BelongsTo(targetName = \\"primaryId\\", targetNames = {\\"primaryId\\"}, type = SqlPrimary.class) SqlPrimary primary; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("SqlRelated", "id"); + public static final QueryField CONTENT = field("SqlRelated", "content"); + public static final QueryField PRIMARY = field("SqlRelated", "primaryId"); + private final @ModelField(targetType="Int", isRequired = true) Integer id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="SqlPrimary") @BelongsTo(targetName = "primaryId", targetNames = {"primaryId"}, type = SqlPrimary.class) SqlPrimary primary; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public Integer resolveIdentifier() { @@ -9979,13 +9979,13 @@ public final class SqlRelated implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"SqlRelated {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"primary=\\" + String.valueOf(getPrimary()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("SqlRelated {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("primary=" + String.valueOf(getPrimary()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -10121,16 +10121,16 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Primary type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Primaries\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Primaries", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"id"}) public final class Primary implements Model { - public static final QueryField ID = field(\\"Primary\\", \\"id\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"RelatedMany\\") @HasMany(associatedWith = \\"primary\\", type = RelatedMany.class) List relatedMany = null; - private final @ModelField(targetType=\\"RelatedOne\\") @HasOne(associatedWith = \\"primary\\", type = RelatedOne.class) RelatedOne relatedOne = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Primary", "id"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="RelatedMany") @HasMany(associatedWith = "primary", type = RelatedMany.class) List relatedMany = null; + private final @ModelField(targetType="RelatedOne") @HasOne(associatedWith = "primary", type = RelatedOne.class) RelatedOne relatedOne = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -10188,11 +10188,11 @@ public final class Primary implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Primary {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Primary {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -10293,16 +10293,16 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the RelatedMany type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"RelatedManies\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "RelatedManies", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"id"}) public final class RelatedMany implements Model { - public static final QueryField ID = field(\\"RelatedMany\\", \\"id\\"); - public static final QueryField PRIMARY = field(\\"RelatedMany\\", \\"primaryId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"Primary\\") @BelongsTo(targetName = \\"primaryId\\", targetNames = {\\"primaryId\\"}, type = Primary.class) Primary primary; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("RelatedMany", "id"); + public static final QueryField PRIMARY = field("RelatedMany", "primaryId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="Primary") @BelongsTo(targetName = "primaryId", targetNames = {"primaryId"}, type = Primary.class) Primary primary; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -10359,12 +10359,12 @@ public final class RelatedMany implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"RelatedMany {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"primary=\\" + String.valueOf(getPrimary()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("RelatedMany {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("primary=" + String.valueOf(getPrimary()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -10482,16 +10482,16 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the RelatedOne type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"RelatedOnes\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "RelatedOnes", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"id"}) public final class RelatedOne implements Model { - public static final QueryField ID = field(\\"RelatedOne\\", \\"id\\"); - public static final QueryField PRIMARY = field(\\"RelatedOne\\", \\"primaryId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"Primary\\") @BelongsTo(targetName = \\"primaryId\\", targetNames = {\\"primaryId\\"}, type = Primary.class) Primary primary; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("RelatedOne", "id"); + public static final QueryField PRIMARY = field("RelatedOne", "primaryId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="Primary") @BelongsTo(targetName = "primaryId", targetNames = {"primaryId"}, type = Primary.class) Primary primary; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -10548,12 +10548,12 @@ public final class RelatedOne implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"RelatedOne {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"primary=\\" + String.valueOf(getPrimary()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("RelatedOne {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("primary=" + String.valueOf(getPrimary()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -10671,17 +10671,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the SqlPrimary type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"SqlPrimaries\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "SqlPrimaries", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"id"}) public final class SqlPrimary implements Model { - public static final QueryField ID = field(\\"SqlPrimary\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"SqlPrimary\\", \\"content\\"); - private final @ModelField(targetType=\\"Int\\", isRequired = true) Integer id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"SqlRelated\\") @HasOne(associatedWith = \\"primary\\", type = SqlRelated.class) SqlRelated related = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("SqlPrimary", "id"); + public static final QueryField CONTENT = field("SqlPrimary", "content"); + private final @ModelField(targetType="Int", isRequired = true) Integer id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="SqlRelated") @HasOne(associatedWith = "primary", type = SqlRelated.class) SqlRelated related = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public Integer resolveIdentifier() { @@ -10742,12 +10742,12 @@ public final class SqlPrimary implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"SqlPrimary {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("SqlPrimary {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -10865,19 +10865,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the SqlRelated type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"SqlRelateds\\", type = Model.Type.USER, version = 1) -@Index(name = \\"undefined\\", fields = {\\"id\\"}) -@Index(name = \\"primary_id\\", fields = {\\"primaryId\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "SqlRelateds", type = Model.Type.USER, version = 1) +@Index(name = "undefined", fields = {"id"}) +@Index(name = "primary_id", fields = {"primaryId"}) public final class SqlRelated implements Model { - public static final QueryField ID = field(\\"SqlRelated\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"SqlRelated\\", \\"content\\"); - public static final QueryField PRIMARY = field(\\"SqlRelated\\", \\"primaryId\\"); - private final @ModelField(targetType=\\"Int\\", isRequired = true) Integer id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"SqlPrimary\\") @BelongsTo(targetName = \\"primaryId\\", targetNames = {\\"primaryId\\"}, type = SqlPrimary.class) SqlPrimary primary; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("SqlRelated", "id"); + public static final QueryField CONTENT = field("SqlRelated", "content"); + public static final QueryField PRIMARY = field("SqlRelated", "primaryId"); + private final @ModelField(targetType="Int", isRequired = true) Integer id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="SqlPrimary") @BelongsTo(targetName = "primaryId", targetNames = {"primaryId"}, type = SqlPrimary.class) SqlPrimary primary; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public Integer resolveIdentifier() { @@ -10941,13 +10941,13 @@ public final class SqlRelated implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"SqlRelated {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"primary=\\" + String.valueOf(getPrimary()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("SqlRelated {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("primary=" + String.valueOf(getPrimary()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -11080,15 +11080,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Foo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Foos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Foos") public final class Foo implements Model { - public static final QueryField ID = field(\\"Foo\\", \\"id\\"); - public static final QueryField OPTIONAL_ELEMENT_OPTIONAL_LIST = field(\\"Foo\\", \\"optionalElementOptionalList\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") List optionalElementOptionalList; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Foo", "id"); + public static final QueryField OPTIONAL_ELEMENT_OPTIONAL_LIST = field("Foo", "optionalElementOptionalList"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") List optionalElementOptionalList; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -11139,12 +11139,12 @@ public final class Foo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Foo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"optionalElementOptionalList=\\" + String.valueOf(getOptionalElementOptionalList()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Foo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("optionalElementOptionalList=" + String.valueOf(getOptionalElementOptionalList()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -11252,15 +11252,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Foo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Foos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Foos") public final class Foo implements Model { - public static final QueryField ID = field(\\"Foo\\", \\"id\\"); - public static final QueryField OPTIONAL_ELEMENT_OPTIONAL_LIST = field(\\"Foo\\", \\"optionalElementOptionalList\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") List optionalElementOptionalList; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Foo", "id"); + public static final QueryField OPTIONAL_ELEMENT_OPTIONAL_LIST = field("Foo", "optionalElementOptionalList"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") List optionalElementOptionalList; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -11311,12 +11311,12 @@ public final class Foo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Foo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"optionalElementOptionalList=\\" + String.valueOf(getOptionalElementOptionalList()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Foo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("optionalElementOptionalList=" + String.valueOf(getOptionalElementOptionalList()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -11424,15 +11424,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Foo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Foos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Foos") public final class Foo implements Model { - public static final QueryField ID = field(\\"Foo\\", \\"id\\"); - public static final QueryField OPTIONAL_ELEMENT_REQUIRED_LIST = field(\\"Foo\\", \\"optionalElementRequiredList\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") List optionalElementRequiredList; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Foo", "id"); + public static final QueryField OPTIONAL_ELEMENT_REQUIRED_LIST = field("Foo", "optionalElementRequiredList"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") List optionalElementRequiredList; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -11483,12 +11483,12 @@ public final class Foo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Foo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"optionalElementRequiredList=\\" + String.valueOf(getOptionalElementRequiredList()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Foo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("optionalElementRequiredList=" + String.valueOf(getOptionalElementRequiredList()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -11596,15 +11596,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Foo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Foos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Foos") public final class Foo implements Model { - public static final QueryField ID = field(\\"Foo\\", \\"id\\"); - public static final QueryField OPTIONAL_ELEMENT_REQUIRED_LIST = field(\\"Foo\\", \\"optionalElementRequiredList\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) List optionalElementRequiredList; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Foo", "id"); + public static final QueryField OPTIONAL_ELEMENT_REQUIRED_LIST = field("Foo", "optionalElementRequiredList"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) List optionalElementRequiredList; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -11655,12 +11655,12 @@ public final class Foo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Foo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"optionalElementRequiredList=\\" + String.valueOf(getOptionalElementRequiredList()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Foo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("optionalElementRequiredList=" + String.valueOf(getOptionalElementRequiredList()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -11773,15 +11773,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Foo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Foos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Foos") public final class Foo implements Model { - public static final QueryField ID = field(\\"Foo\\", \\"id\\"); - public static final QueryField REQUIRED_ELEMENT_OPTIONAL_LIST = field(\\"Foo\\", \\"requiredElementOptionalList\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) List requiredElementOptionalList; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Foo", "id"); + public static final QueryField REQUIRED_ELEMENT_OPTIONAL_LIST = field("Foo", "requiredElementOptionalList"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) List requiredElementOptionalList; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -11832,12 +11832,12 @@ public final class Foo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Foo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"requiredElementOptionalList=\\" + String.valueOf(getRequiredElementOptionalList()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Foo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("requiredElementOptionalList=" + String.valueOf(getRequiredElementOptionalList()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -11950,15 +11950,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Foo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Foos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Foos") public final class Foo implements Model { - public static final QueryField ID = field(\\"Foo\\", \\"id\\"); - public static final QueryField REQUIRED_ELEMENT_OPTIONAL_LIST = field(\\"Foo\\", \\"requiredElementOptionalList\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") List requiredElementOptionalList; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Foo", "id"); + public static final QueryField REQUIRED_ELEMENT_OPTIONAL_LIST = field("Foo", "requiredElementOptionalList"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") List requiredElementOptionalList; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -12009,12 +12009,12 @@ public final class Foo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Foo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"requiredElementOptionalList=\\" + String.valueOf(getRequiredElementOptionalList()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Foo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("requiredElementOptionalList=" + String.valueOf(getRequiredElementOptionalList()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -12122,15 +12122,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Foo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Foos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Foos") public final class Foo implements Model { - public static final QueryField ID = field(\\"Foo\\", \\"id\\"); - public static final QueryField REQUIRED_ELEMENT_REQUIRED_LIST = field(\\"Foo\\", \\"requiredElementRequiredList\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) List requiredElementRequiredList; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Foo", "id"); + public static final QueryField REQUIRED_ELEMENT_REQUIRED_LIST = field("Foo", "requiredElementRequiredList"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) List requiredElementRequiredList; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -12181,12 +12181,12 @@ public final class Foo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Foo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"requiredElementRequiredList=\\" + String.valueOf(getRequiredElementRequiredList()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Foo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("requiredElementRequiredList=" + String.valueOf(getRequiredElementRequiredList()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -12299,15 +12299,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Foo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Foos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Foos") public final class Foo implements Model { - public static final QueryField ID = field(\\"Foo\\", \\"id\\"); - public static final QueryField REQUIRED_ELEMENT_REQUIRED_LIST = field(\\"Foo\\", \\"requiredElementRequiredList\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) List requiredElementRequiredList; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Foo", "id"); + public static final QueryField REQUIRED_ELEMENT_REQUIRED_LIST = field("Foo", "requiredElementRequiredList"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) List requiredElementRequiredList; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -12358,12 +12358,12 @@ public final class Foo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Foo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"requiredElementRequiredList=\\" + String.valueOf(getRequiredElementRequiredList()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Foo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("requiredElementRequiredList=" + String.valueOf(getRequiredElementRequiredList()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -12476,17 +12476,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the MyObject type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"MyObjects\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "MyObjects") public final class MyObject implements Model { - public static final QueryField ID = field(\\"MyObject\\", \\"id\\"); - public static final QueryField TUTORIAL = field(\\"MyObject\\", \\"tutorial\\"); - public static final QueryField FORM_CUES = field(\\"MyObject\\", \\"formCues\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"TutorialStep\\", isRequired = true) List tutorial; - private final @ModelField(targetType=\\"FormCue\\", isRequired = true) List formCues; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("MyObject", "id"); + public static final QueryField TUTORIAL = field("MyObject", "tutorial"); + public static final QueryField FORM_CUES = field("MyObject", "formCues"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="TutorialStep", isRequired = true) List tutorial; + private final @ModelField(targetType="FormCue", isRequired = true) List formCues; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -12544,13 +12544,13 @@ public final class MyObject implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"MyObject {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"tutorial=\\" + String.valueOf(getTutorial()) + \\", \\") - .append(\\"formCues=\\" + String.valueOf(getFormCues()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("MyObject {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("tutorial=" + String.valueOf(getTutorial()) + ", ") + .append("formCues=" + String.valueOf(getFormCues()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -12686,20 +12686,20 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the TypeWithAWSDateScalars type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"TypeWithAWSDateScalars\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "TypeWithAWSDateScalars") public final class TypeWithAWSDateScalars implements Model { - public static final QueryField ID = field(\\"TypeWithAWSDateScalars\\", \\"id\\"); - public static final QueryField DATE = field(\\"TypeWithAWSDateScalars\\", \\"date\\"); - public static final QueryField CREATED_AT = field(\\"TypeWithAWSDateScalars\\", \\"createdAt\\"); - public static final QueryField TIME = field(\\"TypeWithAWSDateScalars\\", \\"time\\"); - public static final QueryField TIMESTAMP = field(\\"TypeWithAWSDateScalars\\", \\"timestamp\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"AWSDate\\") Temporal.Date date; - private final @ModelField(targetType=\\"AWSDateTime\\") Temporal.DateTime createdAt; - private final @ModelField(targetType=\\"AWSTime\\") Temporal.Time time; - private final @ModelField(targetType=\\"AWSTimestamp\\") Temporal.Timestamp timestamp; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("TypeWithAWSDateScalars", "id"); + public static final QueryField DATE = field("TypeWithAWSDateScalars", "date"); + public static final QueryField CREATED_AT = field("TypeWithAWSDateScalars", "createdAt"); + public static final QueryField TIME = field("TypeWithAWSDateScalars", "time"); + public static final QueryField TIMESTAMP = field("TypeWithAWSDateScalars", "timestamp"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="AWSDate") Temporal.Date date; + private final @ModelField(targetType="AWSDateTime") Temporal.DateTime createdAt; + private final @ModelField(targetType="AWSTime") Temporal.Time time; + private final @ModelField(targetType="AWSTimestamp") Temporal.Timestamp timestamp; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -12765,14 +12765,14 @@ public final class TypeWithAWSDateScalars implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"TypeWithAWSDateScalars {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"date=\\" + String.valueOf(getDate()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"time=\\" + String.valueOf(getTime()) + \\", \\") - .append(\\"timestamp=\\" + String.valueOf(getTimestamp()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("TypeWithAWSDateScalars {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("date=" + String.valueOf(getDate()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("time=" + String.valueOf(getTime()) + ", ") + .append("timestamp=" + String.valueOf(getTimestamp()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -12914,7 +12914,7 @@ public final class TypeWithAWSDateScalars implements Model { exports[`AppSyncModelVisitor should generate an enum for enum type 1`] = ` "package com.amplifyframework.datastore.generated.model; /** Auto generated enum from GraphQL schema. */ -@SuppressWarnings(\\"all\\") +@SuppressWarnings("all") public enum Status { pending, done @@ -12942,23 +12942,23 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the authorBook type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"authorBooks\\") -@Index(name = \\"byAuthor\\", fields = {\\"author_id\\"}) -@Index(name = \\"byBook\\", fields = {\\"book_id\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "authorBooks") +@Index(name = "byAuthor", fields = {"author_id"}) +@Index(name = "byBook", fields = {"book_id"}) public final class authorBook implements Model { - public static final QueryField ID = field(\\"authorBook\\", \\"id\\"); - public static final QueryField AUTHOR_ID = field(\\"authorBook\\", \\"author_id\\"); - public static final QueryField BOOK_ID = field(\\"authorBook\\", \\"book_id\\"); - public static final QueryField AUTHOR = field(\\"authorBook\\", \\"author\\"); - public static final QueryField BOOK = field(\\"authorBook\\", \\"book\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String author_id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String book_id; - private final @ModelField(targetType=\\"String\\") String author; - private final @ModelField(targetType=\\"String\\") String book; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("authorBook", "id"); + public static final QueryField AUTHOR_ID = field("authorBook", "author_id"); + public static final QueryField BOOK_ID = field("authorBook", "book_id"); + public static final QueryField AUTHOR = field("authorBook", "author"); + public static final QueryField BOOK = field("authorBook", "book"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String author_id; + private final @ModelField(targetType="ID", isRequired = true) String book_id; + private final @ModelField(targetType="String") String author; + private final @ModelField(targetType="String") String book; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -13030,15 +13030,15 @@ public final class authorBook implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"authorBook {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"author_id=\\" + String.valueOf(getAuthorId()) + \\", \\") - .append(\\"book_id=\\" + String.valueOf(getBookId()) + \\", \\") - .append(\\"author=\\" + String.valueOf(getAuthor()) + \\", \\") - .append(\\"book=\\" + String.valueOf(getBook()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("authorBook {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("author_id=" + String.valueOf(getAuthorId()) + ", ") + .append("book_id=" + String.valueOf(getBookId()) + ", ") + .append("author=" + String.valueOf(getAuthor()) + ", ") + .append("book=" + String.valueOf(getBook()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -13208,15 +13208,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the NonCamelCaseField type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"NonCamelCaseFields\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "NonCamelCaseFields") public final class NonCamelCaseField implements Model { - public static final QueryField ID = field(\\"NonCamelCaseField\\", \\"id\\"); - public static final QueryField EMPLOYEE_PID = field(\\"NonCamelCaseField\\", \\"employeePID\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String employeePID; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("NonCamelCaseField", "id"); + public static final QueryField EMPLOYEE_PID = field("NonCamelCaseField", "employeePID"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String employeePID; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -13267,12 +13267,12 @@ public final class NonCamelCaseField implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"NonCamelCaseField {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"employeePID=\\" + String.valueOf(getEmployeePid()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("NonCamelCaseField {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("employeePID=" + String.valueOf(getEmployeePid()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -13380,15 +13380,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the snake_case type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"snake_cases\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "snake_cases") public final class snake_case implements Model { - public static final QueryField ID = field(\\"snake_case\\", \\"id\\"); - public static final QueryField NAME = field(\\"snake_case\\", \\"name\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("snake_case", "id"); + public static final QueryField NAME = field("snake_case", "name"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -13439,12 +13439,12 @@ public final class snake_case implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"snake_case {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("snake_case {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -13552,15 +13552,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the SnakeCaseField type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"SnakeCaseFields\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "SnakeCaseFields") public final class SnakeCaseField implements Model { - public static final QueryField ID = field(\\"SnakeCaseField\\", \\"id\\"); - public static final QueryField FIRST_NAME = field(\\"SnakeCaseField\\", \\"first_name\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String first_name; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("SnakeCaseField", "id"); + public static final QueryField FIRST_NAME = field("SnakeCaseField", "first_name"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String first_name; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -13611,12 +13611,12 @@ public final class SnakeCaseField implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"SnakeCaseField {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"first_name=\\" + String.valueOf(getFirstName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("SnakeCaseField {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("first_name=" + String.valueOf(getFirstName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -13704,4 +13704,4 @@ public final class SnakeCaseField implements Model { " `; -exports[`AppSyncModelVisitor should throw error if two fields have the same camel field 1`] = `"Fields \\"subject_name\\" and \\"subjectName\\" in sameCamelCaseField cannot be used at the same time which will result in the duplicate builder method."`; +exports[`AppSyncModelVisitor should throw error if two fields have the same camel field 1`] = `"Fields "subject_name" and "subjectName" in sameCamelCaseField cannot be used at the same time which will result in the duplicate builder method."`; diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-javascript-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-javascript-visitor.test.ts.snap index 9de2d826f..c63abd8d2 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-javascript-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-javascript-visitor.test.ts.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Javascript visitor with connected models of custom pk hasMany/belongsTo relation should generate correct declaration for hasMany bi-connection model when custom pk support is enabled 1`] = ` -"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from "@aws-amplify/datastore"; @@ -75,9 +75,9 @@ export declare const Comment: (new (init: ModelInit) => Comment) & { `; exports[`Javascript visitor with connected models of custom pk hasMany/belongsTo relation should generate correct declaration for hasMany uni-connection model when custom pk support is enabled 1`] = ` -"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from "@aws-amplify/datastore"; @@ -147,9 +147,9 @@ export declare const Comment: (new (init: ModelInit) => Comment) & { `; exports[`Javascript visitor with connected models of custom pk hasMany/belongsTo relation should generate correct declaration for hasMany uni-connection model with custom index 1`] = ` -"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from "@aws-amplify/datastore"; @@ -219,9 +219,9 @@ export declare const Comment: (new (init: ModelInit) => Comment) & { `; exports[`Javascript visitor with connected models of custom pk hasOne/belongsTo relation should generate correct declaration when custom pk support is enabled 1`] = ` -"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncItem } from "@aws-amplify/datastore"; @@ -297,9 +297,9 @@ export declare const Team: (new (init: ModelInit) => Team) & { `; exports[`Javascript visitor with connected models of custom pk manyToMany relation should generate correct declaration for manyToMany model when custom pk is enabled 1`] = ` -"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier, ManagedIdentifier } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel, __modelMeta__, CompositeIdentifier, ManagedIdentifier } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from "@aws-amplify/datastore"; diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-json-metadata-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-json-metadata-visitor.test.ts.snap index f7d8645ed..e3cf9938e 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-json-metadata-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-json-metadata-visitor.test.ts.snap @@ -2,2734 +2,2734 @@ exports[`Metadata visitor for custom PK support HasMany without corresponding belongsTo generates for composite pk 1`] = ` "export const schema = { - \\"models\\": { - \\"Project\\": { - \\"name\\": \\"Project\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"teams\\": { - \\"name\\": \\"teams\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Team\\" + "models": { + "Project": { + "name": "Project", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "teams": { + "name": "teams", + "isArray": true, + "type": { + "model": "Team" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"projectTeamsId\\", - \\"projectTeamsName\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "projectTeamsId", + "projectTeamsName" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Projects\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Projects", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "id", + "name" ] } } ] }, - \\"Team\\": { - \\"name\\": \\"Team\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"projectTeamsId\\": { - \\"name\\": \\"projectTeamsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"projectTeamsName\\": { - \\"name\\": \\"projectTeamsName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "Team": { + "name": "Team", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "projectTeamsId": { + "name": "projectTeamsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "projectTeamsName": { + "name": "projectTeamsName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Teams\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Teams", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"gsi-Project.teams\\", - \\"fields\\": [ - \\"projectTeamsId\\", - \\"projectTeamsName\\" + "type": "key", + "properties": { + "name": "gsi-Project.teams", + "fields": [ + "projectTeamsId", + "projectTeamsName" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"6b1bad408fb4d771f3219e585d3db29b\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "6b1bad408fb4d771f3219e585d3db29b" };" `; exports[`Metadata visitor for custom PK support HasMany without corresponding belongsTo generates for implicit pk 1`] = ` "export const schema = { - \\"models\\": { - \\"Project\\": { - \\"name\\": \\"Project\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"teams\\": { - \\"name\\": \\"teams\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Team\\" + "models": { + "Project": { + "name": "Project", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "teams": { + "name": "teams", + "isArray": true, + "type": { + "model": "Team" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"projectTeamsId\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "projectTeamsId" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Projects\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Projects", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Team\\": { - \\"name\\": \\"Team\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"projectTeamsId\\": { - \\"name\\": \\"projectTeamsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "Team": { + "name": "Team", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "projectTeamsId": { + "name": "projectTeamsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Teams\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Teams", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"gsi-Project.teams\\", - \\"fields\\": [ - \\"projectTeamsId\\" + "type": "key", + "properties": { + "name": "gsi-Project.teams", + "fields": [ + "projectTeamsId" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"cb4c9a5805faf864220f95ebc3e346de\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "cb4c9a5805faf864220f95ebc3e346de" };" `; exports[`Metadata visitor for custom PK support generates with belongsTo 1`] = ` "export const schema = { - \\"models\\": { - \\"Project\\": { - \\"name\\": \\"Project\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"teams\\": { - \\"name\\": \\"teams\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Team\\" + "models": { + "Project": { + "name": "Project", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "teams": { + "name": "teams", + "isArray": true, + "type": { + "model": "Team" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"projectTeamsId\\", - \\"projectTeamsName\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "projectTeamsId", + "projectTeamsName" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Projects\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Projects", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "id", + "name" ] } } ] }, - \\"Team\\": { - \\"name\\": \\"Team\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"project\\": { - \\"name\\": \\"project\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Project\\" + "Team": { + "name": "Team", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "project": { + "name": "project", + "isArray": false, + "type": { + "model": "Project" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"projectTeamsId\\", - \\"projectTeamsName\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"projectTeamsId\\": { - \\"name\\": \\"projectTeamsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"projectTeamsName\\": { - \\"name\\": \\"projectTeamsName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "projectTeamsId", + "projectTeamsName" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "projectTeamsId": { + "name": "projectTeamsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "projectTeamsName": { + "name": "projectTeamsName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Teams\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Teams", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"8b37aacc0491d9d130e918d8ee88197c\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "8b37aacc0491d9d130e918d8ee88197c" };" `; exports[`Metadata visitor for custom PK support generates with explicit index 1`] = ` "export const schema = { - \\"models\\": { - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "models": { + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"thePostId\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "thePostId" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "id", + "title" ] } } ] }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"thePostId\\": { - \\"name\\": \\"thePostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"thePostTitle\\": { - \\"name\\": \\"thePostTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Comment": { + "name": "Comment", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "thePostId": { + "name": "thePostId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "thePostTitle": { + "name": "thePostTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "id", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byCommentIds\\", - \\"fields\\": [ - \\"thePostId\\", - \\"thePostTitle\\" + "type": "key", + "properties": { + "name": "byCommentIds", + "fields": [ + "thePostId", + "thePostTitle" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"b4f818e9f626f398b3ce56e741314a5b\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "b4f818e9f626f398b3ce56e741314a5b" };" `; exports[`Metadata visitor for custom PK support relation metadata for hasMany & belongsTo when custom PK is enabled should generate correct metadata in js 1`] = ` "export const schema = { - \\"models\\": { - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"customPostId\\": { - \\"name\\": \\"customPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "models": { + "Post": { + "name": "Post", + "fields": { + "customPostId": { + "name": "customPostId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsCustomPostId\\", - \\"postCommentsTitle\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsCustomPostId", + "postCommentsTitle" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customPostId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "customPostId", + "title" ] } } ] }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"customCommentId\\": { - \\"name\\": \\"customCommentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "Comment": { + "name": "Comment", + "fields": { + "customCommentId": { + "name": "customCommentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCommentsCustomPostId\\", - \\"postCommentsTitle\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"postCommentsCustomPostId\\": { - \\"name\\": \\"postCommentsCustomPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postCommentsTitle\\": { - \\"name\\": \\"postCommentsTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCommentsCustomPostId", + "postCommentsTitle" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "postCommentsCustomPostId": { + "name": "postCommentsCustomPostId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postCommentsTitle": { + "name": "postCommentsTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customCommentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "customCommentId", + "content" ] } } ] }, - \\"Post1\\": { - \\"name\\": \\"Post1\\", - \\"fields\\": { - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment1\\" + "Post1": { + "name": "Post1", + "fields": { + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"post\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "post" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Post1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Post1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"postId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "postId", + "title" ] } } ] }, - \\"Comment1\\": { - \\"name\\": \\"Comment1\\", - \\"fields\\": { - \\"commentId\\": { - \\"name\\": \\"commentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post1\\" + "Comment1": { + "name": "Comment1", + "fields": { + "commentId": { + "name": "commentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postId\\", - \\"postTitle\\" - ] - } - }, - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postTitle\\": { - \\"name\\": \\"postTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postId", + "postTitle" + ] + } + }, + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postTitle": { + "name": "postTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comment1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comment1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"commentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "commentId", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byPost\\", - \\"fields\\": [ - \\"postId\\", - \\"postTitle\\" + "type": "key", + "properties": { + "name": "byPost", + "fields": [ + "postId", + "postTitle" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"cb8f120e36ffc33e0b01e0874ba14f7a\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "cb8f120e36ffc33e0b01e0874ba14f7a" };" `; exports[`Metadata visitor for custom PK support relation metadata for hasMany & belongsTo when custom PK is enabled should generate correct metadata in ts 1`] = ` -"import { Schema } from \\"@aws-amplify/datastore\\"; +"import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"customPostId\\": { - \\"name\\": \\"customPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "models": { + "Post": { + "name": "Post", + "fields": { + "customPostId": { + "name": "customPostId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsCustomPostId\\", - \\"postCommentsTitle\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsCustomPostId", + "postCommentsTitle" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customPostId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "customPostId", + "title" ] } } ] }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"customCommentId\\": { - \\"name\\": \\"customCommentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "Comment": { + "name": "Comment", + "fields": { + "customCommentId": { + "name": "customCommentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCommentsCustomPostId\\", - \\"postCommentsTitle\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"postCommentsCustomPostId\\": { - \\"name\\": \\"postCommentsCustomPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postCommentsTitle\\": { - \\"name\\": \\"postCommentsTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCommentsCustomPostId", + "postCommentsTitle" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "postCommentsCustomPostId": { + "name": "postCommentsCustomPostId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postCommentsTitle": { + "name": "postCommentsTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customCommentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "customCommentId", + "content" ] } } ] }, - \\"Post1\\": { - \\"name\\": \\"Post1\\", - \\"fields\\": { - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment1\\" + "Post1": { + "name": "Post1", + "fields": { + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"post\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "post" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Post1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Post1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"postId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "postId", + "title" ] } } ] }, - \\"Comment1\\": { - \\"name\\": \\"Comment1\\", - \\"fields\\": { - \\"commentId\\": { - \\"name\\": \\"commentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post1\\" + "Comment1": { + "name": "Comment1", + "fields": { + "commentId": { + "name": "commentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postId\\", - \\"postTitle\\" - ] - } - }, - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postTitle\\": { - \\"name\\": \\"postTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postId", + "postTitle" + ] + } + }, + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postTitle": { + "name": "postTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comment1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comment1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"commentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "commentId", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byPost\\", - \\"fields\\": [ - \\"postId\\", - \\"postTitle\\" + "type": "key", + "properties": { + "name": "byPost", + "fields": [ + "postId", + "postTitle" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"cb8f120e36ffc33e0b01e0874ba14f7a\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "cb8f120e36ffc33e0b01e0874ba14f7a" };" `; exports[`Metadata visitor for custom PK support relation metadata for hasMany uni when custom PK is enabled should generate correct metadata in js 1`] = ` "export const schema = { - \\"models\\": { - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "models": { + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsId\\", - \\"postCommentsTitle\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsId", + "postCommentsTitle" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "id", + "title" ] } } ] }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"postCommentsId\\": { - \\"name\\": \\"postCommentsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postCommentsTitle\\": { - \\"name\\": \\"postCommentsTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "Comment": { + "name": "Comment", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "postCommentsId": { + "name": "postCommentsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postCommentsTitle": { + "name": "postCommentsTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "id", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"gsi-Post.comments\\", - \\"fields\\": [ - \\"postCommentsId\\", - \\"postCommentsTitle\\" + "type": "key", + "properties": { + "name": "gsi-Post.comments", + "fields": [ + "postCommentsId", + "postCommentsTitle" ] } } ] }, - \\"Post1\\": { - \\"name\\": \\"Post1\\", - \\"fields\\": { - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment1\\" + "Post1": { + "name": "Post1", + "fields": { + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postId\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postId" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Post1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Post1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"postId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "postId", + "title" ] } } ] }, - \\"Comment1\\": { - \\"name\\": \\"Comment1\\", - \\"fields\\": { - \\"commentId\\": { - \\"name\\": \\"commentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postTitle\\": { - \\"name\\": \\"postTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Comment1": { + "name": "Comment1", + "fields": { + "commentId": { + "name": "commentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postTitle": { + "name": "postTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comment1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comment1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"commentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "commentId", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byPost\\", - \\"fields\\": [ - \\"postId\\", - \\"postTitle\\" + "type": "key", + "properties": { + "name": "byPost", + "fields": [ + "postId", + "postTitle" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"aa7ec83a3846aece824a211c5304dd88\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "aa7ec83a3846aece824a211c5304dd88" };" `; exports[`Metadata visitor for custom PK support relation metadata for hasMany uni when custom PK is enabled should generate correct metadata in ts 1`] = ` -"import { Schema } from \\"@aws-amplify/datastore\\"; +"import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "models": { + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsId\\", - \\"postCommentsTitle\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsId", + "postCommentsTitle" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "id", + "title" ] } } ] }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"postCommentsId\\": { - \\"name\\": \\"postCommentsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postCommentsTitle\\": { - \\"name\\": \\"postCommentsTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "Comment": { + "name": "Comment", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "postCommentsId": { + "name": "postCommentsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postCommentsTitle": { + "name": "postCommentsTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "id", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"gsi-Post.comments\\", - \\"fields\\": [ - \\"postCommentsId\\", - \\"postCommentsTitle\\" + "type": "key", + "properties": { + "name": "gsi-Post.comments", + "fields": [ + "postCommentsId", + "postCommentsTitle" ] } } ] }, - \\"Post1\\": { - \\"name\\": \\"Post1\\", - \\"fields\\": { - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment1\\" + "Post1": { + "name": "Post1", + "fields": { + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postId\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postId" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Post1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Post1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"postId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "postId", + "title" ] } } ] }, - \\"Comment1\\": { - \\"name\\": \\"Comment1\\", - \\"fields\\": { - \\"commentId\\": { - \\"name\\": \\"commentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postTitle\\": { - \\"name\\": \\"postTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Comment1": { + "name": "Comment1", + "fields": { + "commentId": { + "name": "commentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postTitle": { + "name": "postTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comment1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comment1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"commentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "commentId", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byPost\\", - \\"fields\\": [ - \\"postId\\", - \\"postTitle\\" + "type": "key", + "properties": { + "name": "byPost", + "fields": [ + "postId", + "postTitle" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"aa7ec83a3846aece824a211c5304dd88\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "aa7ec83a3846aece824a211c5304dd88" };" `; exports[`Metadata visitor for custom PK support relation metadata for hasOne/belongsTo when custom PK is enabled should generate correct metadata in js 1`] = ` "export const schema = { - \\"models\\": { - \\"Project\\": { - \\"name\\": \\"Project\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"team\\": { - \\"name\\": \\"team\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Team\\" + "models": { + "Project": { + "name": "Project", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "team": { + "name": "team", + "isArray": false, + "type": { + "model": "Team" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"id\\", - \\"name\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "id", + "name" ], - \\"targetNames\\": [ - \\"projectTeamId\\", - \\"projectTeamName\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"projectTeamId\\": { - \\"name\\": \\"projectTeamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"projectTeamName\\": { - \\"name\\": \\"projectTeamName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "targetNames": [ + "projectTeamId", + "projectTeamName" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "projectTeamId": { + "name": "projectTeamId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "projectTeamName": { + "name": "projectTeamName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Projects\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Projects", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "id", + "name" ] } } ] }, - \\"Team\\": { - \\"name\\": \\"Team\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"project\\": { - \\"name\\": \\"project\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Project\\" + "Team": { + "name": "Team", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "project": { + "name": "project", + "isArray": false, + "type": { + "model": "Project" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"teamProjectId\\", - \\"teamProjectName\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"teamProjectId\\": { - \\"name\\": \\"teamProjectId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"teamProjectName\\": { - \\"name\\": \\"teamProjectName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "teamProjectId", + "teamProjectName" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "teamProjectId": { + "name": "teamProjectId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "teamProjectName": { + "name": "teamProjectName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Teams\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Teams", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "id", + "name" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"e44592ddc9b6514a18674da5baacfe68\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "e44592ddc9b6514a18674da5baacfe68" };" `; exports[`Metadata visitor for custom PK support relation metadata for hasOne/belongsTo when custom PK is enabled should generate correct metadata in ts 1`] = ` -"import { Schema } from \\"@aws-amplify/datastore\\"; +"import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"Project\\": { - \\"name\\": \\"Project\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"team\\": { - \\"name\\": \\"team\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Team\\" + "models": { + "Project": { + "name": "Project", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "team": { + "name": "team", + "isArray": false, + "type": { + "model": "Team" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"id\\", - \\"name\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "id", + "name" ], - \\"targetNames\\": [ - \\"projectTeamId\\", - \\"projectTeamName\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"projectTeamId\\": { - \\"name\\": \\"projectTeamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"projectTeamName\\": { - \\"name\\": \\"projectTeamName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "targetNames": [ + "projectTeamId", + "projectTeamName" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "projectTeamId": { + "name": "projectTeamId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "projectTeamName": { + "name": "projectTeamName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Projects\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Projects", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "id", + "name" ] } } ] }, - \\"Team\\": { - \\"name\\": \\"Team\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"project\\": { - \\"name\\": \\"project\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Project\\" + "Team": { + "name": "Team", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "project": { + "name": "project", + "isArray": false, + "type": { + "model": "Project" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"teamProjectId\\", - \\"teamProjectName\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"teamProjectId\\": { - \\"name\\": \\"teamProjectId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"teamProjectName\\": { - \\"name\\": \\"teamProjectName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "teamProjectId", + "teamProjectName" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "teamProjectId": { + "name": "teamProjectId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "teamProjectName": { + "name": "teamProjectName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Teams\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Teams", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "id", + "name" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"e44592ddc9b6514a18674da5baacfe68\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "e44592ddc9b6514a18674da5baacfe68" };" `; exports[`Metadata visitor for custom PK support relation metadata for manyToMany when custom PK is enabled should generate correct metadata in js 1`] = ` "export const schema = { - \\"models\\": { - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"customPostId\\": { - \\"name\\": \\"customPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"tags\\": { - \\"name\\": \\"tags\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"PostTags\\" + "models": { + "Post": { + "name": "Post", + "fields": { + "customPostId": { + "name": "customPostId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "tags": { + "name": "tags", + "isArray": true, + "type": { + "model": "PostTags" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"post\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "post" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customPostId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "customPostId", + "title" ] } } ] }, - \\"Tag\\": { - \\"name\\": \\"Tag\\", - \\"fields\\": { - \\"customTagId\\": { - \\"name\\": \\"customTagId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"label\\": { - \\"name\\": \\"label\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"PostTags\\" + "Tag": { + "name": "Tag", + "fields": { + "customTagId": { + "name": "customTagId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "label": { + "name": "label", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "PostTags" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"tag\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "tag" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Tags\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Tags", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customTagId\\", - \\"label\\" + "type": "key", + "properties": { + "fields": [ + "customTagId", + "label" ] } } ] }, - \\"PostTags\\": { - \\"name\\": \\"PostTags\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"postCustomPostId\\": { - \\"name\\": \\"postCustomPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"posttitle\\": { - \\"name\\": \\"posttitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"tagCustomTagId\\": { - \\"name\\": \\"tagCustomTagId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"taglabel\\": { - \\"name\\": \\"taglabel\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "PostTags": { + "name": "PostTags", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "postCustomPostId": { + "name": "postCustomPostId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "posttitle": { + "name": "posttitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "tagCustomTagId": { + "name": "tagCustomTagId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "taglabel": { + "name": "taglabel", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCustomPostId\\", - \\"posttitle\\" + "isRequired": true, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCustomPostId", + "posttitle" ] } }, - \\"tag\\": { - \\"name\\": \\"tag\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Tag\\" + "tag": { + "name": "tag", + "isArray": false, + "type": { + "model": "Tag" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"tagCustomTagId\\", - \\"taglabel\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": true, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "tagCustomTagId", + "taglabel" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"PostTags\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "PostTags", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byPost\\", - \\"fields\\": [ - \\"postCustomPostId\\", - \\"posttitle\\" + "type": "key", + "properties": { + "name": "byPost", + "fields": [ + "postCustomPostId", + "posttitle" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byTag\\", - \\"fields\\": [ - \\"tagCustomTagId\\", - \\"taglabel\\" + "type": "key", + "properties": { + "name": "byTag", + "fields": [ + "tagCustomTagId", + "taglabel" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"7c85f0b3f2df2a63cd6e1c28593a5381\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "7c85f0b3f2df2a63cd6e1c28593a5381" };" `; exports[`Metadata visitor for custom PK support relation metadata for manyToMany when custom PK is enabled should generate correct metadata in ts 1`] = ` -"import { Schema } from \\"@aws-amplify/datastore\\"; +"import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"customPostId\\": { - \\"name\\": \\"customPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"tags\\": { - \\"name\\": \\"tags\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"PostTags\\" + "models": { + "Post": { + "name": "Post", + "fields": { + "customPostId": { + "name": "customPostId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "tags": { + "name": "tags", + "isArray": true, + "type": { + "model": "PostTags" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"post\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "post" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customPostId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "customPostId", + "title" ] } } ] }, - \\"Tag\\": { - \\"name\\": \\"Tag\\", - \\"fields\\": { - \\"customTagId\\": { - \\"name\\": \\"customTagId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"label\\": { - \\"name\\": \\"label\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"PostTags\\" + "Tag": { + "name": "Tag", + "fields": { + "customTagId": { + "name": "customTagId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "label": { + "name": "label", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "PostTags" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"tag\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "tag" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Tags\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Tags", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customTagId\\", - \\"label\\" + "type": "key", + "properties": { + "fields": [ + "customTagId", + "label" ] } } ] }, - \\"PostTags\\": { - \\"name\\": \\"PostTags\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"postCustomPostId\\": { - \\"name\\": \\"postCustomPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"posttitle\\": { - \\"name\\": \\"posttitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"tagCustomTagId\\": { - \\"name\\": \\"tagCustomTagId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"taglabel\\": { - \\"name\\": \\"taglabel\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "PostTags": { + "name": "PostTags", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "postCustomPostId": { + "name": "postCustomPostId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "posttitle": { + "name": "posttitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "tagCustomTagId": { + "name": "tagCustomTagId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "taglabel": { + "name": "taglabel", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCustomPostId\\", - \\"posttitle\\" + "isRequired": true, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCustomPostId", + "posttitle" ] } }, - \\"tag\\": { - \\"name\\": \\"tag\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Tag\\" + "tag": { + "name": "tag", + "isArray": false, + "type": { + "model": "Tag" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"tagCustomTagId\\", - \\"taglabel\\" - ] - } - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": true, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "tagCustomTagId", + "taglabel" + ] + } + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"PostTags\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "PostTags", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byPost\\", - \\"fields\\": [ - \\"postCustomPostId\\", - \\"posttitle\\" + "type": "key", + "properties": { + "name": "byPost", + "fields": [ + "postCustomPostId", + "posttitle" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byTag\\", - \\"fields\\": [ - \\"tagCustomTagId\\", - \\"taglabel\\" + "type": "key", + "properties": { + "name": "byTag", + "fields": [ + "tagCustomTagId", + "taglabel" ] } } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"7c85f0b3f2df2a63cd6e1c28593a5381\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "7c85f0b3f2df2a63cd6e1c28593a5381" };" `; diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-model-introspection-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-model-introspection-visitor.test.ts.snap index 375598619..ff48d2b11 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-model-introspection-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-model-introspection-visitor.test.ts.snap @@ -2,364 +2,364 @@ exports[`Conversation Route Introspection Visitor Metadata snapshot should generate correct model intropection file validated by JSON schema 1`] = ` "{ - \\"version\\": 1, - \\"models\\": {}, - \\"enums\\": { - \\"ConversationParticipantRole\\": { - \\"name\\": \\"ConversationParticipantRole\\", - \\"values\\": [ - \\"user\\", - \\"assistant\\" + "version": 1, + "models": {}, + "enums": { + "ConversationParticipantRole": { + "name": "ConversationParticipantRole", + "values": [ + "user", + "assistant" ] } }, - \\"nonModels\\": { - \\"ContentBlock\\": { - \\"name\\": \\"ContentBlock\\", - \\"fields\\": { - \\"type\\": { - \\"name\\": \\"type\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "nonModels": { + "ContentBlock": { + "name": "ContentBlock", + "fields": { + "type": { + "name": "type", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } } }, - \\"ToolConfiguration\\": { - \\"name\\": \\"ToolConfiguration\\", - \\"fields\\": { - \\"type\\": { - \\"name\\": \\"type\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "ToolConfiguration": { + "name": "ToolConfiguration", + "fields": { + "type": { + "name": "type", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } } } }, - \\"conversations\\": { - \\"pirateChat\\": { - \\"name\\": \\"pirateChat\\", - \\"models\\": { - \\"ConversationPirateChat\\": { - \\"name\\": \\"ConversationPirateChat\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"type\\": \\"ID\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": true + "conversations": { + "pirateChat": { + "name": "pirateChat", + "models": { + "ConversationPirateChat": { + "name": "ConversationPirateChat", + "fields": { + "id": { + "name": "id", + "type": "ID", + "attributes": [], + "isArray": false, + "isRequired": true }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"type\\": \\"String\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false + "name": { + "name": "name", + "type": "String", + "attributes": [], + "isArray": false, + "isRequired": false }, - \\"metadata\\": { - \\"name\\": \\"metadata\\", - \\"type\\": \\"AWSJSON\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false + "metadata": { + "name": "metadata", + "type": "AWSJSON", + "attributes": [], + "isArray": false, + "isRequired": false }, - \\"messages\\": { - \\"name\\": \\"messages\\", - \\"type\\": { - \\"model\\": \\"ConversationMessagePirateChat\\" + "messages": { + "name": "messages", + "type": { + "model": "ConversationMessagePirateChat" }, - \\"attributes\\": [], - \\"isArray\\": true, - \\"isRequired\\": false, - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"conversationId\\" + "attributes": [], + "isArray": true, + "isRequired": false, + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "conversationId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false, - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "type": "AWSDateTime", + "attributes": [], + "isArray": false, + "isRequired": false, + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false, - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "type": "AWSDateTime", + "attributes": [], + "isArray": false, + "isRequired": false, + "isReadOnly": true }, - \\"owner\\": { - \\"name\\": \\"owner\\", - \\"type\\": \\"String\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false + "owner": { + "name": "owner", + "type": "String", + "attributes": [], + "isArray": false, + "isRequired": false } }, - \\"syncable\\": true, - \\"pluralName\\": \\"ConversationPirateChats\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "ConversationPirateChats", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": { - \\"subscriptions\\": { - \\"level\\": \\"off\\" + "type": "model", + "properties": { + "subscriptions": { + "level": "off" }, - \\"mutations\\": { - \\"update\\": null + "mutations": { + "update": null } } }, { - \\"type\\": \\"auth\\", - \\"properties\\": { - \\"rules\\": [ + "type": "auth", + "properties": { + "rules": [ { - \\"provider\\": \\"userPools\\", - \\"ownerField\\": \\"owner\\", - \\"allow\\": \\"owner\\", - \\"identityClaim\\": \\"cognito:username\\", - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "provider": "userPools", + "ownerField": "owner", + "allow": "owner", + "identityClaim": "cognito:username", + "operations": [ + "create", + "update", + "delete", + "read" ] } ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"ConversationMessagePirateChat\\": { - \\"name\\": \\"ConversationMessagePirateChat\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"type\\": \\"ID\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": true + "ConversationMessagePirateChat": { + "name": "ConversationMessagePirateChat", + "fields": { + "id": { + "name": "id", + "type": "ID", + "attributes": [], + "isArray": false, + "isRequired": true }, - \\"conversationId\\": { - \\"name\\": \\"conversationId\\", - \\"type\\": \\"ID\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": true + "conversationId": { + "name": "conversationId", + "type": "ID", + "attributes": [], + "isArray": false, + "isRequired": true }, - \\"conversation\\": { - \\"name\\": \\"conversation\\", - \\"type\\": { - \\"model\\": \\"ConversationPirateChat\\" + "conversation": { + "name": "conversation", + "type": { + "model": "ConversationPirateChat" }, - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false, - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"conversationId\\" + "attributes": [], + "isArray": false, + "isRequired": false, + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "conversationId" ] } }, - \\"role\\": { - \\"name\\": \\"role\\", - \\"type\\": { - \\"enum\\": \\"AmplifyAIConversationParticipantRole\\" + "role": { + "name": "role", + "type": { + "enum": "AmplifyAIConversationParticipantRole" }, - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false + "attributes": [], + "isArray": false, + "isRequired": false }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"type\\": { - \\"nonModel\\": \\"AmplifyAIContentBlock\\" + "content": { + "name": "content", + "type": { + "nonModel": "AmplifyAIContentBlock" }, - \\"attributes\\": [], - \\"isArray\\": true, - \\"isRequired\\": false + "attributes": [], + "isArray": true, + "isRequired": false }, - \\"aiContext\\": { - \\"name\\": \\"aiContext\\", - \\"type\\": \\"AWSJSON\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false + "aiContext": { + "name": "aiContext", + "type": "AWSJSON", + "attributes": [], + "isArray": false, + "isRequired": false }, - \\"toolConfiguration\\": { - \\"name\\": \\"toolConfiguration\\", - \\"type\\": { - \\"nonModel\\": \\"AmplifyAIToolConfiguration\\" + "toolConfiguration": { + "name": "toolConfiguration", + "type": { + "nonModel": "AmplifyAIToolConfiguration" }, - \\"attributes\\": [], - \\"isArray\\": true, - \\"isRequired\\": false, - \\"isArrayNullable\\": true + "attributes": [], + "isArray": true, + "isRequired": false, + "isArrayNullable": true }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false, - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "type": "AWSDateTime", + "attributes": [], + "isArray": false, + "isRequired": false, + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime\\", - \\"attributes\\": [], - \\"isArray\\": false, - \\"isRequired\\": false, - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "type": "AWSDateTime", + "attributes": [], + "isArray": false, + "isRequired": false, + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"ConversationMessagePirateChats\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "ConversationMessagePirateChats", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": { - \\"subscriptions\\": {} + "type": "model", + "properties": { + "subscriptions": {} } }, { - \\"type\\": \\"auth\\", - \\"properties\\": { - \\"rules\\": [ + "type": "auth", + "properties": { + "rules": [ { - \\"provider\\": \\"userPools\\", - \\"ownerField\\": \\"owner\\", - \\"allow\\": \\"owner\\", - \\"identityClaim\\": \\"cognito:username\\", - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "provider": "userPools", + "ownerField": "owner", + "allow": "owner", + "identityClaim": "cognito:username", + "operations": [ + "create", + "update", + "delete", + "read" ] } ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"nonModels\\": {}, - \\"enums\\": { - \\"ConversationParticipantRole\\": { - \\"name\\": \\"AmplifyAIConversationParticipantRole\\", - \\"values\\": [ - \\"user\\", - \\"assistant\\" + "nonModels": {}, + "enums": { + "ConversationParticipantRole": { + "name": "AmplifyAIConversationParticipantRole", + "values": [ + "user", + "assistant" ] } }, - \\"conversation\\": { - \\"modelName\\": \\"ConversationPirateChat\\" + "conversation": { + "modelName": "ConversationPirateChat" }, - \\"message\\": { - \\"modelName\\": \\"ConversationMessagePirateChat\\", - \\"send\\": { - \\"name\\": \\"pirateChat\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"ConversationMessagePirateChat\\" + "message": { + "modelName": "ConversationMessagePirateChat", + "send": { + "name": "pirateChat", + "isArray": false, + "type": { + "model": "ConversationMessagePirateChat" }, - \\"isRequired\\": false, - \\"arguments\\": { - \\"conversationId\\": { - \\"name\\": \\"conversationId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false + "isRequired": false, + "arguments": { + "conversationId": { + "name": "conversationId", + "isArray": false, + "type": "ID", + "isRequired": false }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": true, - \\"type\\": { - \\"input\\": \\"ContentBlockInput\\" + "content": { + "name": "content", + "isArray": true, + "type": { + "input": "ContentBlockInput" }, - \\"isRequired\\": false, - \\"isArrayNullable\\": true + "isRequired": false, + "isArrayNullable": true }, - \\"aiContext\\": { - \\"name\\": \\"aiContext\\", - \\"isArray\\": false, - \\"type\\": \\"AWSJSON\\", - \\"isRequired\\": false + "aiContext": { + "name": "aiContext", + "isArray": false, + "type": "AWSJSON", + "isRequired": false }, - \\"toolConfiguration\\": { - \\"name\\": \\"toolConfiguration\\", - \\"isArray\\": false, - \\"type\\": { - \\"input\\": \\"ToolConfigurationInput\\" + "toolConfiguration": { + "name": "toolConfiguration", + "isArray": false, + "type": { + "input": "ToolConfigurationInput" }, - \\"isRequired\\": false + "isRequired": false } } }, - \\"subscribe\\": { - \\"isArray\\": false, - \\"isRequired\\": false, - \\"name\\": \\"onCreateAssistantResponsePirateChat\\", - \\"type\\": { - \\"nonModel\\": \\"AmplifyAIConversationMessageStreamPart\\" + "subscribe": { + "isArray": false, + "isRequired": false, + "name": "onCreateAssistantResponsePirateChat", + "type": { + "nonModel": "AmplifyAIConversationMessageStreamPart" }, - \\"arguments\\": { - \\"conversationId\\": { - \\"name\\": \\"conversationId\\", - \\"isArray\\": false, - \\"isRequired\\": true, - \\"type\\": \\"ID\\" + "arguments": { + "conversationId": { + "name": "conversationId", + "isArray": false, + "isRequired": true, + "type": "ID" } } } } } }, - \\"inputs\\": { - \\"ContentBlockInput\\": { - \\"name\\": \\"ContentBlockInput\\", - \\"attributes\\": { - \\"type\\": { - \\"name\\": \\"type\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false + "inputs": { + "ContentBlockInput": { + "name": "ContentBlockInput", + "attributes": { + "type": { + "name": "type", + "isArray": false, + "type": "String", + "isRequired": false } } }, - \\"ToolConfigurationInput\\": { - \\"name\\": \\"ToolConfigurationInput\\", - \\"attributes\\": { - \\"type\\": { - \\"name\\": \\"type\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false + "ToolConfigurationInput": { + "name": "ToolConfigurationInput", + "attributes": { + "type": { + "name": "type", + "isArray": false, + "type": "String", + "isRequired": false } } } @@ -369,1973 +369,1973 @@ exports[`Conversation Route Introspection Visitor Metadata snapshot should gener exports[`Custom primary key tests should generate correct model intropection file validated by JSON schema and not throw error when custom PK is enabled 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Project1\\": { - \\"name\\": \\"Project1\\", - \\"fields\\": { - \\"projectId\\": { - \\"name\\": \\"projectId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"team\\": { - \\"name\\": \\"team\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Team1\\" + "version": 1, + "models": { + "Project1": { + "name": "Project1", + "fields": { + "projectId": { + "name": "projectId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "team": { + "name": "team", + "isArray": false, + "type": { + "model": "Team1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"teamId\\", - \\"name\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "teamId", + "name" ], - \\"targetNames\\": [ - \\"project1TeamTeamId\\", - \\"project1TeamName\\" + "targetNames": [ + "project1TeamTeamId", + "project1TeamName" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"project1TeamTeamId\\": { - \\"name\\": \\"project1TeamTeamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"project1TeamName\\": { - \\"name\\": \\"project1TeamName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "project1TeamTeamId": { + "name": "project1TeamTeamId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "project1TeamName": { + "name": "project1TeamName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Project1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Project1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"projectId\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "projectId", + "name" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"projectId\\", - \\"sortKeyFieldNames\\": [ - \\"name\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "projectId", + "sortKeyFieldNames": [ + "name" ] } }, - \\"Team1\\": { - \\"name\\": \\"Team1\\", - \\"fields\\": { - \\"teamId\\": { - \\"name\\": \\"teamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"project\\": { - \\"name\\": \\"project\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Project1\\" + "Team1": { + "name": "Team1", + "fields": { + "teamId": { + "name": "teamId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "project": { + "name": "project", + "isArray": false, + "type": { + "model": "Project1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"team1ProjectProjectId\\", - \\"team1ProjectName\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "team1ProjectProjectId", + "team1ProjectName" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"team1ProjectProjectId\\": { - \\"name\\": \\"team1ProjectProjectId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"team1ProjectName\\": { - \\"name\\": \\"team1ProjectName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "team1ProjectProjectId": { + "name": "team1ProjectProjectId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "team1ProjectName": { + "name": "team1ProjectName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Team1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Team1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"teamId\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "teamId", + "name" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"teamId\\", - \\"sortKeyFieldNames\\": [ - \\"name\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "teamId", + "sortKeyFieldNames": [ + "name" ] } }, - \\"Project2\\": { - \\"name\\": \\"Project2\\", - \\"fields\\": { - \\"projectId\\": { - \\"name\\": \\"projectId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"team\\": { - \\"name\\": \\"team\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Team2\\" + "Project2": { + "name": "Project2", + "fields": { + "projectId": { + "name": "projectId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "team": { + "name": "team", + "isArray": false, + "type": { + "model": "Team2" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"teamId\\", - \\"name\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "teamId", + "name" ], - \\"targetNames\\": [ - \\"project2TeamTeamId\\", - \\"project2TeamName\\" + "targetNames": [ + "project2TeamTeamId", + "project2TeamName" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"project2TeamTeamId\\": { - \\"name\\": \\"project2TeamTeamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"project2TeamName\\": { - \\"name\\": \\"project2TeamName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "project2TeamTeamId": { + "name": "project2TeamTeamId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "project2TeamName": { + "name": "project2TeamName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Project2s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Project2s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"projectId\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "projectId", + "name" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"projectId\\", - \\"sortKeyFieldNames\\": [ - \\"name\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "projectId", + "sortKeyFieldNames": [ + "name" ] } }, - \\"Team2\\": { - \\"name\\": \\"Team2\\", - \\"fields\\": { - \\"teamId\\": { - \\"name\\": \\"teamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Team2": { + "name": "Team2", + "fields": { + "teamId": { + "name": "teamId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Team2s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Team2s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"teamId\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "teamId", + "name" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"teamId\\", - \\"sortKeyFieldNames\\": [ - \\"name\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "teamId", + "sortKeyFieldNames": [ + "name" ] } }, - \\"Project3\\": { - \\"name\\": \\"Project3\\", - \\"fields\\": { - \\"projectId\\": { - \\"name\\": \\"projectId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"team\\": { - \\"name\\": \\"team\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Team3\\" + "Project3": { + "name": "Project3", + "fields": { + "projectId": { + "name": "projectId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "team": { + "name": "team", + "isArray": false, + "type": { + "model": "Team3" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"teamId\\", - \\"name\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "teamId", + "name" ], - \\"targetNames\\": [ - \\"teamId\\", - \\"teamName\\" + "targetNames": [ + "teamId", + "teamName" ] } }, - \\"teamId\\": { - \\"name\\": \\"teamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"teamName\\": { - \\"name\\": \\"teamName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "teamId": { + "name": "teamId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "teamName": { + "name": "teamName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Project3s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Project3s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"projectId\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "projectId", + "name" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"projectId\\", - \\"sortKeyFieldNames\\": [ - \\"name\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "projectId", + "sortKeyFieldNames": [ + "name" ] } }, - \\"Team3\\": { - \\"name\\": \\"Team3\\", - \\"fields\\": { - \\"teamId\\": { - \\"name\\": \\"teamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"project\\": { - \\"name\\": \\"project\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Project3\\" + "Team3": { + "name": "Team3", + "fields": { + "teamId": { + "name": "teamId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "project": { + "name": "project", + "isArray": false, + "type": { + "model": "Project3" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"projectId\\", - \\"projectName\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "projectId", + "projectName" ] } }, - \\"projectId\\": { - \\"name\\": \\"projectId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"projectName\\": { - \\"name\\": \\"projectName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "projectId": { + "name": "projectId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "projectName": { + "name": "projectName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Team3s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Team3s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"teamId\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "teamId", + "name" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"teamId\\", - \\"sortKeyFieldNames\\": [ - \\"name\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "teamId", + "sortKeyFieldNames": [ + "name" ] } }, - \\"Project4\\": { - \\"name\\": \\"Project4\\", - \\"fields\\": { - \\"projectId\\": { - \\"name\\": \\"projectId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"team\\": { - \\"name\\": \\"team\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Team4\\" + "Project4": { + "name": "Project4", + "fields": { + "projectId": { + "name": "projectId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "team": { + "name": "team", + "isArray": false, + "type": { + "model": "Team4" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"teamId\\", - \\"name\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "teamId", + "name" ], - \\"targetNames\\": [ - \\"teamId\\", - \\"teamName\\" + "targetNames": [ + "teamId", + "teamName" ] } }, - \\"teamId\\": { - \\"name\\": \\"teamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"teamName\\": { - \\"name\\": \\"teamName\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "teamId": { + "name": "teamId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "teamName": { + "name": "teamName", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Project4s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Project4s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"projectId\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "projectId", + "name" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"projectId\\", - \\"sortKeyFieldNames\\": [ - \\"name\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "projectId", + "sortKeyFieldNames": [ + "name" ] } }, - \\"Team4\\": { - \\"name\\": \\"Team4\\", - \\"fields\\": { - \\"teamId\\": { - \\"name\\": \\"teamId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Team4": { + "name": "Team4", + "fields": { + "teamId": { + "name": "teamId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Team4s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Team4s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"teamId\\", - \\"name\\" + "type": "key", + "properties": { + "fields": [ + "teamId", + "name" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"teamId\\", - \\"sortKeyFieldNames\\": [ - \\"name\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "teamId", + "sortKeyFieldNames": [ + "name" ] } }, - \\"Post1\\": { - \\"name\\": \\"Post1\\", - \\"fields\\": { - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment1\\" + "Post1": { + "name": "Post1", + "fields": { + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"post1CommentsPostId\\", - \\"post1CommentsTitle\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "post1CommentsPostId", + "post1CommentsTitle" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Post1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Post1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"postId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "postId", + "title" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"postId\\", - \\"sortKeyFieldNames\\": [ - \\"title\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "postId", + "sortKeyFieldNames": [ + "title" ] } }, - \\"Comment1\\": { - \\"name\\": \\"Comment1\\", - \\"fields\\": { - \\"commentId\\": { - \\"name\\": \\"commentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post1\\" + "Comment1": { + "name": "Comment1", + "fields": { + "commentId": { + "name": "commentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post1" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"post1CommentsPostId\\", - \\"post1CommentsTitle\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "post1CommentsPostId", + "post1CommentsTitle" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"post1CommentsPostId\\": { - \\"name\\": \\"post1CommentsPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"post1CommentsTitle\\": { - \\"name\\": \\"post1CommentsTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "post1CommentsPostId": { + "name": "post1CommentsPostId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "post1CommentsTitle": { + "name": "post1CommentsTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comment1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comment1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"commentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "commentId", + "content" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"commentId\\", - \\"sortKeyFieldNames\\": [ - \\"content\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "commentId", + "sortKeyFieldNames": [ + "content" ] } }, - \\"Post2\\": { - \\"name\\": \\"Post2\\", - \\"fields\\": { - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment2\\" + "Post2": { + "name": "Post2", + "fields": { + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment2" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"post2CommentsPostId\\", - \\"post2CommentsTitle\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "post2CommentsPostId", + "post2CommentsTitle" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Post2s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Post2s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"postId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "postId", + "title" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"postId\\", - \\"sortKeyFieldNames\\": [ - \\"title\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "postId", + "sortKeyFieldNames": [ + "title" ] } }, - \\"Comment2\\": { - \\"name\\": \\"Comment2\\", - \\"fields\\": { - \\"commentId\\": { - \\"name\\": \\"commentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"post2CommentsPostId\\": { - \\"name\\": \\"post2CommentsPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"post2CommentsTitle\\": { - \\"name\\": \\"post2CommentsTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "Comment2": { + "name": "Comment2", + "fields": { + "commentId": { + "name": "commentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "post2CommentsPostId": { + "name": "post2CommentsPostId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "post2CommentsTitle": { + "name": "post2CommentsTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comment2s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comment2s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"commentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "commentId", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"gsi-Post2.comments\\", - \\"fields\\": [ - \\"post2CommentsPostId\\", - \\"post2CommentsTitle\\" + "type": "key", + "properties": { + "name": "gsi-Post2.comments", + "fields": [ + "post2CommentsPostId", + "post2CommentsTitle" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"commentId\\", - \\"sortKeyFieldNames\\": [ - \\"content\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "commentId", + "sortKeyFieldNames": [ + "content" ] } }, - \\"Post3\\": { - \\"name\\": \\"Post3\\", - \\"fields\\": { - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment3\\" + "Post3": { + "name": "Post3", + "fields": { + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment3" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"post\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "post" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Post3s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Post3s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"postId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "postId", + "title" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"postId\\", - \\"sortKeyFieldNames\\": [ - \\"title\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "postId", + "sortKeyFieldNames": [ + "title" ] } }, - \\"Comment3\\": { - \\"name\\": \\"Comment3\\", - \\"fields\\": { - \\"commentId\\": { - \\"name\\": \\"commentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post3\\" + "Comment3": { + "name": "Comment3", + "fields": { + "commentId": { + "name": "commentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post3" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postId\\", - \\"postTitle\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postId", + "postTitle" ] } }, - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postTitle\\": { - \\"name\\": \\"postTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postTitle": { + "name": "postTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comment3s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comment3s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"commentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "commentId", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byPost\\", - \\"fields\\": [ - \\"postId\\", - \\"postTitle\\" + "type": "key", + "properties": { + "name": "byPost", + "fields": [ + "postId", + "postTitle" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"commentId\\", - \\"sortKeyFieldNames\\": [ - \\"content\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "commentId", + "sortKeyFieldNames": [ + "content" ] } }, - \\"Post4\\": { - \\"name\\": \\"Post4\\", - \\"fields\\": { - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment4\\" + "Post4": { + "name": "Post4", + "fields": { + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment4" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Post4s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Post4s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"postId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "postId", + "title" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"postId\\", - \\"sortKeyFieldNames\\": [ - \\"title\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "postId", + "sortKeyFieldNames": [ + "title" ] } }, - \\"Comment4\\": { - \\"name\\": \\"Comment4\\", - \\"fields\\": { - \\"commentId\\": { - \\"name\\": \\"commentId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"postTitle\\": { - \\"name\\": \\"postTitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Comment4": { + "name": "Comment4", + "fields": { + "commentId": { + "name": "commentId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "postTitle": { + "name": "postTitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comment4s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comment4s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"commentId\\", - \\"content\\" + "type": "key", + "properties": { + "fields": [ + "commentId", + "content" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byPost\\", - \\"fields\\": [ - \\"postId\\", - \\"postTitle\\" + "type": "key", + "properties": { + "name": "byPost", + "fields": [ + "postId", + "postTitle" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"commentId\\", - \\"sortKeyFieldNames\\": [ - \\"content\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "commentId", + "sortKeyFieldNames": [ + "content" ] } }, - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"customPostId\\": { - \\"name\\": \\"customPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"tags\\": { - \\"name\\": \\"tags\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"PostTags\\" + "Post": { + "name": "Post", + "fields": { + "customPostId": { + "name": "customPostId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "tags": { + "name": "tags", + "isArray": true, + "type": { + "model": "PostTags" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"post\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "post" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customPostId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "customPostId", + "title" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"customPostId\\", - \\"sortKeyFieldNames\\": [ - \\"title\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "customPostId", + "sortKeyFieldNames": [ + "title" ] } }, - \\"Tag\\": { - \\"name\\": \\"Tag\\", - \\"fields\\": { - \\"customTagId\\": { - \\"name\\": \\"customTagId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"label\\": { - \\"name\\": \\"label\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"PostTags\\" + "Tag": { + "name": "Tag", + "fields": { + "customTagId": { + "name": "customTagId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "label": { + "name": "label", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "PostTags" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"tag\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "tag" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Tags\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Tags", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"customTagId\\", - \\"label\\" + "type": "key", + "properties": { + "fields": [ + "customTagId", + "label" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"customTagId\\", - \\"sortKeyFieldNames\\": [ - \\"label\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "customTagId", + "sortKeyFieldNames": [ + "label" ] } }, - \\"PostTags\\": { - \\"name\\": \\"PostTags\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"postCustomPostId\\": { - \\"name\\": \\"postCustomPostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"posttitle\\": { - \\"name\\": \\"posttitle\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"tagCustomTagId\\": { - \\"name\\": \\"tagCustomTagId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"taglabel\\": { - \\"name\\": \\"taglabel\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "PostTags": { + "name": "PostTags", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "postCustomPostId": { + "name": "postCustomPostId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "posttitle": { + "name": "posttitle", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "tagCustomTagId": { + "name": "tagCustomTagId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "taglabel": { + "name": "taglabel", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCustomPostId\\", - \\"posttitle\\" + "isRequired": true, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCustomPostId", + "posttitle" ] } }, - \\"tag\\": { - \\"name\\": \\"tag\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Tag\\" + "tag": { + "name": "tag", + "isArray": false, + "type": { + "model": "Tag" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"tagCustomTagId\\", - \\"taglabel\\" + "isRequired": true, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "tagCustomTagId", + "taglabel" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"PostTags\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "PostTags", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byPost\\", - \\"fields\\": [ - \\"postCustomPostId\\", - \\"posttitle\\" + "type": "key", + "properties": { + "name": "byPost", + "fields": [ + "postCustomPostId", + "posttitle" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"byTag\\", - \\"fields\\": [ - \\"tagCustomTagId\\", - \\"taglabel\\" + "type": "key", + "properties": { + "name": "byTag", + "fields": [ + "tagCustomTagId", + "taglabel" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`Custom queries/mutations/subscriptions & input type tests should generate correct metadata for custom queries/mutations/subscriptions in model introspection schema 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Todo\\": { - \\"name\\": \\"Todo\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"description\\": { - \\"name\\": \\"description\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"phone\\": { - \\"name\\": \\"phone\\", - \\"isArray\\": false, - \\"type\\": { - \\"nonModel\\": \\"Phone\\" + "version": 1, + "models": { + "Todo": { + "name": "Todo", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "description": { + "name": "description", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "phone": { + "name": "phone", + "isArray": false, + "type": { + "nonModel": "Phone" }, - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "isRequired": false, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Todos\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Todos", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": { - \\"BillingSource\\": { - \\"name\\": \\"BillingSource\\", - \\"values\\": [ - \\"CLIENT\\", - \\"PROJECT\\" + "enums": { + "BillingSource": { + "name": "BillingSource", + "values": [ + "CLIENT", + "PROJECT" ] } }, - \\"nonModels\\": { - \\"Phone\\": { - \\"name\\": \\"Phone\\", - \\"fields\\": { - \\"number\\": { - \\"name\\": \\"number\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "nonModels": { + "Phone": { + "name": "Phone", + "fields": { + "number": { + "name": "number", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } } } }, - \\"queries\\": { - \\"getAllTodo\\": { - \\"name\\": \\"getAllTodo\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"arguments\\": { - \\"msg\\": { - \\"name\\": \\"msg\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false - }, - \\"input\\": { - \\"name\\": \\"input\\", - \\"isArray\\": false, - \\"type\\": { - \\"input\\": \\"CustomInput\\" + "queries": { + "getAllTodo": { + "name": "getAllTodo", + "isArray": false, + "type": "String", + "isRequired": false, + "arguments": { + "msg": { + "name": "msg", + "isArray": false, + "type": "String", + "isRequired": false + }, + "input": { + "name": "input", + "isArray": false, + "type": { + "input": "CustomInput" }, - \\"isRequired\\": false + "isRequired": false } } }, - \\"echo\\": { - \\"name\\": \\"echo\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"arguments\\": { - \\"msg\\": { - \\"name\\": \\"msg\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false + "echo": { + "name": "echo", + "isArray": false, + "type": "String", + "isRequired": false, + "arguments": { + "msg": { + "name": "msg", + "isArray": false, + "type": "String", + "isRequired": false } } }, - \\"echo2\\": { - \\"name\\": \\"echo2\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Todo\\" + "echo2": { + "name": "echo2", + "isArray": false, + "type": { + "model": "Todo" }, - \\"isRequired\\": false, - \\"arguments\\": { - \\"todoId\\": { - \\"name\\": \\"todoId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true + "isRequired": false, + "arguments": { + "todoId": { + "name": "todoId", + "isArray": false, + "type": "ID", + "isRequired": true } } }, - \\"echo3\\": { - \\"name\\": \\"echo3\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Todo\\" + "echo3": { + "name": "echo3", + "isArray": true, + "type": { + "model": "Todo" }, - \\"isRequired\\": true, - \\"isArrayNullable\\": false + "isRequired": true, + "isArrayNullable": false }, - \\"echo4\\": { - \\"name\\": \\"echo4\\", - \\"isArray\\": false, - \\"type\\": { - \\"nonModel\\": \\"Phone\\" + "echo4": { + "name": "echo4", + "isArray": false, + "type": { + "nonModel": "Phone" }, - \\"isRequired\\": false, - \\"arguments\\": { - \\"number\\": { - \\"name\\": \\"number\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false + "isRequired": false, + "arguments": { + "number": { + "name": "number", + "isArray": false, + "type": "String", + "isRequired": false } } }, - \\"echo6\\": { - \\"name\\": \\"echo6\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"arguments\\": { - \\"customInput\\": { - \\"name\\": \\"customInput\\", - \\"isArray\\": false, - \\"type\\": { - \\"input\\": \\"CustomInput\\" + "echo6": { + "name": "echo6", + "isArray": false, + "type": "String", + "isRequired": true, + "arguments": { + "customInput": { + "name": "customInput", + "isArray": false, + "type": { + "input": "CustomInput" }, - \\"isRequired\\": false + "isRequired": false } } }, - \\"echo8\\": { - \\"name\\": \\"echo8\\", - \\"isArray\\": true, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"isArrayNullable\\": true, - \\"arguments\\": { - \\"msg\\": { - \\"name\\": \\"msg\\", - \\"isArray\\": true, - \\"type\\": \\"Float\\", - \\"isRequired\\": false, - \\"isArrayNullable\\": true - }, - \\"msg2\\": { - \\"name\\": \\"msg2\\", - \\"isArray\\": true, - \\"type\\": \\"Int\\", - \\"isRequired\\": true, - \\"isArrayNullable\\": true - }, - \\"enumType\\": { - \\"name\\": \\"enumType\\", - \\"isArray\\": false, - \\"type\\": { - \\"enum\\": \\"BillingSource\\" + "echo8": { + "name": "echo8", + "isArray": true, + "type": "String", + "isRequired": false, + "isArrayNullable": true, + "arguments": { + "msg": { + "name": "msg", + "isArray": true, + "type": "Float", + "isRequired": false, + "isArrayNullable": true + }, + "msg2": { + "name": "msg2", + "isArray": true, + "type": "Int", + "isRequired": true, + "isArrayNullable": true + }, + "enumType": { + "name": "enumType", + "isArray": false, + "type": { + "enum": "BillingSource" }, - \\"isRequired\\": false + "isRequired": false }, - \\"enumList\\": { - \\"name\\": \\"enumList\\", - \\"isArray\\": true, - \\"type\\": { - \\"enum\\": \\"BillingSource\\" + "enumList": { + "name": "enumList", + "isArray": true, + "type": { + "enum": "BillingSource" }, - \\"isRequired\\": false, - \\"isArrayNullable\\": true - }, - \\"inputType\\": { - \\"name\\": \\"inputType\\", - \\"isArray\\": true, - \\"type\\": { - \\"input\\": \\"CustomInput\\" + "isRequired": false, + "isArrayNullable": true + }, + "inputType": { + "name": "inputType", + "isArray": true, + "type": { + "input": "CustomInput" }, - \\"isRequired\\": false, - \\"isArrayNullable\\": true + "isRequired": false, + "isArrayNullable": true } } }, - \\"echo9\\": { - \\"name\\": \\"echo9\\", - \\"isArray\\": true, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"isArrayNullable\\": false, - \\"arguments\\": { - \\"msg\\": { - \\"name\\": \\"msg\\", - \\"isArray\\": true, - \\"type\\": \\"Float\\", - \\"isRequired\\": false, - \\"isArrayNullable\\": false - }, - \\"msg2\\": { - \\"name\\": \\"msg2\\", - \\"isArray\\": true, - \\"type\\": \\"Int\\", - \\"isRequired\\": true, - \\"isArrayNullable\\": false - }, - \\"enumType\\": { - \\"name\\": \\"enumType\\", - \\"isArray\\": false, - \\"type\\": { - \\"enum\\": \\"BillingSource\\" + "echo9": { + "name": "echo9", + "isArray": true, + "type": "String", + "isRequired": true, + "isArrayNullable": false, + "arguments": { + "msg": { + "name": "msg", + "isArray": true, + "type": "Float", + "isRequired": false, + "isArrayNullable": false + }, + "msg2": { + "name": "msg2", + "isArray": true, + "type": "Int", + "isRequired": true, + "isArrayNullable": false + }, + "enumType": { + "name": "enumType", + "isArray": false, + "type": { + "enum": "BillingSource" }, - \\"isRequired\\": true + "isRequired": true }, - \\"enumList\\": { - \\"name\\": \\"enumList\\", - \\"isArray\\": true, - \\"type\\": { - \\"enum\\": \\"BillingSource\\" + "enumList": { + "name": "enumList", + "isArray": true, + "type": { + "enum": "BillingSource" }, - \\"isRequired\\": true, - \\"isArrayNullable\\": false - }, - \\"inputType\\": { - \\"name\\": \\"inputType\\", - \\"isArray\\": true, - \\"type\\": { - \\"input\\": \\"CustomInput\\" + "isRequired": true, + "isArrayNullable": false + }, + "inputType": { + "name": "inputType", + "isArray": true, + "type": { + "input": "CustomInput" }, - \\"isRequired\\": true, - \\"isArrayNullable\\": false + "isRequired": true, + "isArrayNullable": false } } } }, - \\"mutations\\": { - \\"mutate\\": { - \\"name\\": \\"mutate\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Todo\\" + "mutations": { + "mutate": { + "name": "mutate", + "isArray": false, + "type": { + "model": "Todo" }, - \\"isRequired\\": false, - \\"arguments\\": { - \\"msg\\": { - \\"name\\": \\"msg\\", - \\"isArray\\": true, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"isArrayNullable\\": false + "isRequired": false, + "arguments": { + "msg": { + "name": "msg", + "isArray": true, + "type": "String", + "isRequired": true, + "isArrayNullable": false } } } }, - \\"subscriptions\\": { - \\"onMutate\\": { - \\"name\\": \\"onMutate\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Todo\\" + "subscriptions": { + "onMutate": { + "name": "onMutate", + "isArray": true, + "type": { + "model": "Todo" }, - \\"isRequired\\": true, - \\"isArrayNullable\\": true, - \\"arguments\\": { - \\"msg\\": { - \\"name\\": \\"msg\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false + "isRequired": true, + "isArrayNullable": true, + "arguments": { + "msg": { + "name": "msg", + "isArray": false, + "type": "String", + "isRequired": false } } } }, - \\"inputs\\": { - \\"CustomInput\\": { - \\"name\\": \\"CustomInput\\", - \\"attributes\\": { - \\"customField1\\": { - \\"name\\": \\"customField1\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true - }, - \\"customField2\\": { - \\"name\\": \\"customField2\\", - \\"isArray\\": false, - \\"type\\": \\"Int\\", - \\"isRequired\\": false - }, - \\"customField3\\": { - \\"name\\": \\"customField3\\", - \\"isArray\\": false, - \\"type\\": { - \\"input\\": \\"NestedInput\\" + "inputs": { + "CustomInput": { + "name": "CustomInput", + "attributes": { + "customField1": { + "name": "customField1", + "isArray": false, + "type": "String", + "isRequired": true + }, + "customField2": { + "name": "customField2", + "isArray": false, + "type": "Int", + "isRequired": false + }, + "customField3": { + "name": "customField3", + "isArray": false, + "type": { + "input": "NestedInput" }, - \\"isRequired\\": true + "isRequired": true } } }, - \\"NestedInput\\": { - \\"name\\": \\"NestedInput\\", - \\"attributes\\": { - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true + "NestedInput": { + "name": "NestedInput", + "attributes": { + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true } } } @@ -2345,66 +2345,66 @@ exports[`Custom queries/mutations/subscriptions & input type tests should genera exports[`Generation Route Introspection Visitor Metadata snapshot should generate correct model intropection file validated by JSON schema 1`] = ` "{ - \\"version\\": 1, - \\"models\\": {}, - \\"enums\\": {}, - \\"nonModels\\": { - \\"Recipe\\": { - \\"name\\": \\"Recipe\\", - \\"fields\\": { - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"ingredients\\": { - \\"name\\": \\"ingredients\\", - \\"isArray\\": true, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true - }, - \\"instructions\\": { - \\"name\\": \\"instructions\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "version": 1, + "models": {}, + "enums": {}, + "nonModels": { + "Recipe": { + "name": "Recipe", + "fields": { + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "ingredients": { + "name": "ingredients", + "isArray": true, + "type": "String", + "isRequired": false, + "attributes": [], + "isArrayNullable": true + }, + "instructions": { + "name": "instructions", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] } } } }, - \\"generations\\": { - \\"generateRecipe\\": { - \\"name\\": \\"generateRecipe\\", - \\"isArray\\": false, - \\"type\\": { - \\"nonModel\\": \\"Recipe\\" + "generations": { + "generateRecipe": { + "name": "generateRecipe", + "isArray": false, + "type": { + "nonModel": "Recipe" }, - \\"isRequired\\": false, - \\"arguments\\": { - \\"description\\": { - \\"name\\": \\"description\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false + "isRequired": false, + "arguments": { + "description": { + "name": "description", + "isArray": false, + "type": "String", + "isRequired": false } } }, - \\"summarize\\": { - \\"name\\": \\"summarize\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"arguments\\": { - \\"text\\": { - \\"name\\": \\"text\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false + "summarize": { + "name": "summarize", + "isArray": false, + "type": "String", + "isRequired": false, + "arguments": { + "text": { + "name": "text", + "isArray": false, + "type": "String", + "isRequired": false } } } @@ -2414,603 +2414,603 @@ exports[`Generation Route Introspection Visitor Metadata snapshot should generat exports[`Generation Route Introspection Visitor V1 Transformer uni-directional One:One connection with optional field and datastore is disabled 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"User\\": { - \\"name\\": \\"User\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "version": 1, + "models": { + "User": { + "name": "User", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Users\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Users", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Session\\": { - \\"name\\": \\"Session\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"sessionUserId\\": { - \\"name\\": \\"sessionUserId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"user\\": { - \\"name\\": \\"user\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"User\\" + "Session": { + "name": "Session", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "sessionUserId": { + "name": "sessionUserId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "user": { + "name": "user", + "isArray": false, + "type": { + "model": "User" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [], - \\"targetNames\\": [] + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [], + "targetNames": [] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Sessions\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Sessions", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`Generation Route Introspection Visitor V1 Transformer uni-directional One:One connection with optional field and datastore is enabled 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"User\\": { - \\"name\\": \\"User\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "version": 1, + "models": { + "User": { + "name": "User", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Users\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Users", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Session\\": { - \\"name\\": \\"Session\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"sessionUserId\\": { - \\"name\\": \\"sessionUserId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"user\\": { - \\"name\\": \\"user\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"User\\" + "Session": { + "name": "Session", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "sessionUserId": { + "name": "sessionUserId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "user": { + "name": "user", + "isArray": false, + "type": { + "model": "User" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [], - \\"targetNames\\": [] + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [], + "targetNames": [] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Sessions\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Sessions", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`Generation Route Introspection Visitor V1 Transformer uni-directional One:One connection with required field and datastore is disabled 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"User\\": { - \\"name\\": \\"User\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "version": 1, + "models": { + "User": { + "name": "User", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Users\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Users", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Session\\": { - \\"name\\": \\"Session\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"sessionUserId\\": { - \\"name\\": \\"sessionUserId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"user\\": { - \\"name\\": \\"user\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"User\\" + "Session": { + "name": "Session", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "sessionUserId": { + "name": "sessionUserId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "user": { + "name": "user", + "isArray": false, + "type": { + "model": "User" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [], - \\"targetNames\\": [] + "isRequired": true, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [], + "targetNames": [] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Sessions\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Sessions", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`Model Introspection Visitor Metadata snapshot should generate correct model intropection file validated by JSON schema 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"SimpleModel\\": { - \\"name\\": \\"SimpleModel\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"bar\\": { - \\"name\\": \\"bar\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"children\\": { - \\"name\\": \\"children\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Child\\" + "version": 1, + "models": { + "SimpleModel": { + "name": "SimpleModel", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "bar": { + "name": "bar", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "children": { + "name": "children", + "isArray": true, + "type": { + "model": "Child" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"simpleModelChildrenId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "simpleModelChildrenId" ] } }, - \\"ssn\\": { - \\"name\\": \\"ssn\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"SSN\\" + "ssn": { + "name": "ssn", + "isArray": false, + "type": { + "model": "SSN" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"user\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "user" ], - \\"targetNames\\": [ - \\"simpleModelSsnId\\" + "targetNames": [ + "simpleModelSsnId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"simpleModelSsnId\\": { - \\"name\\": \\"simpleModelSsnId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "simpleModelSsnId": { + "name": "simpleModelSsnId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SimpleModels\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SimpleModels", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Child\\": { - \\"name\\": \\"Child\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"parent\\": { - \\"name\\": \\"parent\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"SimpleModel\\" + "Child": { + "name": "Child", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "parent": { + "name": "parent", + "isArray": false, + "type": { + "model": "SimpleModel" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"simpleModelChildrenId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "simpleModelChildrenId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Children\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Children", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"SSN\\": { - \\"name\\": \\"SSN\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"user\\": { - \\"name\\": \\"user\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"SimpleModel\\" + "SSN": { + "name": "SSN", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "user": { + "name": "user", + "isArray": false, + "type": { + "model": "SimpleModel" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"sSNUserId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "sSNUserId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SSNS\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SSNS", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": { - \\"SimpleEnum\\": { - \\"name\\": \\"SimpleEnum\\", - \\"values\\": [ - \\"enumVal1\\", - \\"enumVal2\\" + "enums": { + "SimpleEnum": { + "name": "SimpleEnum", + "values": [ + "enumVal1", + "enumVal2" ] }, - \\"camelCase\\": { - \\"name\\": \\"camelCase\\", - \\"values\\": [ - \\"bactrian\\", - \\"dromedary\\" + "camelCase": { + "name": "camelCase", + "values": [ + "bactrian", + "dromedary" ] } }, - \\"nonModels\\": { - \\"SimpleNonModelType\\": { - \\"name\\": \\"SimpleNonModelType\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"names\\": { - \\"name\\": \\"names\\", - \\"isArray\\": true, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true + "nonModels": { + "SimpleNonModelType": { + "name": "SimpleNonModelType", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "names": { + "name": "names", + "isArray": true, + "type": "String", + "isRequired": false, + "attributes": [], + "isArrayNullable": true } } } }, - \\"inputs\\": { - \\"SimpleInput\\": { - \\"name\\": \\"SimpleInput\\", - \\"attributes\\": { - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false + "inputs": { + "SimpleInput": { + "name": "SimpleInput", + "attributes": { + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": false } } } @@ -3020,379 +3020,379 @@ exports[`Model Introspection Visitor Metadata snapshot should generate correct m exports[`Primary Key Info tests should generate correct primary key info for model with/without custom primary key 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Todo1\\": { - \\"name\\": \\"Todo1\\", - \\"fields\\": { - \\"todoId\\": { - \\"name\\": \\"todoId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "version": 1, + "models": { + "Todo1": { + "name": "Todo1", + "fields": { + "todoId": { + "name": "todoId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Todo1s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Todo1s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"todoId\\" + "type": "key", + "properties": { + "fields": [ + "todoId" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"todoId\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "todoId", + "sortKeyFieldNames": [] } }, - \\"Todo2\\": { - \\"name\\": \\"Todo2\\", - \\"fields\\": { - \\"todoId\\": { - \\"name\\": \\"todoId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Todo2": { + "name": "Todo2", + "fields": { + "todoId": { + "name": "todoId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Todo2s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Todo2s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"todoId\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "todoId", + "title" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"todoId\\", - \\"sortKeyFieldNames\\": [ - \\"title\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "todoId", + "sortKeyFieldNames": [ + "title" ] } }, - \\"Todo3\\": { - \\"name\\": \\"Todo3\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Todo3": { + "name": "Todo3", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Todo3s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Todo3s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\", - \\"title\\" + "type": "key", + "properties": { + "fields": [ + "id", + "title" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [ - \\"title\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [ + "title" ] } }, - \\"Todo4\\": { - \\"name\\": \\"Todo4\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Todo4": { + "name": "Todo4", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Todo4s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Todo4s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Todo5\\": { - \\"name\\": \\"Todo5\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Todo5": { + "name": "Todo5", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Todo5s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Todo5s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\" + "type": "key", + "properties": { + "fields": [ + "id" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Todo6\\": { - \\"name\\": \\"Todo6\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "Todo6": { + "name": "Todo6", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Todo6s\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Todo6s", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`Primary Key Info tests should retain order of targetNames and primaryKeyInfo.sortKeyFieldNames 1`] = ` -Object { - "enums": Object {}, - "models": Object { - "Enthusiast": Object { - "attributes": Array [ - Object { - "properties": Object {}, +{ + "enums": {}, + "models": { + "Enthusiast": { + "attributes": [ + { + "properties": {}, "type": "model", }, - Object { - "properties": Object { - "fields": Array [ + { + "properties": { + "fields": [ "id", ], }, "type": "key", }, ], - "fields": Object { - "createdAt": Object { - "attributes": Array [], + "fields": { + "createdAt": { + "attributes": [], "isArray": false, "isReadOnly": true, "isRequired": false, "name": "createdAt", "type": "AWSDateTime", }, - "id": Object { - "attributes": Array [], + "id": { + "attributes": [], "isArray": false, "isRequired": true, "name": "id", "type": "ID", }, - "likes": Object { - "association": Object { - "associatedWith": Array [ + "likes": { + "association": { + "associatedWith": [ "enthusiast", ], "connectionType": "HAS_MANY", }, - "attributes": Array [], + "attributes": [], "isArray": true, "isArrayNullable": true, "isRequired": false, "name": "likes", - "type": Object { + "type": { "model": "EnthusiastLikes", }, }, - "name": Object { - "attributes": Array [], + "name": { + "attributes": [], "isArray": false, "isRequired": true, "name": "name", "type": "String", }, - "updatedAt": Object { - "attributes": Array [], + "updatedAt": { + "attributes": [], "isArray": false, "isReadOnly": true, "isRequired": false, @@ -3402,31 +3402,31 @@ Object { }, "name": "Enthusiast", "pluralName": "Enthusiasts", - "primaryKeyInfo": Object { + "primaryKeyInfo": { "isCustomPrimaryKey": false, "primaryKeyFieldName": "id", - "sortKeyFieldNames": Array [], + "sortKeyFieldNames": [], }, "syncable": true, }, - "EnthusiastLikes": Object { - "attributes": Array [ - Object { - "properties": Object {}, + "EnthusiastLikes": { + "attributes": [ + { + "properties": {}, "type": "model", }, - Object { - "properties": Object { - "fields": Array [ + { + "properties": { + "fields": [ "enthusiastId", ], "name": "byEnthusiast", }, "type": "key", }, - Object { - "properties": Object { - "fields": Array [ + { + "properties": { + "fields": [ "likeName", "likesortKeyFieldOne", "likesortKeyFieldTwo", @@ -3437,92 +3437,92 @@ Object { "type": "key", }, ], - "fields": Object { - "createdAt": Object { - "attributes": Array [], + "fields": { + "createdAt": { + "attributes": [], "isArray": false, "isReadOnly": true, "isRequired": false, "name": "createdAt", "type": "AWSDateTime", }, - "enthusiast": Object { - "association": Object { + "enthusiast": { + "association": { "connectionType": "BELONGS_TO", - "targetNames": Array [ + "targetNames": [ "enthusiastId", ], }, - "attributes": Array [], + "attributes": [], "isArray": false, "isRequired": true, "name": "enthusiast", - "type": Object { + "type": { "model": "Enthusiast", }, }, - "enthusiastId": Object { - "attributes": Array [], + "enthusiastId": { + "attributes": [], "isArray": false, "isRequired": false, "name": "enthusiastId", "type": "ID", }, - "id": Object { - "attributes": Array [], + "id": { + "attributes": [], "isArray": false, "isRequired": true, "name": "id", "type": "ID", }, - "like": Object { - "association": Object { + "like": { + "association": { "connectionType": "BELONGS_TO", - "targetNames": Array [ + "targetNames": [ "likeName", "likesortKeyFieldOne", "likesortKeyFieldTwo", "likesortKeyFieldThree", ], }, - "attributes": Array [], + "attributes": [], "isArray": false, "isRequired": true, "name": "like", - "type": Object { + "type": { "model": "Like", }, }, - "likeName": Object { - "attributes": Array [], + "likeName": { + "attributes": [], "isArray": false, "isRequired": false, "name": "likeName", "type": "ID", }, - "likesortKeyFieldOne": Object { - "attributes": Array [], + "likesortKeyFieldOne": { + "attributes": [], "isArray": false, "isRequired": false, "name": "likesortKeyFieldOne", "type": "String", }, - "likesortKeyFieldThree": Object { - "attributes": Array [], + "likesortKeyFieldThree": { + "attributes": [], "isArray": false, "isRequired": false, "name": "likesortKeyFieldThree", "type": "String", }, - "likesortKeyFieldTwo": Object { - "attributes": Array [], + "likesortKeyFieldTwo": { + "attributes": [], "isArray": false, "isRequired": false, "name": "likesortKeyFieldTwo", "type": "String", }, - "updatedAt": Object { - "attributes": Array [], + "updatedAt": { + "attributes": [], "isArray": false, "isReadOnly": true, "isRequired": false, @@ -3532,22 +3532,22 @@ Object { }, "name": "EnthusiastLikes", "pluralName": "EnthusiastLikes", - "primaryKeyInfo": Object { + "primaryKeyInfo": { "isCustomPrimaryKey": false, "primaryKeyFieldName": "id", - "sortKeyFieldNames": Array [], + "sortKeyFieldNames": [], }, "syncable": true, }, - "Like": Object { - "attributes": Array [ - Object { - "properties": Object {}, + "Like": { + "attributes": [ + { + "properties": {}, "type": "model", }, - Object { - "properties": Object { - "fields": Array [ + { + "properties": { + "fields": [ "name", "sortKeyFieldOne", "sortKeyFieldTwo", @@ -3557,69 +3557,69 @@ Object { "type": "key", }, ], - "fields": Object { - "createdAt": Object { - "attributes": Array [], + "fields": { + "createdAt": { + "attributes": [], "isArray": false, "isReadOnly": true, "isRequired": false, "name": "createdAt", "type": "AWSDateTime", }, - "enthusiasts": Object { - "association": Object { - "associatedWith": Array [ + "enthusiasts": { + "association": { + "associatedWith": [ "like", ], "connectionType": "HAS_MANY", }, - "attributes": Array [], + "attributes": [], "isArray": true, "isArrayNullable": true, "isRequired": false, "name": "enthusiasts", - "type": Object { + "type": { "model": "EnthusiastLikes", }, }, - "name": Object { - "attributes": Array [], + "name": { + "attributes": [], "isArray": false, "isRequired": true, "name": "name", "type": "String", }, - "sortKeyFieldOne": Object { - "attributes": Array [], + "sortKeyFieldOne": { + "attributes": [], "isArray": false, "isRequired": true, "name": "sortKeyFieldOne", "type": "String", }, - "sortKeyFieldThree": Object { - "attributes": Array [], + "sortKeyFieldThree": { + "attributes": [], "isArray": false, "isRequired": true, "name": "sortKeyFieldThree", "type": "String", }, - "sortKeyFieldTwo": Object { - "attributes": Array [], + "sortKeyFieldTwo": { + "attributes": [], "isArray": false, "isRequired": true, "name": "sortKeyFieldTwo", "type": "String", }, - "updatedAt": Object { - "attributes": Array [], + "updatedAt": { + "attributes": [], "isArray": false, "isReadOnly": true, "isRequired": false, "name": "updatedAt", "type": "AWSDateTime", }, - "value": Object { - "attributes": Array [], + "value": { + "attributes": [], "isArray": false, "isRequired": true, "name": "value", @@ -3628,10 +3628,10 @@ Object { }, "name": "Like", "pluralName": "Likes", - "primaryKeyInfo": Object { + "primaryKeyInfo": { "isCustomPrimaryKey": true, "primaryKeyFieldName": "name", - "sortKeyFieldNames": Array [ + "sortKeyFieldNames": [ "sortKeyFieldOne", "sortKeyFieldTwo", "sortKeyFieldThree", @@ -3640,2275 +3640,2275 @@ Object { "syncable": true, }, }, - "nonModels": Object {}, + "nonModels": {}, "version": 1, } `; exports[`Primary key info within a belongsTo model tests should generate correct primary key info for model when the primary key field is part of belongsTo connection field and custom PK is disabled 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"postId\\": { - \\"name\\": \\"postId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"node\\": { - \\"name\\": \\"node\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"PostNode\\" + "version": 1, + "models": { + "Post": { + "name": "Post", + "fields": { + "postId": { + "name": "postId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "node": { + "name": "node", + "isArray": false, + "type": { + "model": "PostNode" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postId\\" + "isRequired": true, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postId" ] } }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"postId\\" + "type": "key", + "properties": { + "fields": [ + "postId" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"postId\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "postId", + "sortKeyFieldNames": [] } }, - \\"PostNode\\": { - \\"name\\": \\"PostNode\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "PostNode": { + "name": "PostNode", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"node\\" + "isRequired": true, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "node" ], - \\"targetNames\\": [ - \\"postNodePostId\\" + "targetNames": [ + "postNodePostId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"postNodePostId\\": { - \\"name\\": \\"postNodePostId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "postNodePostId": { + "name": "postNodePostId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"PostNodes\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "PostNodes", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom fields sets the association for fields for belongsTo with other side hasMany 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"PrimaryLegacy\\": { - \\"name\\": \\"PrimaryLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"related\\": { - \\"name\\": \\"related\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"RelatedLegacy\\" + "version": 1, + "models": { + "PrimaryLegacy": { + "name": "PrimaryLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "related": { + "name": "related", + "isArray": true, + "type": { + "model": "RelatedLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"primaryLegacyRelatedId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "primaryLegacyRelatedId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"PrimaryLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "PrimaryLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"RelatedLegacy\\": { - \\"name\\": \\"RelatedLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"PrimaryLegacy\\" + "RelatedLegacy": { + "name": "RelatedLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "PrimaryLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"primaryLegacyRelatedId\\": { - \\"name\\": \\"primaryLegacyRelatedId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "primaryLegacyRelatedId": { + "name": "primaryLegacyRelatedId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"RelatedLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "RelatedLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom fields sets the association for fields for belongsTo with other side hasOne 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"PrimaryLegacy\\": { - \\"name\\": \\"PrimaryLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"related\\": { - \\"name\\": \\"related\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"RelatedLegacy\\" + "version": 1, + "models": { + "PrimaryLegacy": { + "name": "PrimaryLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "related": { + "name": "related", + "isArray": false, + "type": { + "model": "RelatedLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"primary\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "primary" ], - \\"targetNames\\": [ - \\"primaryLegacyRelatedId\\" + "targetNames": [ + "primaryLegacyRelatedId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"primaryLegacyRelatedId\\": { - \\"name\\": \\"primaryLegacyRelatedId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "primaryLegacyRelatedId": { + "name": "primaryLegacyRelatedId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"PrimaryLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "PrimaryLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"RelatedLegacy\\": { - \\"name\\": \\"RelatedLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"PrimaryLegacy\\" + "RelatedLegacy": { + "name": "RelatedLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "PrimaryLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"RelatedLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "RelatedLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom fields sets the association for fields for hasMany 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"PrimaryLegacy\\": { - \\"name\\": \\"PrimaryLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"relatedId\\": { - \\"name\\": \\"relatedId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"related\\": { - \\"name\\": \\"related\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"RelatedLegacy\\" + "version": 1, + "models": { + "PrimaryLegacy": { + "name": "PrimaryLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "relatedId": { + "name": "relatedId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "related": { + "name": "related", + "isArray": true, + "type": { + "model": "RelatedLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"primary\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "primary" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"PrimaryLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "PrimaryLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"RelatedLegacy\\": { - \\"name\\": \\"RelatedLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"PrimaryLegacy\\" + "RelatedLegacy": { + "name": "RelatedLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "PrimaryLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryLegacyRelatedId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryLegacyRelatedId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"RelatedLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "RelatedLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom fields sets the association for fields for hasOne 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"PrimaryLegacy\\": { - \\"name\\": \\"PrimaryLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"relatedId\\": { - \\"name\\": \\"relatedId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"related\\": { - \\"name\\": \\"related\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"RelatedLegacy\\" + "version": 1, + "models": { + "PrimaryLegacy": { + "name": "PrimaryLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "relatedId": { + "name": "relatedId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "related": { + "name": "related", + "isArray": false, + "type": { + "model": "RelatedLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"primary\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "primary" ], - \\"targetNames\\": [ - \\"relatedId\\" + "targetNames": [ + "relatedId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"PrimaryLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "PrimaryLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"RelatedLegacy\\": { - \\"name\\": \\"RelatedLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"PrimaryLegacy\\" + "RelatedLegacy": { + "name": "RelatedLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "PrimaryLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"relatedLegacyPrimaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "relatedLegacyPrimaryId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"RelatedLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "RelatedLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom fields sets the association for fields for hasOne and belongsTo 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"PrimaryLegacy\\": { - \\"name\\": \\"PrimaryLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"relatedId\\": { - \\"name\\": \\"relatedId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"related\\": { - \\"name\\": \\"related\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"RelatedLegacy\\" + "version": 1, + "models": { + "PrimaryLegacy": { + "name": "PrimaryLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "relatedId": { + "name": "relatedId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "related": { + "name": "related", + "isArray": false, + "type": { + "model": "RelatedLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"primary\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "primary" ], - \\"targetNames\\": [ - \\"relatedId\\" + "targetNames": [ + "relatedId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"PrimaryLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "PrimaryLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"RelatedLegacy\\": { - \\"name\\": \\"RelatedLegacy\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"PrimaryLegacy\\" + "RelatedLegacy": { + "name": "RelatedLegacy", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "PrimaryLegacy" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"RelatedLegacies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "RelatedLegacies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom references double linked references 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Foo\\": { - \\"name\\": \\"Foo\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"bar1\\": { - \\"name\\": \\"bar1\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Bar\\" + "version": 1, + "models": { + "Foo": { + "name": "Foo", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "bar1": { + "name": "bar1", + "isArray": false, + "type": { + "model": "Bar" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"bar1Id\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "bar1Id" ], - \\"targetNames\\": [] + "targetNames": [] } }, - \\"bar2\\": { - \\"name\\": \\"bar2\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Bar\\" + "bar2": { + "name": "bar2", + "isArray": false, + "type": { + "model": "Bar" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"bar2Id\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "bar2Id" ], - \\"targetNames\\": [] + "targetNames": [] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Foos\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Foos", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Bar\\": { - \\"name\\": \\"Bar\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"bar1Id\\": { - \\"name\\": \\"bar1Id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"bar2Id\\": { - \\"name\\": \\"bar2Id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"foo1\\": { - \\"name\\": \\"foo1\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Foo\\" + "Bar": { + "name": "Bar", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "bar1Id": { + "name": "bar1Id", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "bar2Id": { + "name": "bar2Id", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] + }, + "foo1": { + "name": "foo1", + "isArray": false, + "type": { + "model": "Foo" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"bar1Id\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "bar1Id" ] } }, - \\"foo2\\": { - \\"name\\": \\"foo2\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Foo\\" + "foo2": { + "name": "foo2", + "isArray": false, + "type": { + "model": "Foo" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"bar2Id\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "bar2Id" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Bars\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Bars", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom references hasMany with sortKeyFields on primary key 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Primary\\": { - \\"name\\": \\"Primary\\", - \\"fields\\": { - \\"tenantId\\": { - \\"name\\": \\"tenantId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"instanceId\\": { - \\"name\\": \\"instanceId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"recordId\\": { - \\"name\\": \\"recordId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"related\\": { - \\"name\\": \\"related\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Related\\" + "version": 1, + "models": { + "Primary": { + "name": "Primary", + "fields": { + "tenantId": { + "name": "tenantId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "instanceId": { + "name": "instanceId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "recordId": { + "name": "recordId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "related": { + "name": "related", + "isArray": true, + "type": { + "model": "Related" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"primaryTenantId\\", - \\"primaryInstanceId\\", - \\"primaryRecordId\\" + "isRequired": true, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "primaryTenantId", + "primaryInstanceId", + "primaryRecordId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Primaries\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Primaries", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"tenantId\\", - \\"instanceId\\", - \\"recordId\\" + "type": "key", + "properties": { + "fields": [ + "tenantId", + "instanceId", + "recordId" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"tenantId\\", - \\"sortKeyFieldNames\\": [ - \\"instanceId\\", - \\"recordId\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "tenantId", + "sortKeyFieldNames": [ + "instanceId", + "recordId" ] } }, - \\"Related\\": { - \\"name\\": \\"Related\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"primaryTenantId\\": { - \\"name\\": \\"primaryTenantId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primaryInstanceId\\": { - \\"name\\": \\"primaryInstanceId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primaryRecordId\\": { - \\"name\\": \\"primaryRecordId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Primary\\" + "Related": { + "name": "Related", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "primaryTenantId": { + "name": "primaryTenantId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primaryInstanceId": { + "name": "primaryInstanceId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primaryRecordId": { + "name": "primaryRecordId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "Primary" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryTenantId\\", - \\"primaryInstanceId\\", - \\"primaryRecordId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryTenantId", + "primaryInstanceId", + "primaryRecordId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Relateds\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Relateds", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom references hasOne with sortKeyFields on primary key 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Primary\\": { - \\"name\\": \\"Primary\\", - \\"fields\\": { - \\"tenantId\\": { - \\"name\\": \\"tenantId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"instanceId\\": { - \\"name\\": \\"instanceId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"recordId\\": { - \\"name\\": \\"recordId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"related\\": { - \\"name\\": \\"related\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Related\\" + "version": 1, + "models": { + "Primary": { + "name": "Primary", + "fields": { + "tenantId": { + "name": "tenantId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "instanceId": { + "name": "instanceId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "recordId": { + "name": "recordId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "related": { + "name": "related", + "isArray": false, + "type": { + "model": "Related" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"primaryTenantId\\", - \\"primaryInstanceId\\", - \\"primaryRecordId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "primaryTenantId", + "primaryInstanceId", + "primaryRecordId" ], - \\"targetNames\\": [] + "targetNames": [] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Primaries\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Primaries", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"tenantId\\", - \\"instanceId\\", - \\"recordId\\" + "type": "key", + "properties": { + "fields": [ + "tenantId", + "instanceId", + "recordId" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"tenantId\\", - \\"sortKeyFieldNames\\": [ - \\"instanceId\\", - \\"recordId\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "tenantId", + "sortKeyFieldNames": [ + "instanceId", + "recordId" ] } }, - \\"Related\\": { - \\"name\\": \\"Related\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"primaryTenantId\\": { - \\"name\\": \\"primaryTenantId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primaryInstanceId\\": { - \\"name\\": \\"primaryInstanceId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primaryRecordId\\": { - \\"name\\": \\"primaryRecordId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Primary\\" + "Related": { + "name": "Related", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "primaryTenantId": { + "name": "primaryTenantId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primaryInstanceId": { + "name": "primaryInstanceId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primaryRecordId": { + "name": "primaryRecordId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "Primary" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryTenantId\\", - \\"primaryInstanceId\\", - \\"primaryRecordId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryTenantId", + "primaryInstanceId", + "primaryRecordId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Relateds\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Relateds", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom references sets the association to the references field for hasMany/belongsTo 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"SqlPrimary\\": { - \\"name\\": \\"SqlPrimary\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"Int\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"related\\": { - \\"name\\": \\"related\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"SqlRelated\\" + "version": 1, + "models": { + "SqlPrimary": { + "name": "SqlPrimary", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "Int", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "related": { + "name": "related", + "isArray": true, + "type": { + "model": "SqlRelated" }, - \\"isRequired\\": true, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"primaryId\\" + "isRequired": true, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "primaryId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SqlPrimaries\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SqlPrimaries", + "attributes": [ { - \\"type\\": \\"refersTo\\", - \\"properties\\": { - \\"name\\": \\"sql_primary\\" + "type": "refersTo", + "properties": { + "name": "sql_primary" } }, { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\" + "type": "key", + "properties": { + "fields": [ + "id" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"SqlRelated\\": { - \\"name\\": \\"SqlRelated\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"Int\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"primaryId\\": { - \\"name\\": \\"primaryId\\", - \\"isArray\\": false, - \\"type\\": \\"Int\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"SqlPrimary\\" + "SqlRelated": { + "name": "SqlRelated", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "Int", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "primaryId": { + "name": "primaryId", + "isArray": false, + "type": "Int", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "SqlPrimary" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SqlRelateds\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SqlRelateds", + "attributes": [ { - \\"type\\": \\"refersTo\\", - \\"properties\\": { - \\"name\\": \\"sql_related\\" + "type": "refersTo", + "properties": { + "name": "sql_related" } }, { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\" + "type": "key", + "properties": { + "fields": [ + "id" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"primary_id\\", - \\"fields\\": [ - \\"primaryId\\" + "type": "key", + "properties": { + "name": "primary_id", + "fields": [ + "primaryId" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom references sets the association to the references field for hasOne and hasMany 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Primary\\": { - \\"name\\": \\"Primary\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"relatedMany\\": { - \\"name\\": \\"relatedMany\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"RelatedMany\\" + "version": 1, + "models": { + "Primary": { + "name": "Primary", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "relatedMany": { + "name": "relatedMany", + "isArray": true, + "type": { + "model": "RelatedMany" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "primaryId" ] } }, - \\"relatedOne\\": { - \\"name\\": \\"relatedOne\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"RelatedOne\\" + "relatedOne": { + "name": "relatedOne", + "isArray": false, + "type": { + "model": "RelatedOne" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "primaryId" ], - \\"targetNames\\": [] + "targetNames": [] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Primaries\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Primaries", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\" + "type": "key", + "properties": { + "fields": [ + "id" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"RelatedMany\\": { - \\"name\\": \\"RelatedMany\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primaryId\\": { - \\"name\\": \\"primaryId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Primary\\" + "RelatedMany": { + "name": "RelatedMany", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primaryId": { + "name": "primaryId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "Primary" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"RelatedManies\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "RelatedManies", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\" + "type": "key", + "properties": { + "fields": [ + "id" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"RelatedOne\\": { - \\"name\\": \\"RelatedOne\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primaryId\\": { - \\"name\\": \\"primaryId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Primary\\" + "RelatedOne": { + "name": "RelatedOne", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primaryId": { + "name": "primaryId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "Primary" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"RelatedOnes\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "RelatedOnes", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\" + "type": "key", + "properties": { + "fields": [ + "id" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`custom references sets the association to the references field for hasOne/belongsTo 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"SqlPrimary\\": { - \\"name\\": \\"SqlPrimary\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"Int\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"related\\": { - \\"name\\": \\"related\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"SqlRelated\\" + "version": 1, + "models": { + "SqlPrimary": { + "name": "SqlPrimary", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "Int", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "related": { + "name": "related", + "isArray": false, + "type": { + "model": "SqlRelated" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": [ + "primaryId" ], - \\"targetNames\\": [] + "targetNames": [] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SqlPrimaries\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SqlPrimaries", + "attributes": [ { - \\"type\\": \\"refersTo\\", - \\"properties\\": { - \\"name\\": \\"sql_primary\\" + "type": "refersTo", + "properties": { + "name": "sql_primary" } }, { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\" + "type": "key", + "properties": { + "fields": [ + "id" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"SqlRelated\\": { - \\"name\\": \\"SqlRelated\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"Int\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"primaryId\\": { - \\"name\\": \\"primaryId\\", - \\"isArray\\": false, - \\"type\\": \\"Int\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"primary\\": { - \\"name\\": \\"primary\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"SqlPrimary\\" + "SqlRelated": { + "name": "SqlRelated", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "Int", + "isRequired": true, + "attributes": [] + }, + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "primaryId": { + "name": "primaryId", + "isArray": false, + "type": "Int", + "isRequired": true, + "attributes": [] + }, + "primary": { + "name": "primary", + "isArray": false, + "type": { + "model": "SqlPrimary" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"primaryId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "primaryId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SqlRelateds\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SqlRelateds", + "attributes": [ { - \\"type\\": \\"refersTo\\", - \\"properties\\": { - \\"name\\": \\"sql_related\\" + "type": "refersTo", + "properties": { + "name": "sql_related" } }, { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"id\\" + "type": "key", + "properties": { + "fields": [ + "id" ] } }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"name\\": \\"primary_id\\", - \\"fields\\": [ - \\"primaryId\\" + "type": "key", + "properties": { + "name": "primary_id", + "fields": [ + "primaryId" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`schemas with pk on a belongsTo fk works for v1 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Post\\" + "version": 1, + "models": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [] + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Blogs\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Blogs", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"blogId\\": { - \\"name\\": \\"blogId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"description\\": { - \\"name\\": \\"description\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"blog\\": { - \\"name\\": \\"blog\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Blog\\" + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "blogId": { + "name": "blogId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "description": { + "name": "description", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "blog": { + "name": "blog", + "isArray": false, + "type": { + "model": "Blog" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [] + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"blogId\\", - \\"title\\", - \\"description\\" + "type": "key", + "properties": { + "fields": [ + "blogId", + "title", + "description" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"blogId\\", - \\"sortKeyFieldNames\\": [ - \\"title\\", - \\"description\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "blogId", + "sortKeyFieldNames": [ + "title", + "description" ] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; exports[`schemas with pk on a belongsTo fk works for v2 1`] = ` "{ - \\"version\\": 1, - \\"models\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] - }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Post\\" + "version": 1, + "models": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] + }, + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"blog\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "blog" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Blogs\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Blogs", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"blogId\\": { - \\"name\\": \\"blogId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"description\\": { - \\"name\\": \\"description\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] - }, - \\"blog\\": { - \\"name\\": \\"blog\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Blog\\" + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "blogId": { + "name": "blogId", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] + }, + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "description": { + "name": "description", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] + }, + "blog": { + "name": "blog", + "isArray": false, + "type": { + "model": "Blog" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"blogId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "blogId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true - }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true + }, + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"key\\", - \\"properties\\": { - \\"fields\\": [ - \\"blogId\\", - \\"title\\", - \\"description\\" + "type": "key", + "properties": { + "fields": [ + "blogId", + "title", + "description" ] } } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": true, - \\"primaryKeyFieldName\\": \\"blogId\\", - \\"sortKeyFieldNames\\": [ - \\"title\\", - \\"description\\" + "primaryKeyInfo": { + "isCustomPrimaryKey": true, + "primaryKeyFieldName": "blogId", + "sortKeyFieldNames": [ + "title", + "description" ] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }" `; diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-swift-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-swift-visitor.test.ts.snap index 85238ef5b..2e103fe0f 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-swift-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-swift-visitor.test.ts.snap @@ -63,11 +63,11 @@ extension Post { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.attributes( - .index(fields: [\\"id\\", \\"title\\"], name: nil), + .index(fields: ["id", "title"], name: nil), .primaryKey(fields: [post.id, post.title]) ) @@ -92,24 +92,24 @@ extension Post: ModelIdentifiable { extension Post.IdentifierProtocol { public static func identifier(id: String, title: String) -> Self { - .make(fields:[(name: \\"id\\", value: id), (name: \\"title\\", value: title)]) + .make(fields:[(name: "id", value: id), (name: "title", value: title)]) } } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var comments: ModelPath { - Comment.Path(name: \\"comments\\", isCollection: true, parent: self) + Comment.Path(name: "comments", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -176,11 +176,11 @@ extension Comment { public static let schema = defineSchema { model in let comment = Comment.keys - model.listPluralName = \\"Comments\\" - model.syncPluralName = \\"Comments\\" + model.listPluralName = "Comments" + model.syncPluralName = "Comments" model.attributes( - .index(fields: [\\"id\\", \\"content\\"], name: nil), + .index(fields: ["id", "content"], name: nil), .primaryKey(fields: [comment.id, comment.content]) ) @@ -206,27 +206,27 @@ extension Comment: ModelIdentifiable { extension Comment.IdentifierProtocol { public static func identifier(id: String, content: String) -> Self { - .make(fields:[(name: \\"id\\", value: id), (name: \\"content\\", value: content)]) + .make(fields:[(name: "id", value: id), (name: "content", value: content)]) } } extension ModelPath where ModelType == Comment { public var id: FieldPath { - string(\\"id\\") + string("id") } public var content: FieldPath { - string(\\"content\\") + string("content") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } public var postCommentsId: FieldPath { - string(\\"postCommentsId\\") + string("postCommentsId") } public var postCommentsTitle: FieldPath { - string(\\"postCommentsTitle\\") + string("postCommentsTitle") } }" `; @@ -287,11 +287,11 @@ extension ModelCompositePk { public static let schema = defineSchema { model in let modelCompositePk = ModelCompositePk.keys - model.listPluralName = \\"ModelCompositePks\\" - model.syncPluralName = \\"ModelCompositePks\\" + model.listPluralName = "ModelCompositePks" + model.syncPluralName = "ModelCompositePks" model.attributes( - .index(fields: [\\"id\\", \\"dob\\"], name: nil), + .index(fields: ["id", "dob"], name: nil), .primaryKey(fields: [modelCompositePk.id, modelCompositePk.dob]) ) @@ -316,24 +316,24 @@ extension ModelCompositePk: ModelIdentifiable { extension ModelCompositePk.IdentifierProtocol { public static func identifier(id: String, dob: Temporal.DateTime) -> Self { - .make(fields:[(name: \\"id\\", value: id), (name: \\"dob\\", value: dob)]) + .make(fields:[(name: "id", value: id), (name: "dob", value: dob)]) } } extension ModelPath where ModelType == ModelCompositePk { public var id: FieldPath { - string(\\"id\\") + string("id") } public var dob: FieldPath { - datetime(\\"dob\\") + datetime("dob") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -388,11 +388,11 @@ extension ModelExplicitCustomPk { public static let schema = defineSchema { model in let modelExplicitCustomPk = ModelExplicitCustomPk.keys - model.listPluralName = \\"ModelExplicitCustomPks\\" - model.syncPluralName = \\"ModelExplicitCustomPks\\" + model.listPluralName = "ModelExplicitCustomPks" + model.syncPluralName = "ModelExplicitCustomPks" model.attributes( - .index(fields: [\\"userId\\"], name: nil), + .index(fields: ["userId"], name: nil), .primaryKey(fields: [modelExplicitCustomPk.userId]) ) @@ -415,21 +415,21 @@ extension ModelExplicitCustomPk: ModelIdentifiable { extension ModelExplicitCustomPk.IdentifierProtocol { public static func identifier(userId: String) -> Self { - .make(fields:[(name: \\"userId\\", value: userId)]) + .make(fields:[(name: "userId", value: userId)]) } } extension ModelPath where ModelType == ModelExplicitCustomPk { public var userId: FieldPath { - string(\\"userId\\") + string("userId") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -484,11 +484,11 @@ extension ModelExplicitDefaultPk { public static let schema = defineSchema { model in let modelExplicitDefaultPk = ModelExplicitDefaultPk.keys - model.listPluralName = \\"ModelExplicitDefaultPks\\" - model.syncPluralName = \\"ModelExplicitDefaultPks\\" + model.listPluralName = "ModelExplicitDefaultPks" + model.syncPluralName = "ModelExplicitDefaultPks" model.attributes( - .index(fields: [\\"id\\"], name: nil), + .index(fields: ["id"], name: nil), .primaryKey(fields: [modelExplicitDefaultPk.id]) ) @@ -510,16 +510,16 @@ extension ModelExplicitDefaultPk: ModelIdentifiable { } extension ModelPath where ModelType == ModelExplicitDefaultPk { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -574,8 +574,8 @@ extension ModelImplicitDefaultPk { public static let schema = defineSchema { model in let modelImplicitDefaultPk = ModelImplicitDefaultPk.keys - model.listPluralName = \\"ModelImplicitDefaultPks\\" - model.syncPluralName = \\"ModelImplicitDefaultPks\\" + model.listPluralName = "ModelImplicitDefaultPks" + model.syncPluralName = "ModelImplicitDefaultPks" model.attributes( .primaryKey(fields: [modelImplicitDefaultPk.id]) @@ -599,16 +599,16 @@ extension ModelImplicitDefaultPk: ModelIdentifiable { } extension ModelPath where ModelType == ModelImplicitDefaultPk { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -709,18 +709,18 @@ extension Project { public static let schema = defineSchema { model in let project = Project.keys - model.listPluralName = \\"Projects\\" - model.syncPluralName = \\"Projects\\" + model.listPluralName = "Projects" + model.syncPluralName = "Projects" model.attributes( - .index(fields: [\\"projectId\\", \\"name\\"], name: nil), + .index(fields: ["projectId", "name"], name: nil), .primaryKey(fields: [project.projectId, project.name]) ) model.fields( .field(project.projectId, is: .required, ofType: .string), .field(project.name, is: .required, ofType: .string), - .hasOne(project.team, is: .optional, ofType: Team.self, associatedWith: Team.keys.project, targetNames: [\\"projectTeamTeamId\\", \\"projectTeamName\\"]), + .hasOne(project.team, is: .optional, ofType: Team.self, associatedWith: Team.keys.project, targetNames: ["projectTeamTeamId", "projectTeamName"]), .field(project.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(project.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(project.projectTeamTeamId, is: .optional, ofType: .string), @@ -740,30 +740,30 @@ extension Project: ModelIdentifiable { extension Project.IdentifierProtocol { public static func identifier(projectId: String, name: String) -> Self { - .make(fields:[(name: \\"projectId\\", value: projectId), (name: \\"name\\", value: name)]) + .make(fields:[(name: "projectId", value: projectId), (name: "name", value: name)]) } } extension ModelPath where ModelType == Project { public var projectId: FieldPath { - string(\\"projectId\\") + string("projectId") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var team: ModelPath { - Team.Path(name: \\"team\\", parent: self) + Team.Path(name: "team", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } public var projectTeamTeamId: FieldPath { - string(\\"projectTeamTeamId\\") + string("projectTeamTeamId") } public var projectTeamName: FieldPath { - string(\\"projectTeamName\\") + string("projectTeamName") } }" `; @@ -848,18 +848,18 @@ extension Team { public static let schema = defineSchema { model in let team = Team.keys - model.listPluralName = \\"Teams\\" - model.syncPluralName = \\"Teams\\" + model.listPluralName = "Teams" + model.syncPluralName = "Teams" model.attributes( - .index(fields: [\\"teamId\\", \\"name\\"], name: nil), + .index(fields: ["teamId", "name"], name: nil), .primaryKey(fields: [team.teamId, team.name]) ) model.fields( .field(team.teamId, is: .required, ofType: .string), .field(team.name, is: .required, ofType: .string), - .belongsTo(team.project, is: .optional, ofType: Project.self, targetNames: [\\"teamProjectProjectId\\", \\"teamProjectName\\"]), + .belongsTo(team.project, is: .optional, ofType: Project.self, targetNames: ["teamProjectProjectId", "teamProjectName"]), .field(team.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(team.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -877,24 +877,24 @@ extension Team: ModelIdentifiable { extension Team.IdentifierProtocol { public static func identifier(teamId: String, name: String) -> Self { - .make(fields:[(name: \\"teamId\\", value: teamId), (name: \\"name\\", value: name)]) + .make(fields:[(name: "teamId", value: teamId), (name: "name", value: name)]) } } extension ModelPath where ModelType == Team { public var teamId: FieldPath { - string(\\"teamId\\") + string("teamId") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var project: ModelPath { - Project.Path(name: \\"project\\", parent: self) + Project.Path(name: "project", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -1007,11 +1007,11 @@ extension NoticeStaff { rule(allow: .public, provider: .iam, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"NoticeStaffs\\" - model.syncPluralName = \\"NoticeStaffs\\" + model.listPluralName = "NoticeStaffs" + model.syncPluralName = "NoticeStaffs" model.attributes( - .index(fields: [\\"noticeId\\", \\"staffId\\"], name: nil), + .index(fields: ["noticeId", "staffId"], name: nil), .primaryKey(fields: [noticeStaff.noticeId, noticeStaff.staffId]) ) @@ -1019,8 +1019,8 @@ extension NoticeStaff { .field(noticeStaff.read_at, is: .optional, ofType: .dateTime), .field(noticeStaff.noticeId, is: .required, ofType: .string), .field(noticeStaff.staffId, is: .required, ofType: .string), - .belongsTo(noticeStaff.notice, is: .optional, ofType: Notice.self, targetNames: [\\"noticeId\\"]), - .belongsTo(noticeStaff.staff, is: .optional, ofType: Staff.self, targetNames: [\\"staffId\\"]), + .belongsTo(noticeStaff.notice, is: .optional, ofType: Notice.self, targetNames: ["noticeId"]), + .belongsTo(noticeStaff.staff, is: .optional, ofType: Staff.self, targetNames: ["staffId"]), .field(noticeStaff.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(noticeStaff.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -1038,30 +1038,30 @@ extension NoticeStaff: ModelIdentifiable { extension NoticeStaff.IdentifierProtocol { public static func identifier(noticeId: String, staffId: String) -> Self { - .make(fields:[(name: \\"noticeId\\", value: noticeId), (name: \\"staffId\\", value: staffId)]) + .make(fields:[(name: "noticeId", value: noticeId), (name: "staffId", value: staffId)]) } } extension ModelPath where ModelType == NoticeStaff { public var read_at: FieldPath { - datetime(\\"read_at\\") + datetime("read_at") } public var noticeId: FieldPath { - string(\\"noticeId\\") + string("noticeId") } public var staffId: FieldPath { - string(\\"staffId\\") + string("staffId") } public var notice: ModelPath { - Notice.Path(name: \\"notice\\", parent: self) + Notice.Path(name: "notice", parent: self) } public var staff: ModelPath { - Staff.Path(name: \\"staff\\", parent: self) + Staff.Path(name: "staff", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -1166,8 +1166,8 @@ extension NoticeStaff { rule(allow: .public, provider: .iam, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"NoticeStaffs\\" - model.syncPluralName = \\"NoticeStaffs\\" + model.listPluralName = "NoticeStaffs" + model.syncPluralName = "NoticeStaffs" model.attributes( .primaryKey(fields: [noticeStaff.id]) @@ -1176,8 +1176,8 @@ extension NoticeStaff { model.fields( .field(noticeStaff.id, is: .required, ofType: .string), .field(noticeStaff.read_at, is: .optional, ofType: .dateTime), - .belongsTo(noticeStaff.notice, is: .optional, ofType: Notice.self, targetNames: [\\"noticeId\\"]), - .belongsTo(noticeStaff.staff, is: .optional, ofType: Staff.self, targetNames: [\\"staffId\\"]), + .belongsTo(noticeStaff.notice, is: .optional, ofType: Notice.self, targetNames: ["noticeId"]), + .belongsTo(noticeStaff.staff, is: .optional, ofType: Staff.self, targetNames: ["staffId"]), .field(noticeStaff.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(noticeStaff.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -1193,22 +1193,22 @@ extension NoticeStaff: ModelIdentifiable { } extension ModelPath where ModelType == NoticeStaff { public var id: FieldPath { - string(\\"id\\") + string("id") } public var read_at: FieldPath { - datetime(\\"read_at\\") + datetime("read_at") } public var notice: ModelPath { - Notice.Path(name: \\"notice\\", parent: self) + Notice.Path(name: "notice", parent: self) } public var staff: ModelPath { - Staff.Path(name: \\"staff\\", parent: self) + Staff.Path(name: "staff", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -1305,8 +1305,8 @@ extension ListContainer { public static let schema = defineSchema { model in let listContainer = ListContainer.keys - model.listPluralName = \\"ListContainers\\" - model.syncPluralName = \\"ListContainers\\" + model.listPluralName = "ListContainers" + model.syncPluralName = "ListContainers" model.fields( .id(), @@ -1328,31 +1328,31 @@ extension ListContainer { } extension ModelPath where ModelType == ListContainer { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var list: FieldPath { - int(\\"list\\") + int("list") } public var requiredList: FieldPath { - string(\\"requiredList\\") + string("requiredList") } public var listOfRequired: FieldPath { - bool(\\"listOfRequired\\") + bool("listOfRequired") } public var requiredListOfRequiredDates: FieldPath { - date(\\"requiredListOfRequiredDates\\") + date("requiredListOfRequiredDates") } public var listOfRequiredFloats: FieldPath { - double(\\"listOfRequiredFloats\\") + double("listOfRequiredFloats") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -1445,8 +1445,8 @@ extension Todo { public static let schema = defineSchema { model in let todo = Todo.keys - model.listPluralName = \\"Todos\\" - model.syncPluralName = \\"Todos\\" + model.listPluralName = "Todos" + model.syncPluralName = "Todos" model.fields( .id(), @@ -1465,28 +1465,28 @@ extension Todo { } extension ModelPath where ModelType == Todo { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var requiredListOfTasks: ModelPath { - task.Path(name: \\"requiredListOfTasks\\", isCollection: true, parent: self) + task.Path(name: "requiredListOfTasks", isCollection: true, parent: self) } public var listOfRequiredTasks: ModelPath { - task.Path(name: \\"listOfRequiredTasks\\", isCollection: true, parent: self) + task.Path(name: "listOfRequiredTasks", isCollection: true, parent: self) } public var listOfTasks: ModelPath { - task.Path(name: \\"listOfTasks\\", isCollection: true, parent: self) + task.Path(name: "listOfTasks", isCollection: true, parent: self) } public var requiredListOfRequiredTasks: ModelPath { - task.Path(name: \\"requiredListOfRequiredTasks\\", isCollection: true, parent: self) + task.Path(name: "requiredListOfRequiredTasks", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -1571,13 +1571,13 @@ extension task { public static let schema = defineSchema { model in let task = task.keys - model.listPluralName = \\"tasks\\" - model.syncPluralName = \\"tasks\\" + model.listPluralName = "tasks" + model.syncPluralName = "tasks" model.fields( .id(), .field(task.title, is: .required, ofType: .string), - .belongsTo(task.todo, is: .optional, ofType: Todo.self, targetName: \\"taskTodoId\\"), + .belongsTo(task.todo, is: .optional, ofType: Todo.self, targetName: "taskTodoId"), .field(task.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(task.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -1588,19 +1588,19 @@ extension task { } extension ModelPath where ModelType == task { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var todo: ModelPath { - Todo.Path(name: \\"todo\\", parent: self) + Todo.Path(name: "todo", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -1693,8 +1693,8 @@ extension Foo { public static let schema = defineSchema { model in let foo = Foo.keys - model.listPluralName = \\"Foos\\" - model.syncPluralName = \\"Foos\\" + model.listPluralName = "Foos" + model.syncPluralName = "Foos" model.attributes( .primaryKey(fields: [foo.id]) @@ -1719,19 +1719,19 @@ extension Foo: ModelIdentifiable { } extension ModelPath where ModelType == Foo { public var id: FieldPath { - string(\\"id\\") + string("id") } public var bar1: ModelPath { - Bar.Path(name: \\"bar1\\", parent: self) + Bar.Path(name: "bar1", parent: self) } public var bar2: ModelPath { - Bar.Path(name: \\"bar2\\", parent: self) + Bar.Path(name: "bar2", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -1824,8 +1824,8 @@ extension Bar { public static let schema = defineSchema { model in let bar = Bar.keys - model.listPluralName = \\"Bars\\" - model.syncPluralName = \\"Bars\\" + model.listPluralName = "Bars" + model.syncPluralName = "Bars" model.attributes( .primaryKey(fields: [bar.id]) @@ -1833,8 +1833,8 @@ extension Bar { model.fields( .field(bar.id, is: .required, ofType: .string), - .belongsTo(bar.foo1, is: .optional, ofType: Foo.self, targetNames: [\\"bar1Id\\"]), - .belongsTo(bar.foo2, is: .optional, ofType: Foo.self, targetNames: [\\"bar2Id\\"]), + .belongsTo(bar.foo1, is: .optional, ofType: Foo.self, targetNames: ["bar1Id"]), + .belongsTo(bar.foo2, is: .optional, ofType: Foo.self, targetNames: ["bar2Id"]), .field(bar.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(bar.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -1850,19 +1850,19 @@ extension Bar: ModelIdentifiable { } extension ModelPath where ModelType == Bar { public var id: FieldPath { - string(\\"id\\") + string("id") } public var foo1: ModelPath { - Foo.Path(name: \\"foo1\\", parent: self) + Foo.Path(name: "foo1", parent: self) } public var foo2: ModelPath { - Foo.Path(name: \\"foo2\\", parent: self) + Foo.Path(name: "foo2", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -1935,11 +1935,11 @@ extension Primary { public static let schema = defineSchema { model in let primary = Primary.keys - model.listPluralName = \\"Primaries\\" - model.syncPluralName = \\"Primaries\\" + model.listPluralName = "Primaries" + model.syncPluralName = "Primaries" model.attributes( - .index(fields: [\\"tenantId\\", \\"instanceId\\", \\"recordId\\"], name: nil), + .index(fields: ["tenantId", "instanceId", "recordId"], name: nil), .primaryKey(fields: [primary.tenantId, primary.instanceId, primary.recordId]) ) @@ -1967,30 +1967,30 @@ extension Primary.IdentifierProtocol { public static func identifier(tenantId: String, instanceId: String, recordId: String) -> Self { - .make(fields:[(name: \\"tenantId\\", value: tenantId), (name: \\"instanceId\\", value: instanceId), (name: \\"recordId\\", value: recordId)]) + .make(fields:[(name: "tenantId", value: tenantId), (name: "instanceId", value: instanceId), (name: "recordId", value: recordId)]) } } extension ModelPath where ModelType == Primary { public var tenantId: FieldPath { - string(\\"tenantId\\") + string("tenantId") } public var instanceId: FieldPath { - string(\\"instanceId\\") + string("instanceId") } public var recordId: FieldPath { - string(\\"recordId\\") + string("recordId") } public var content: FieldPath { - string(\\"content\\") + string("content") } public var related: ModelPath { - Related.Path(name: \\"related\\", isCollection: true, parent: self) + Related.Path(name: "related", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -2075,8 +2075,8 @@ extension Related { public static let schema = defineSchema { model in let related = Related.keys - model.listPluralName = \\"Relateds\\" - model.syncPluralName = \\"Relateds\\" + model.listPluralName = "Relateds" + model.syncPluralName = "Relateds" model.attributes( .primaryKey(fields: [related.id]) @@ -2085,7 +2085,7 @@ extension Related { model.fields( .field(related.id, is: .required, ofType: .string), .field(related.content, is: .optional, ofType: .string), - .belongsTo(related.primary, is: .optional, ofType: Primary.self, targetNames: [\\"primaryTenantId\\", \\"primaryInstanceId\\", \\"primaryRecordId\\"]), + .belongsTo(related.primary, is: .optional, ofType: Primary.self, targetNames: ["primaryTenantId", "primaryInstanceId", "primaryRecordId"]), .field(related.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(related.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -2101,19 +2101,19 @@ extension Related: ModelIdentifiable { } extension ModelPath where ModelType == Related { public var id: FieldPath { - string(\\"id\\") + string("id") } public var content: FieldPath { - string(\\"content\\") + string("content") } public var primary: ModelPath { - Primary.Path(name: \\"primary\\", parent: self) + Primary.Path(name: "primary", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -2214,11 +2214,11 @@ extension Primary { public static let schema = defineSchema { model in let primary = Primary.keys - model.listPluralName = \\"Primaries\\" - model.syncPluralName = \\"Primaries\\" + model.listPluralName = "Primaries" + model.syncPluralName = "Primaries" model.attributes( - .index(fields: [\\"tenantId\\", \\"instanceId\\", \\"recordId\\"], name: nil), + .index(fields: ["tenantId", "instanceId", "recordId"], name: nil), .primaryKey(fields: [primary.tenantId, primary.instanceId, primary.recordId]) ) @@ -2246,30 +2246,30 @@ extension Primary.IdentifierProtocol { public static func identifier(tenantId: String, instanceId: String, recordId: String) -> Self { - .make(fields:[(name: \\"tenantId\\", value: tenantId), (name: \\"instanceId\\", value: instanceId), (name: \\"recordId\\", value: recordId)]) + .make(fields:[(name: "tenantId", value: tenantId), (name: "instanceId", value: instanceId), (name: "recordId", value: recordId)]) } } extension ModelPath where ModelType == Primary { public var tenantId: FieldPath { - string(\\"tenantId\\") + string("tenantId") } public var instanceId: FieldPath { - string(\\"instanceId\\") + string("instanceId") } public var recordId: FieldPath { - string(\\"recordId\\") + string("recordId") } public var content: FieldPath { - string(\\"content\\") + string("content") } public var related: ModelPath { - Related.Path(name: \\"related\\", parent: self) + Related.Path(name: "related", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -2354,8 +2354,8 @@ extension Related { public static let schema = defineSchema { model in let related = Related.keys - model.listPluralName = \\"Relateds\\" - model.syncPluralName = \\"Relateds\\" + model.listPluralName = "Relateds" + model.syncPluralName = "Relateds" model.attributes( .primaryKey(fields: [related.id]) @@ -2364,7 +2364,7 @@ extension Related { model.fields( .field(related.id, is: .required, ofType: .string), .field(related.content, is: .optional, ofType: .string), - .belongsTo(related.primary, is: .optional, ofType: Primary.self, targetNames: [\\"primaryTenantId\\", \\"primaryInstanceId\\", \\"primaryRecordId\\"]), + .belongsTo(related.primary, is: .optional, ofType: Primary.self, targetNames: ["primaryTenantId", "primaryInstanceId", "primaryRecordId"]), .field(related.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(related.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -2380,19 +2380,19 @@ extension Related: ModelIdentifiable { } extension ModelPath where ModelType == Related { public var id: FieldPath { - string(\\"id\\") + string("id") } public var content: FieldPath { - string(\\"content\\") + string("content") } public var primary: ModelPath { - Primary.Path(name: \\"primary\\", parent: self) + Primary.Path(name: "primary", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -2453,11 +2453,11 @@ extension SqlPrimary { public static let schema = defineSchema { model in let sqlPrimary = SqlPrimary.keys - model.listPluralName = \\"SqlPrimaries\\" - model.syncPluralName = \\"SqlPrimaries\\" + model.listPluralName = "SqlPrimaries" + model.syncPluralName = "SqlPrimaries" model.attributes( - .index(fields: [\\"id\\"], name: nil), + .index(fields: ["id"], name: nil), .primaryKey(fields: [sqlPrimary.id]) ) @@ -2480,19 +2480,19 @@ extension SqlPrimary: ModelIdentifiable { } extension ModelPath where ModelType == SqlPrimary { public var id: FieldPath { - int(\\"id\\") + int("id") } public var content: FieldPath { - string(\\"content\\") + string("content") } public var related: ModelPath { - SqlRelated.Path(name: \\"related\\", isCollection: true, parent: self) + SqlRelated.Path(name: "related", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -2577,19 +2577,19 @@ extension SqlRelated { public static let schema = defineSchema { model in let sqlRelated = SqlRelated.keys - model.listPluralName = \\"SqlRelateds\\" - model.syncPluralName = \\"SqlRelateds\\" + model.listPluralName = "SqlRelateds" + model.syncPluralName = "SqlRelateds" model.attributes( - .index(fields: [\\"id\\"], name: nil), - .index(fields: [\\"primaryId\\"], name: \\"primary_id\\"), + .index(fields: ["id"], name: nil), + .index(fields: ["primaryId"], name: "primary_id"), .primaryKey(fields: [sqlRelated.id]) ) model.fields( .field(sqlRelated.id, is: .required, ofType: .int), .field(sqlRelated.content, is: .optional, ofType: .string), - .belongsTo(sqlRelated.primary, is: .optional, ofType: SqlPrimary.self, targetNames: [\\"primaryId\\"]), + .belongsTo(sqlRelated.primary, is: .optional, ofType: SqlPrimary.self, targetNames: ["primaryId"]), .field(sqlRelated.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(sqlRelated.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -2605,19 +2605,19 @@ extension SqlRelated: ModelIdentifiable { } extension ModelPath where ModelType == SqlRelated { public var id: FieldPath { - int(\\"id\\") + int("id") } public var content: FieldPath { - string(\\"content\\") + string("content") } public var primary: ModelPath { - SqlPrimary.Path(name: \\"primary\\", parent: self) + SqlPrimary.Path(name: "primary", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -2702,11 +2702,11 @@ extension Primary { public static let schema = defineSchema { model in let primary = Primary.keys - model.listPluralName = \\"Primaries\\" - model.syncPluralName = \\"Primaries\\" + model.listPluralName = "Primaries" + model.syncPluralName = "Primaries" model.attributes( - .index(fields: [\\"id\\"], name: nil), + .index(fields: ["id"], name: nil), .primaryKey(fields: [primary.id]) ) @@ -2729,19 +2729,19 @@ extension Primary: ModelIdentifiable { } extension ModelPath where ModelType == Primary { public var id: FieldPath { - string(\\"id\\") + string("id") } public var relatedMany: ModelPath { - RelatedMany.Path(name: \\"relatedMany\\", isCollection: true, parent: self) + RelatedMany.Path(name: "relatedMany", isCollection: true, parent: self) } public var relatedOne: ModelPath { - RelatedOne.Path(name: \\"relatedOne\\", parent: self) + RelatedOne.Path(name: "relatedOne", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -2818,17 +2818,17 @@ extension RelatedMany { public static let schema = defineSchema { model in let relatedMany = RelatedMany.keys - model.listPluralName = \\"RelatedManies\\" - model.syncPluralName = \\"RelatedManies\\" + model.listPluralName = "RelatedManies" + model.syncPluralName = "RelatedManies" model.attributes( - .index(fields: [\\"id\\"], name: nil), + .index(fields: ["id"], name: nil), .primaryKey(fields: [relatedMany.id]) ) model.fields( .field(relatedMany.id, is: .required, ofType: .string), - .belongsTo(relatedMany.primary, is: .optional, ofType: Primary.self, targetNames: [\\"primaryId\\"]), + .belongsTo(relatedMany.primary, is: .optional, ofType: Primary.self, targetNames: ["primaryId"]), .field(relatedMany.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(relatedMany.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -2844,16 +2844,16 @@ extension RelatedMany: ModelIdentifiable { } extension ModelPath where ModelType == RelatedMany { public var id: FieldPath { - string(\\"id\\") + string("id") } public var primary: ModelPath { - Primary.Path(name: \\"primary\\", parent: self) + Primary.Path(name: "primary", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -2930,17 +2930,17 @@ extension RelatedOne { public static let schema = defineSchema { model in let relatedOne = RelatedOne.keys - model.listPluralName = \\"RelatedOnes\\" - model.syncPluralName = \\"RelatedOnes\\" + model.listPluralName = "RelatedOnes" + model.syncPluralName = "RelatedOnes" model.attributes( - .index(fields: [\\"id\\"], name: nil), + .index(fields: ["id"], name: nil), .primaryKey(fields: [relatedOne.id]) ) model.fields( .field(relatedOne.id, is: .required, ofType: .string), - .belongsTo(relatedOne.primary, is: .optional, ofType: Primary.self, targetNames: [\\"primaryId\\"]), + .belongsTo(relatedOne.primary, is: .optional, ofType: Primary.self, targetNames: ["primaryId"]), .field(relatedOne.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(relatedOne.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -2956,16 +2956,16 @@ extension RelatedOne: ModelIdentifiable { } extension ModelPath where ModelType == RelatedOne { public var id: FieldPath { - string(\\"id\\") + string("id") } public var primary: ModelPath { - Primary.Path(name: \\"primary\\", parent: self) + Primary.Path(name: "primary", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -3050,11 +3050,11 @@ extension SqlPrimary { public static let schema = defineSchema { model in let sqlPrimary = SqlPrimary.keys - model.listPluralName = \\"SqlPrimaries\\" - model.syncPluralName = \\"SqlPrimaries\\" + model.listPluralName = "SqlPrimaries" + model.syncPluralName = "SqlPrimaries" model.attributes( - .index(fields: [\\"id\\"], name: nil), + .index(fields: ["id"], name: nil), .primaryKey(fields: [sqlPrimary.id]) ) @@ -3077,19 +3077,19 @@ extension SqlPrimary: ModelIdentifiable { } extension ModelPath where ModelType == SqlPrimary { public var id: FieldPath { - int(\\"id\\") + int("id") } public var content: FieldPath { - string(\\"content\\") + string("content") } public var related: ModelPath { - SqlRelated.Path(name: \\"related\\", parent: self) + SqlRelated.Path(name: "related", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; @@ -3174,19 +3174,19 @@ extension SqlRelated { public static let schema = defineSchema { model in let sqlRelated = SqlRelated.keys - model.listPluralName = \\"SqlRelateds\\" - model.syncPluralName = \\"SqlRelateds\\" + model.listPluralName = "SqlRelateds" + model.syncPluralName = "SqlRelateds" model.attributes( - .index(fields: [\\"id\\"], name: nil), - .index(fields: [\\"primaryId\\"], name: \\"primary_id\\"), + .index(fields: ["id"], name: nil), + .index(fields: ["primaryId"], name: "primary_id"), .primaryKey(fields: [sqlRelated.id]) ) model.fields( .field(sqlRelated.id, is: .required, ofType: .int), .field(sqlRelated.content, is: .optional, ofType: .string), - .belongsTo(sqlRelated.primary, is: .optional, ofType: SqlPrimary.self, targetNames: [\\"primaryId\\"]), + .belongsTo(sqlRelated.primary, is: .optional, ofType: SqlPrimary.self, targetNames: ["primaryId"]), .field(sqlRelated.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(sqlRelated.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -3202,19 +3202,19 @@ extension SqlRelated: ModelIdentifiable { } extension ModelPath where ModelType == SqlRelated { public var id: FieldPath { - int(\\"id\\") + int("id") } public var content: FieldPath { - string(\\"content\\") + string("content") } public var primary: ModelPath { - SqlPrimary.Path(name: \\"primary\\", parent: self) + SqlPrimary.Path(name: "primary", parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `; diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-typescript-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-typescript-visitor.test.ts.snap index ba58434eb..f62644ffb 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-typescript-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-typescript-visitor.test.ts.snap @@ -1,19 +1,19 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`TypeScript visitor list enum 1`] = ` -"import { ModelInit, MutableModel, PersistentModelConstructor } from \\"@aws-amplify/datastore\\"; -import { initSchema } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel, PersistentModelConstructor } from "@aws-amplify/datastore"; +import { initSchema } from "@aws-amplify/datastore"; -import { schema } from \\"./schema\\"; +import { schema } from "./schema"; export enum DayOfWeek { - MONDAY = \\"MONDAY\\", - TUESDAY = \\"TUESDAY\\", - WEDNESDAY = \\"WEDNESDAY\\", - THURSDAY = \\"THURSDAY\\", - FRIDAY = \\"FRIDAY\\", - SATURDAY = \\"SATURDAY\\", - SUNDAY = \\"SUNDAY\\" + MONDAY = "MONDAY", + TUESDAY = "TUESDAY", + WEDNESDAY = "WEDNESDAY", + THURSDAY = "THURSDAY", + FRIDAY = "FRIDAY", + SATURDAY = "SATURDAY", + SUNDAY = "SUNDAY" } @@ -40,14 +40,14 @@ export { `; exports[`TypeScript visitor singular enum 1`] = ` -"import { ModelInit, MutableModel, PersistentModelConstructor } from \\"@aws-amplify/datastore\\"; -import { initSchema } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel, PersistentModelConstructor } from "@aws-amplify/datastore"; +import { initSchema } from "@aws-amplify/datastore"; -import { schema } from \\"./schema\\"; +import { schema } from "./schema"; export enum Frequency { - YEARLY = \\"YEARLY\\", - WEEKLY = \\"WEEKLY\\" + YEARLY = "YEARLY", + WEEKLY = "WEEKLY" } diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-visitor.test.ts.snap index f7e1ca2a8..2b4ead89f 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-visitor.test.ts.snap @@ -1,18 +1,18 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`AppSyncModelVisitor Other GraphQL types shoud support query, mutation and subscription types 1`] = ` -Object { - "echo": Object { +{ + "echo": { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "echo", "operationType": "query", - "parameters": Array [ - Object { + "parameters": [ + { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "msg", @@ -21,17 +21,17 @@ Object { ], "type": "String", }, - "echo2": Object { + "echo2": { "baseType": "Todo", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "echo2", "operationType": "query", - "parameters": Array [ - Object { + "parameters": [ + { "baseType": "ID", - "directives": Array [], + "directives": [], "isList": false, "isNullable": false, "name": "todoId", @@ -40,28 +40,28 @@ Object { ], "type": "Todo", }, - "echo3": Object { + "echo3": { "baseType": "Todo", - "directives": Array [], + "directives": [], "isList": true, "isListNullable": false, "isNullable": false, "name": "echo3", "operationType": "query", - "parameters": Array [], + "parameters": [], "type": "Todo", }, - "echo4": Object { + "echo4": { "baseType": "Phone", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "echo4", "operationType": "query", - "parameters": Array [ - Object { + "parameters": [ + { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "number", @@ -70,28 +70,28 @@ Object { ], "type": "Phone", }, - "echo5": Object { + "echo5": { "baseType": "CustomUnion", - "directives": Array [], + "directives": [], "isList": true, "isListNullable": false, "isNullable": false, "name": "echo5", "operationType": "query", - "parameters": Array [], + "parameters": [], "type": "CustomUnion", }, - "echo6": Object { + "echo6": { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": false, "name": "echo6", "operationType": "query", - "parameters": Array [ - Object { + "parameters": [ + { "baseType": "CustomInput", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "customInput", @@ -100,36 +100,36 @@ Object { ], "type": "String", }, - "echo7": Object { + "echo7": { "baseType": "ICustom", - "directives": Array [], + "directives": [], "isList": true, "isListNullable": false, "isNullable": true, "name": "echo7", "operationType": "query", - "parameters": Array [], + "parameters": [], "type": "ICustom", }, - "getAllTodo": Object { + "getAllTodo": { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "getAllTodo", "operationType": "query", - "parameters": Array [ - Object { + "parameters": [ + { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "msg", "type": "String", }, - Object { + { "baseType": "CustomInput", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "input", @@ -142,18 +142,18 @@ Object { `; exports[`AppSyncModelVisitor Other GraphQL types shoud support query, mutation and subscription types 2`] = ` -Object { - "mutate": Object { +{ + "mutate": { "baseType": "Todo", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "mutate", "operationType": "mutation", - "parameters": Array [ - Object { + "parameters": [ + { "baseType": "String", - "directives": Array [], + "directives": [], "isList": true, "isListNullable": false, "isNullable": false, @@ -167,19 +167,19 @@ Object { `; exports[`AppSyncModelVisitor Other GraphQL types shoud support query, mutation and subscription types 3`] = ` -Object { - "onMutate": Object { +{ + "onMutate": { "baseType": "Todo", - "directives": Array [], + "directives": [], "isList": true, "isListNullable": true, "isNullable": false, "name": "onMutate", "operationType": "subscription", - "parameters": Array [ - Object { + "parameters": [ + { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "msg", @@ -192,28 +192,28 @@ Object { `; exports[`AppSyncModelVisitor Other GraphQL types should support input types 1`] = ` -Object { - "CustomInput": Object { - "inputValues": Array [ - Object { +{ + "CustomInput": { + "inputValues": [ + { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": false, "name": "customField1", "type": "String", }, - Object { + { "baseType": "BillingSource", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "customField2", "type": "BillingSource", }, - Object { + { "baseType": "NestedInput", - "directives": Array [], + "directives": [], "isList": false, "isNullable": false, "name": "customField3", @@ -223,11 +223,11 @@ Object { "name": "CustomInput", "type": "input", }, - "NestedInput": Object { - "inputValues": Array [ - Object { + "NestedInput": { + "inputValues": [ + { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": false, "name": "content", @@ -241,50 +241,50 @@ Object { `; exports[`AppSyncModelVisitor Other GraphQL types should support interface types 1`] = ` -Object { - "ICustom": Object { - "fields": Array [ - Object { +{ + "ICustom": { + "fields": [ + { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": false, "name": "firstName", - "parameters": Array [], + "parameters": [], "type": "String", }, - Object { + { "baseType": "String", - "directives": Array [], + "directives": [], "isList": false, "isNullable": true, "name": "lastName", - "parameters": Array [], + "parameters": [], "type": "String", }, - Object { + { "baseType": "INestedCustom", - "directives": Array [], + "directives": [], "isList": true, "isListNullable": false, "isNullable": false, "name": "birthdays", - "parameters": Array [], + "parameters": [], "type": "INestedCustom", }, ], "name": "ICustom", "type": "interface", }, - "INestedCustom": Object { - "fields": Array [ - Object { + "INestedCustom": { + "fields": [ + { "baseType": "AWSDate", - "directives": Array [], + "directives": [], "isList": false, "isNullable": false, "name": "birthDay", - "parameters": Array [], + "parameters": [], "type": "AWSDate", }, ], @@ -295,11 +295,11 @@ Object { `; exports[`AppSyncModelVisitor Other GraphQL types should support union types 1`] = ` -Object { - "CustomUnion": Object { +{ + "CustomUnion": { "name": "CustomUnion", "type": "union", - "typeNames": Array [ + "typeNames": [ "Todo", "Phone", ], diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-javascript-visitor.test.ts b/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-javascript-visitor.test.ts index 9b72a0e0c..2a7e4e2d7 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-javascript-visitor.test.ts +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-javascript-visitor.test.ts @@ -5,7 +5,6 @@ import { TYPESCRIPT_SCALAR_MAP } from '../../scalars'; import { scalars } from '../../scalars/supported-scalars'; import { AppSyncModelJavascriptVisitor } from '../../visitors/appsync-javascript-visitor'; - const buildSchemaWithDirectives = (schema: String, directives: String): GraphQLSchema => { return buildSchema([schema, directives, scalars].join('\n')); }; @@ -21,7 +20,11 @@ const defaultJavaScriptVisitorConfig: JavaScriptVisitorConfig = { respectPrimaryKeyAttributesOnConnectionField: false, transformerVersion: 1, }; -const getVisitor = (schema: string, settings: JavaScriptVisitorConfig = {}, directives: readonly Directive[] = DefaultDirectives): AppSyncModelJavascriptVisitor => { +const getVisitor = ( + schema: string, + settings: JavaScriptVisitorConfig = {}, + directives: readonly Directive[] = DefaultDirectives, +): AppSyncModelJavascriptVisitor => { const config = { ...defaultJavaScriptVisitorConfig, ...settings }; const ast = parse(schema); const stringDirectives = directives.map(directive => directive.definition).join('\n'); @@ -69,8 +72,8 @@ describe('Javascript visitor', () => { validateTs(enums); expect(enums).toMatchInlineSnapshot(` "const SimpleEnum = { - \\"ENUM_VAL1\\": \\"enumVal1\\", - \\"ENUM_VAL2\\": \\"enumVal2\\" + "ENUM_VAL1": "enumVal1", + "ENUM_VAL2": "enumVal2" };" `); }); @@ -81,27 +84,28 @@ describe('Javascript visitor', () => { validateTs(enums); expect(enums).toMatchInlineSnapshot(` "export const SimpleEnum = { - \\"ENUM_VAL1\\": \\"enumVal1\\", - \\"ENUM_VAL2\\": \\"enumVal2\\" + "ENUM_VAL1": "enumVal1", + "ENUM_VAL2": "enumVal2" };" `); }); it('should pascal case enum', () => { const schema = /* GraphQL */ ` - enum status { - pending - done - }`; + enum status { + pending + done + } + `; - const visitor = getVisitor(schema) + const visitor = getVisitor(schema); const enumObj = (visitor as any).enumMap['status']; const statusEnum = (visitor as any).generateEnumObject(enumObj, true); validateTs(statusEnum); expect(statusEnum).toMatchInlineSnapshot(` "export const Status = { - \\"PENDING\\": \\"pending\\", - \\"DONE\\": \\"done\\" + "PENDING": "pending", + "DONE": "done" };" `); }); @@ -130,13 +134,13 @@ describe('Javascript visitor', () => { const declarations = declarationVisitor.generate(); validateTs(declarations); expect(declarations).toMatchInlineSnapshot(` - "import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; + "import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore - import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from \\"@aws-amplify/datastore\\"; + import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from "@aws-amplify/datastore"; export enum SimpleEnum { - ENUM_VAL1 = \\"enumVal1\\", - ENUM_VAL2 = \\"enumVal2\\" + ENUM_VAL1 = "enumVal1", + ENUM_VAL2 = "enumVal2" } type EagerSimpleNonModelType = { @@ -211,20 +215,24 @@ describe('Javascript visitor', () => { }); it('should generate Javascript declaration with model metadata types', () => { - const declarationVisitor = getVisitor(schema, { isDeclaration: true, isTimestampFieldsAdded: true }, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const declarationVisitor = getVisitor(schema, { isDeclaration: true, isTimestampFieldsAdded: true }, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const generateImportSpy = jest.spyOn(declarationVisitor as any, 'generateImports'); const generateEnumDeclarationsSpy = jest.spyOn(declarationVisitor as any, 'generateEnumDeclarations'); const generateModelDeclarationSpy = jest.spyOn(declarationVisitor as any, 'generateModelDeclaration'); const declarations = declarationVisitor.generate(); validateTs(declarations); expect(declarations).toMatchInlineSnapshot(` - "import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; + "import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore - import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from \\"@aws-amplify/datastore\\"; + import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from "@aws-amplify/datastore"; export enum SimpleEnum { - ENUM_VAL1 = \\"enumVal1\\", - ENUM_VAL2 = \\"enumVal2\\" + ENUM_VAL1 = "enumVal1", + ENUM_VAL2 = "enumVal2" } type EagerSimpleNonModelType = { @@ -324,8 +332,8 @@ describe('Javascript visitor', () => { import { schema } from './schema'; const SimpleEnum = { - \\"ENUM_VAL1\\": \\"enumVal1\\", - \\"ENUM_VAL2\\": \\"enumVal2\\" + "ENUM_VAL1": "enumVal1", + "ENUM_VAL2": "enumVal2" }; const { SimpleModel, Bar, SimpleNonModelType } = initSchema(schema); @@ -389,13 +397,13 @@ describe('Javascript visitor with default owner auth', () => { const declarations = declarationVisitor.generate(); validateTs(declarations); expect(declarations).toMatchInlineSnapshot(` - "import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; + "import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore - import { LazyLoading, LazyLoadingDisabled } from \\"@aws-amplify/datastore\\"; + import { LazyLoading, LazyLoadingDisabled } from "@aws-amplify/datastore"; export enum SimpleEnum { - ENUM_VAL1 = \\"enumVal1\\", - ENUM_VAL2 = \\"enumVal2\\" + ENUM_VAL1 = "enumVal1", + ENUM_VAL2 = "enumVal2" } type EagerSimpleNonModelType = { @@ -483,13 +491,13 @@ describe('Javascript visitor with custom owner field auth', () => { const declarations = declarationVisitor.generate(); validateTs(declarations); expect(declarations).toMatchInlineSnapshot(` - "import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; + "import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore - import { LazyLoading, LazyLoadingDisabled } from \\"@aws-amplify/datastore\\"; + import { LazyLoading, LazyLoadingDisabled } from "@aws-amplify/datastore"; export enum SimpleEnum { - ENUM_VAL1 = \\"enumVal1\\", - ENUM_VAL2 = \\"enumVal2\\" + ENUM_VAL1 = "enumVal1", + ENUM_VAL2 = "enumVal2" } type EagerSimpleNonModelType = { @@ -579,13 +587,13 @@ describe('Javascript visitor with multiple owner field auth', () => { const declarations = declarationVisitor.generate(); validateTs(declarations); expect(declarations).toMatchInlineSnapshot(` - "import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; + "import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore - import { LazyLoading, LazyLoadingDisabled } from \\"@aws-amplify/datastore\\"; + import { LazyLoading, LazyLoadingDisabled } from "@aws-amplify/datastore"; export enum SimpleEnum { - ENUM_VAL1 = \\"enumVal1\\", - ENUM_VAL2 = \\"enumVal2\\" + ENUM_VAL1 = "enumVal1", + ENUM_VAL2 = "enumVal2" } type EagerSimpleNonModelType = { @@ -665,9 +673,9 @@ describe('Javascript visitor with auth directives in field level', () => { const declarations = declarationVisitor.generate(); validateTs(declarations); expect(declarations).toMatchInlineSnapshot(` - "import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; + "import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore - import { LazyLoading, LazyLoadingDisabled } from \\"@aws-amplify/datastore\\"; + import { LazyLoading, LazyLoadingDisabled } from "@aws-amplify/datastore"; type EagerEmployee = { readonly id: string; @@ -742,9 +750,9 @@ describe('Javascript visitor with custom primary key', () => { const declarations = visitor.generate(); validateTs(declarations); expect(declarations).toMatchInlineSnapshot(` - "import { ModelInit, MutableModel, __modelMeta__, ManagedIdentifier, CompositeIdentifier, CustomIdentifier, OptionallyManagedIdentifier } from \\"@aws-amplify/datastore\\"; + "import { ModelInit, MutableModel, __modelMeta__, ManagedIdentifier, CompositeIdentifier, CustomIdentifier, OptionallyManagedIdentifier } from "@aws-amplify/datastore"; // @ts-ignore - import { LazyLoading, LazyLoadingDisabled } from \\"@aws-amplify/datastore\\"; + import { LazyLoading, LazyLoadingDisabled } from "@aws-amplify/datastore"; @@ -974,9 +982,9 @@ describe('New model meta field test', () => { const declarations = visitor.generate(); validateTs(declarations); expect(declarations).toMatchInlineSnapshot(` - "import { ModelInit, MutableModel, __modelMeta__, ManagedIdentifier, OptionallyManagedIdentifier, CompositeIdentifier, CustomIdentifier } from \\"@aws-amplify/datastore\\"; + "import { ModelInit, MutableModel, __modelMeta__, ManagedIdentifier, OptionallyManagedIdentifier, CompositeIdentifier, CustomIdentifier } from "@aws-amplify/datastore"; // @ts-ignore - import { LazyLoading, LazyLoadingDisabled } from \\"@aws-amplify/datastore\\"; + import { LazyLoading, LazyLoadingDisabled } from "@aws-amplify/datastore"; diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-json-metadata-visitor.test.ts b/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-json-metadata-visitor.test.ts index 94b1d0314..90e5739c4 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-json-metadata-visitor.test.ts +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-json-metadata-visitor.test.ts @@ -11,7 +11,6 @@ import { import { AppSyncJSONVisitor, AssociationHasMany, JSONSchemaNonModel } from '../../visitors/appsync-json-metadata-visitor'; import { CodeGenEnum, CodeGenField, CodeGenModel } from '../../visitors/appsync-visitor'; - const defaultJSONVisitorSettings = { isTimestampFieldsAdded: true, respectPrimaryKeyAttributesOnConnectionField: false, @@ -34,7 +33,14 @@ const getVisitor = ( const builtSchema = buildSchemaWithDirectives(schema, stringDirectives); const visitor = new AppSyncJSONVisitor( builtSchema, - { directives: stringDirectives, target: 'metadata', scalars: TYPESCRIPT_SCALAR_MAP, metadataTarget: target, codegenVersion: '1.0.0', ...visitorConfig }, + { + directives: stringDirectives, + target: 'metadata', + scalars: TYPESCRIPT_SCALAR_MAP, + metadataTarget: target, + codegenVersion: '1.0.0', + ...visitorConfig, + }, {}, ); visit(ast, { leave: visitor }); @@ -293,57 +299,57 @@ describe('Metadata visitor', () => { const metadata = (visitor as any).generateMetadata(); expect(metadata).toMatchInlineSnapshot(` - Object { + { "codegenVersion": "3.4.4", - "enums": Object { - "SimpleEnum": Object { + "enums": { + "SimpleEnum": { "name": "SimpleEnum", - "values": Array [ + "values": [ "enumVal1", "enumVal2", ], }, }, - "models": Object { - "SimpleModel": Object { - "attributes": Array [ - Object { - "properties": Object {}, + "models": { + "SimpleModel": { + "attributes": [ + { + "properties": {}, "type": "model", }, ], - "fields": Object { - "bar": Object { - "attributes": Array [], + "fields": { + "bar": { + "attributes": [], "isArray": false, "isRequired": false, "name": "bar", "type": "String", }, - "createdAt": Object { - "attributes": Array [], + "createdAt": { + "attributes": [], "isArray": false, "isReadOnly": true, "isRequired": false, "name": "createdAt", "type": "AWSDateTime", }, - "id": Object { - "attributes": Array [], + "id": { + "attributes": [], "isArray": false, "isRequired": true, "name": "id", "type": "ID", }, - "name": Object { - "attributes": Array [], + "name": { + "attributes": [], "isArray": false, "isRequired": false, "name": "name", "type": "String", }, - "updatedAt": Object { - "attributes": Array [], + "updatedAt": { + "attributes": [], "isArray": false, "isReadOnly": true, "isRequired": false, @@ -356,18 +362,18 @@ describe('Metadata visitor', () => { "syncable": true, }, }, - "nonModels": Object { - "SimpleNonModelType": Object { - "fields": Object { - "id": Object { - "attributes": Array [], + "nonModels": { + "SimpleNonModelType": { + "fields": { + "id": { + "attributes": [], "isArray": false, "isRequired": true, "name": "id", "type": "ID", }, - "names": Object { - "attributes": Array [], + "names": { + "attributes": [], "isArray": true, "isArrayNullable": true, "isRequired": false, @@ -395,185 +401,185 @@ describe('Metadata visitor', () => { const jsVisitor = getVisitor(schema, 'javascript'); expect(jsVisitor.generate()).toMatchInlineSnapshot(` "export const schema = { - \\"models\\": { - \\"SimpleModel\\": { - \\"name\\": \\"SimpleModel\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "SimpleModel": { + "name": "SimpleModel", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"bar\\": { - \\"name\\": \\"bar\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "bar": { + "name": "bar", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SimpleModels\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SimpleModels", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] } }, - \\"enums\\": { - \\"SimpleEnum\\": { - \\"name\\": \\"SimpleEnum\\", - \\"values\\": [ - \\"enumVal1\\", - \\"enumVal2\\" + "enums": { + "SimpleEnum": { + "name": "SimpleEnum", + "values": [ + "enumVal1", + "enumVal2" ] } }, - \\"nonModels\\": { - \\"SimpleNonModelType\\": { - \\"name\\": \\"SimpleNonModelType\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "nonModels": { + "SimpleNonModelType": { + "name": "SimpleNonModelType", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"names\\": { - \\"name\\": \\"names\\", - \\"isArray\\": true, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true + "names": { + "name": "names", + "isArray": true, + "type": "String", + "isRequired": false, + "attributes": [], + "isArrayNullable": true } } } }, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"5eb36909e822fd40c657cc69b22c919a\\" + "codegenVersion": "3.4.4", + "version": "5eb36909e822fd40c657cc69b22c919a" };" `); }); it('should generate for typescript', () => { const tsVisitor = getVisitor(schema, 'typescript'); expect(tsVisitor.generate()).toMatchInlineSnapshot(` - "import { Schema } from \\"@aws-amplify/datastore\\"; + "import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"SimpleModel\\": { - \\"name\\": \\"SimpleModel\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "SimpleModel": { + "name": "SimpleModel", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"bar\\": { - \\"name\\": \\"bar\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "bar": { + "name": "bar", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SimpleModels\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SimpleModels", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] } }, - \\"enums\\": { - \\"SimpleEnum\\": { - \\"name\\": \\"SimpleEnum\\", - \\"values\\": [ - \\"enumVal1\\", - \\"enumVal2\\" + "enums": { + "SimpleEnum": { + "name": "SimpleEnum", + "values": [ + "enumVal1", + "enumVal2" ] } }, - \\"nonModels\\": { - \\"SimpleNonModelType\\": { - \\"name\\": \\"SimpleNonModelType\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "nonModels": { + "SimpleNonModelType": { + "name": "SimpleNonModelType", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"names\\": { - \\"name\\": \\"names\\", - \\"isArray\\": true, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true + "names": { + "name": "names", + "isArray": true, + "type": "String", + "isRequired": false, + "attributes": [], + "isArrayNullable": true } } } }, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"5eb36909e822fd40c657cc69b22c919a\\" + "codegenVersion": "3.4.4", + "version": "5eb36909e822fd40c657cc69b22c919a" };" `); }); @@ -618,81 +624,81 @@ describe('Metadata visitor', () => { const jsVisitor = getVisitor(schema, 'javascript'); expect(jsVisitor.generate()).toMatchInlineSnapshot(` "export const schema = { - \\"models\\": { - \\"SimpleModel\\": { - \\"name\\": \\"SimpleModel\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "SimpleModel": { + "name": "SimpleModel", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"bar\\": { - \\"name\\": \\"bar\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "bar": { + "name": "bar", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SimpleModels\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SimpleModels", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"auth\\", - \\"properties\\": { - \\"rules\\": [ + "type": "auth", + "properties": { + "rules": [ { - \\"provider\\": \\"userPools\\", - \\"ownerField\\": \\"customOwnerField\\", - \\"allow\\": \\"owner\\", - \\"identityClaim\\": \\"cognito:username\\", - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "provider": "userPools", + "ownerField": "customOwnerField", + "allow": "owner", + "identityClaim": "cognito:username", + "operations": [ + "create", + "update", + "delete", + "read" ] }, { - \\"provider\\": \\"userPools\\", - \\"ownerField\\": \\"customOwnerField2\\", - \\"allow\\": \\"owner\\", - \\"identityClaim\\": \\"cognito:username\\", - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "provider": "userPools", + "ownerField": "customOwnerField2", + "allow": "owner", + "identityClaim": "cognito:username", + "operations": [ + "create", + "update", + "delete", + "read" ] } ] @@ -701,123 +707,123 @@ describe('Metadata visitor', () => { ] } }, - \\"enums\\": { - \\"SimpleEnum\\": { - \\"name\\": \\"SimpleEnum\\", - \\"values\\": [ - \\"enumVal1\\", - \\"enumVal2\\" + "enums": { + "SimpleEnum": { + "name": "SimpleEnum", + "values": [ + "enumVal1", + "enumVal2" ] } }, - \\"nonModels\\": { - \\"SimpleNonModelType\\": { - \\"name\\": \\"SimpleNonModelType\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "nonModels": { + "SimpleNonModelType": { + "name": "SimpleNonModelType", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"names\\": { - \\"name\\": \\"names\\", - \\"isArray\\": true, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true + "names": { + "name": "names", + "isArray": true, + "type": "String", + "isRequired": false, + "attributes": [], + "isArrayNullable": true } } } }, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"5eb36909e822fd40c657cc69b22c919a\\" + "codegenVersion": "3.4.4", + "version": "5eb36909e822fd40c657cc69b22c919a" };" `); }); it('should generate for typescript', () => { const tsVisitor = getVisitor(schema, 'typescript'); expect(tsVisitor.generate()).toMatchInlineSnapshot(` - "import { Schema } from \\"@aws-amplify/datastore\\"; + "import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"SimpleModel\\": { - \\"name\\": \\"SimpleModel\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "SimpleModel": { + "name": "SimpleModel", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"bar\\": { - \\"name\\": \\"bar\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "bar": { + "name": "bar", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"SimpleModels\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "SimpleModels", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"auth\\", - \\"properties\\": { - \\"rules\\": [ + "type": "auth", + "properties": { + "rules": [ { - \\"provider\\": \\"userPools\\", - \\"ownerField\\": \\"customOwnerField\\", - \\"allow\\": \\"owner\\", - \\"identityClaim\\": \\"cognito:username\\", - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "provider": "userPools", + "ownerField": "customOwnerField", + "allow": "owner", + "identityClaim": "cognito:username", + "operations": [ + "create", + "update", + "delete", + "read" ] }, { - \\"provider\\": \\"userPools\\", - \\"ownerField\\": \\"customOwnerField2\\", - \\"allow\\": \\"owner\\", - \\"identityClaim\\": \\"cognito:username\\", - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "provider": "userPools", + "ownerField": "customOwnerField2", + "allow": "owner", + "identityClaim": "cognito:username", + "operations": [ + "create", + "update", + "delete", + "read" ] } ] @@ -826,39 +832,39 @@ describe('Metadata visitor', () => { ] } }, - \\"enums\\": { - \\"SimpleEnum\\": { - \\"name\\": \\"SimpleEnum\\", - \\"values\\": [ - \\"enumVal1\\", - \\"enumVal2\\" + "enums": { + "SimpleEnum": { + "name": "SimpleEnum", + "values": [ + "enumVal1", + "enumVal2" ] } }, - \\"nonModels\\": { - \\"SimpleNonModelType\\": { - \\"name\\": \\"SimpleNonModelType\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "nonModels": { + "SimpleNonModelType": { + "name": "SimpleNonModelType", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"names\\": { - \\"name\\": \\"names\\", - \\"isArray\\": true, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true + "names": { + "name": "names", + "isArray": true, + "type": "String", + "isRequired": false, + "attributes": [], + "isArrayNullable": true } } } }, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"5eb36909e822fd40c657cc69b22c919a\\" + "codegenVersion": "3.4.4", + "version": "5eb36909e822fd40c657cc69b22c919a" };" `); }); @@ -884,90 +890,90 @@ describe('Metadata visitor for auth process in field level', () => { const jsVisitor = getVisitor(schema, 'javascript'); expect(jsVisitor.generate()).toMatchInlineSnapshot(` "export const schema = { - \\"models\\": { - \\"Employee\\": { - \\"name\\": \\"Employee\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "Employee": { + "name": "Employee", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"address\\": { - \\"name\\": \\"address\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "address": { + "name": "address", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"ssn\\": { - \\"name\\": \\"ssn\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "ssn": { + "name": "ssn", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Employees\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Employees", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"auth\\", - \\"properties\\": { - \\"rules\\": [ + "type": "auth", + "properties": { + "rules": [ { - \\"provider\\": \\"userPools\\", - \\"ownerField\\": \\"owner\\", - \\"allow\\": \\"owner\\", - \\"identityClaim\\": \\"cognito:username\\", - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "provider": "userPools", + "ownerField": "owner", + "allow": "owner", + "identityClaim": "cognito:username", + "operations": [ + "create", + "update", + "delete", + "read" ] }, { - \\"groupClaim\\": \\"cognito:groups\\", - \\"provider\\": \\"userPools\\", - \\"allow\\": \\"groups\\", - \\"groups\\": [ - \\"Admins\\" + "groupClaim": "cognito:groups", + "provider": "userPools", + "allow": "groups", + "groups": [ + "Admins" ], - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "operations": [ + "create", + "update", + "delete", + "read" ] } ] @@ -976,10 +982,10 @@ describe('Metadata visitor for auth process in field level', () => { ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"0fffb966ea9b8954eb89d00d74d474ac\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "0fffb966ea9b8954eb89d00d74d474ac" };" `); }); @@ -987,93 +993,93 @@ describe('Metadata visitor for auth process in field level', () => { it('should generate for typescript', () => { const tsVisitor = getVisitor(schema, 'typescript'); expect(tsVisitor.generate()).toMatchInlineSnapshot(` - "import { Schema } from \\"@aws-amplify/datastore\\"; + "import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"Employee\\": { - \\"name\\": \\"Employee\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "Employee": { + "name": "Employee", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"address\\": { - \\"name\\": \\"address\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "address": { + "name": "address", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"ssn\\": { - \\"name\\": \\"ssn\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "ssn": { + "name": "ssn", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Employees\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Employees", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} }, { - \\"type\\": \\"auth\\", - \\"properties\\": { - \\"rules\\": [ + "type": "auth", + "properties": { + "rules": [ { - \\"provider\\": \\"userPools\\", - \\"ownerField\\": \\"owner\\", - \\"allow\\": \\"owner\\", - \\"identityClaim\\": \\"cognito:username\\", - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "provider": "userPools", + "ownerField": "owner", + "allow": "owner", + "identityClaim": "cognito:username", + "operations": [ + "create", + "update", + "delete", + "read" ] }, { - \\"groupClaim\\": \\"cognito:groups\\", - \\"provider\\": \\"userPools\\", - \\"allow\\": \\"groups\\", - \\"groups\\": [ - \\"Admins\\" + "groupClaim": "cognito:groups", + "provider": "userPools", + "allow": "groups", + "groups": [ + "Admins" ], - \\"operations\\": [ - \\"create\\", - \\"update\\", - \\"delete\\", - \\"read\\" + "operations": [ + "create", + "update", + "delete", + "read" ] } ] @@ -1082,10 +1088,10 @@ describe('Metadata visitor for auth process in field level', () => { ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"0fffb966ea9b8954eb89d00d74d474ac\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "0fffb966ea9b8954eb89d00d74d474ac" };" `); }); @@ -1114,119 +1120,119 @@ describe('Metadata visitor has one relation', () => { const jsVisitor = getVisitor(schema, 'javascript', {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); expect(jsVisitor.generate()).toMatchInlineSnapshot(` "export const schema = { - \\"models\\": { - \\"Project\\": { - \\"name\\": \\"Project\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "Project": { + "name": "Project", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"teamID\\": { - \\"name\\": \\"teamID\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "teamID": { + "name": "teamID", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"team\\": { - \\"name\\": \\"team\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Team\\" + "team": { + "name": "team", + "isArray": false, + "type": { + "model": "Team" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": \\"id\\", - \\"targetName\\": \\"teamID\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": "id", + "targetName": "teamID" } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Projects\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Projects", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Team\\": { - \\"name\\": \\"Team\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Team": { + "name": "Team", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Teams\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Teams", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"27c53665371915d89e2b47bb22ec29af\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "27c53665371915d89e2b47bb22ec29af" };" `); }); @@ -1234,122 +1240,122 @@ describe('Metadata visitor has one relation', () => { it('should generate for TypeScript', () => { const tsVisitor = getVisitor(schema, 'typescript', {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); expect(tsVisitor.generate()).toMatchInlineSnapshot(` - "import { Schema } from \\"@aws-amplify/datastore\\"; + "import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"Project\\": { - \\"name\\": \\"Project\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "Project": { + "name": "Project", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": false, + "attributes": [] }, - \\"teamID\\": { - \\"name\\": \\"teamID\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "teamID": { + "name": "teamID", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"team\\": { - \\"name\\": \\"team\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Team\\" + "team": { + "name": "team", + "isArray": false, + "type": { + "model": "Team" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"HAS_ONE\\", - \\"associatedWith\\": \\"id\\", - \\"targetName\\": \\"teamID\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "HAS_ONE", + "associatedWith": "id", + "targetName": "teamID" } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Projects\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Projects", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Team\\": { - \\"name\\": \\"Team\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Team": { + "name": "Team", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Teams\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Teams", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"27c53665371915d89e2b47bb22ec29af\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "27c53665371915d89e2b47bb22ec29af" };" `); }); diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-swift-visitor.test.ts b/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-swift-visitor.test.ts index 307f681ac..294e6b57b 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-swift-visitor.test.ts +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-swift-visitor.test.ts @@ -123,8 +123,8 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let simpleModel = SimpleModel.keys - model.listPluralName = \\"SimpleModels\\" - model.syncPluralName = \\"SimpleModels\\" + model.listPluralName = "SimpleModels" + model.syncPluralName = "SimpleModels" model.fields( .id(), @@ -140,19 +140,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == SimpleModel { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var bar: FieldPath { - string(\\"bar\\") + string("bar") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -250,8 +250,8 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let snake_case = snake_case.keys - model.listPluralName = \\"snake_cases\\" - model.syncPluralName = \\"snake_cases\\" + model.listPluralName = "snake_cases" + model.syncPluralName = "snake_cases" model.fields( .id(), @@ -266,16 +266,16 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == snake_case { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -332,7 +332,11 @@ describe('AppSyncSwiftVisitor', () => { book: String } `; - const visitor = getVisitor(schema, 'authorBook', CodeGenGenerateEnum.code, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const visitor = getVisitor(schema, 'authorBook', CodeGenGenerateEnum.code, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const generatedCode = visitor.generate(); expect(generatedCode).toMatchInlineSnapshot(` "// swiftlint:disable all @@ -379,7 +383,11 @@ describe('AppSyncSwiftVisitor', () => { }" `); - const metadataVisitor = getVisitor(schema, 'authorBook', CodeGenGenerateEnum.metadata, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const metadataVisitor = getVisitor(schema, 'authorBook', CodeGenGenerateEnum.metadata, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const generatedMetadata = metadataVisitor.generate(); expect(generatedMetadata).toMatchInlineSnapshot(` "// swiftlint:disable all @@ -404,12 +412,12 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let authorBook = authorBook.keys - model.listPluralName = \\"authorBooks\\" - model.syncPluralName = \\"authorBooks\\" + model.listPluralName = "authorBooks" + model.syncPluralName = "authorBooks" model.attributes( - .index(fields: [\\"author_id\\"], name: \\"byAuthor\\"), - .index(fields: [\\"book_id\\"], name: \\"byBook\\") + .index(fields: ["author_id"], name: "byAuthor"), + .index(fields: ["book_id"], name: "byBook") ) model.fields( @@ -428,25 +436,25 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == authorBook { public var id: FieldPath { - string(\\"id\\") + string("id") } public var author_id: FieldPath { - string(\\"author_id\\") + string("author_id") } public var book_id: FieldPath { - string(\\"book_id\\") + string("book_id") } public var author: FieldPath { - string(\\"author\\") + string("author") } public var book: FieldPath { - string(\\"book\\") + string("book") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -471,14 +479,22 @@ describe('AppSyncSwiftVisitor', () => { book: String } `; - const visitorV1 = getVisitor(schemaV1, 'authorBook', CodeGenGenerateEnum.code, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const visitorV1 = getVisitor(schemaV1, 'authorBook', CodeGenGenerateEnum.code, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const visitorV2 = getVisitorPipelinedTransformer(schemaV2, 'authorBook'); const version1Code = visitorV1.generate(); const version2Code = visitorV2.generate(); expect(version1Code).toMatch(version2Code); - const metadataVisitorV1 = getVisitor(schemaV1, 'authorBook', CodeGenGenerateEnum.metadata, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const metadataVisitorV1 = getVisitor(schemaV1, 'authorBook', CodeGenGenerateEnum.metadata, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const metadataVisitorV2 = getVisitorPipelinedTransformer(schemaV2, 'authorBook', CodeGenGenerateEnum.metadata); const version1Metadata = metadataVisitorV1.generate(); const version2Metadata = metadataVisitorV2.generate(); @@ -505,14 +521,22 @@ describe('AppSyncSwiftVisitor', () => { book: String } `; - const visitorV1 = getVisitor(schemaV1, 'authorBook', CodeGenGenerateEnum.code, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const visitorV1 = getVisitor(schemaV1, 'authorBook', CodeGenGenerateEnum.code, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const visitorV2 = getVisitorPipelinedTransformer(schemaV2, 'authorBook'); const version1Code = visitorV1.generate(); const version2Code = visitorV2.generate(); expect(version1Code).toMatch(version2Code); - const metadataVisitorV1 = getVisitor(schemaV1, 'authorBook', CodeGenGenerateEnum.metadata, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const metadataVisitorV1 = getVisitor(schemaV1, 'authorBook', CodeGenGenerateEnum.metadata, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const metadataVisitorV2 = getVisitorPipelinedTransformer(schemaV2, 'authorBook', CodeGenGenerateEnum.metadata); const version1Metadata = metadataVisitorV1.generate(); const version2Metadata = metadataVisitorV2.generate(); @@ -583,14 +607,26 @@ describe('AppSyncSwiftVisitor', () => { const generatedCode = visitor.generate(); expect(generatedCode).toMatchSnapshot(); - const metadataVisitor = getVisitor(schema, 'Todo', CodeGenGenerateEnum.metadata, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const metadataVisitor = getVisitor(schema, 'Todo', CodeGenGenerateEnum.metadata, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const generatedMetadata = metadataVisitor.generate(); expect(generatedMetadata).toMatchSnapshot(); - const taskVisitor = getVisitor(schema, 'task', CodeGenGenerateEnum.code, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const taskVisitor = getVisitor(schema, 'task', CodeGenGenerateEnum.code, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); expect(taskVisitor.generate()).toMatchSnapshot(); - const taskMetadataVisitor = getVisitor(schema, 'task', CodeGenGenerateEnum.metadata, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const taskMetadataVisitor = getVisitor(schema, 'task', CodeGenGenerateEnum.metadata, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const generatedTaskMetadata = taskMetadataVisitor.generate(); expect(generatedTaskMetadata).toMatchSnapshot(); }); @@ -619,7 +655,11 @@ describe('AppSyncSwiftVisitor', () => { } `; it('should generate one side of the connection', () => { - const visitor = getVisitor(schema, 'Todo', CodeGenGenerateEnum.code, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const visitor = getVisitor(schema, 'Todo', CodeGenGenerateEnum.code, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const generatedCode = visitor.generate(); expect(generatedCode).toMatchInlineSnapshot(` "// swiftlint:disable all @@ -681,7 +721,11 @@ describe('AppSyncSwiftVisitor', () => { }" `); - const metadataVisitor = getVisitor(schema, 'Todo', CodeGenGenerateEnum.metadata, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const metadataVisitor = getVisitor(schema, 'Todo', CodeGenGenerateEnum.metadata, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const generatedMetadata = metadataVisitor.generate(); expect(generatedMetadata).toMatchInlineSnapshot(` "// swiftlint:disable all @@ -709,8 +753,8 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let todo = Todo.keys - model.listPluralName = \\"Todos\\" - model.syncPluralName = \\"Todos\\" + model.listPluralName = "Todos" + model.syncPluralName = "Todos" model.fields( .id(), @@ -731,41 +775,45 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Todo { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var done: FieldPath { - bool(\\"done\\") + bool("done") } public var description: FieldPath { - string(\\"description\\") + string("description") } public var due_date: FieldPath { - string(\\"due_date\\") + string("due_date") } public var version: FieldPath { - int(\\"version\\") + int("version") } public var value: FieldPath { - double(\\"value\\") + double("value") } public var tasks: ModelPath { - task.Path(name: \\"tasks\\", isCollection: true, parent: self) + task.Path(name: "tasks", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); }); it('should generate many side of the connection', () => { - const visitor = getVisitor(schema, 'task', CodeGenGenerateEnum.code, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const visitor = getVisitor(schema, 'task', CodeGenGenerateEnum.code, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const generatedCode = visitor.generate(); expect(generatedCode).toMatchInlineSnapshot(` "// swiftlint:disable all @@ -847,7 +895,11 @@ describe('AppSyncSwiftVisitor', () => { }" `); - const metadataVisitor = getVisitor(schema, 'task', CodeGenGenerateEnum.metadata, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const metadataVisitor = getVisitor(schema, 'task', CodeGenGenerateEnum.metadata, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); const generatedMetadata = metadataVisitor.generate(); expect(generatedMetadata).toMatchInlineSnapshot(` "// swiftlint:disable all @@ -873,14 +925,14 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let task = task.keys - model.listPluralName = \\"tasks\\" - model.syncPluralName = \\"tasks\\" + model.listPluralName = "tasks" + model.syncPluralName = "tasks" model.fields( .id(), .field(task.title, is: .required, ofType: .string), .field(task.done, is: .required, ofType: .bool), - .belongsTo(task.todo, is: .optional, ofType: Todo.self, targetName: \\"taskTodoId\\"), + .belongsTo(task.todo, is: .optional, ofType: Todo.self, targetName: "taskTodoId"), .field(task.time, is: .optional, ofType: .time), .field(task.createdOn, is: .optional, ofType: .date), .field(task.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), @@ -893,28 +945,28 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == task { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var done: FieldPath { - bool(\\"done\\") + bool("done") } public var todo: ModelPath { - Todo.Path(name: \\"todo\\", parent: self) + Todo.Path(name: "todo", parent: self) } public var time: FieldPath { - time(\\"time\\") + time("time") } public var createdOn: FieldPath { - date(\\"createdOn\\") + date("createdOn") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -949,7 +1001,11 @@ describe('AppSyncSwiftVisitor', () => { posts: [PostEditor] @connection(keyName: "byEditor", fields: ["id"]) } `; - const postVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.code, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const postVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.code, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); expect(() => postVisitor.generate()).not.toThrowError(); }); @@ -981,7 +1037,11 @@ describe('AppSyncSwiftVisitor', () => { } `; - const postVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.code, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const postVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.code, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); expect(postVisitor.generate()).toMatchInlineSnapshot(` "// swiftlint:disable all import Amplify @@ -1017,7 +1077,11 @@ describe('AppSyncSwiftVisitor', () => { }" `); - const postSchemaVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.metadata, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const postSchemaVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.metadata, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); expect(postSchemaVisitor.generate()).toMatchInlineSnapshot(` "// swiftlint:disable all import Amplify @@ -1039,8 +1103,8 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -1056,24 +1120,28 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var editors: ModelPath { - PostEditor.Path(name: \\"editors\\", isCollection: true, parent: self) + PostEditor.Path(name: "editors", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); - const postEditorVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.code, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const postEditorVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.code, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); expect(postEditorVisitor.generate()).toMatchInlineSnapshot(` "// swiftlint:disable all import Amplify @@ -1109,7 +1177,11 @@ describe('AppSyncSwiftVisitor', () => { }" `); - const postEditorSchemaVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.metadata, {}, [...AppSyncDirectives, ...V1Directives, DeprecatedDirective]); + const postEditorSchemaVisitor = getVisitor(schema, 'Post', CodeGenGenerateEnum.metadata, {}, [ + ...AppSyncDirectives, + ...V1Directives, + DeprecatedDirective, + ]); expect(postEditorSchemaVisitor.generate()).toMatchInlineSnapshot(` "// swiftlint:disable all import Amplify @@ -1131,8 +1203,8 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -1148,19 +1220,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var editors: ModelPath { - PostEditor.Path(name: \\"editors\\", isCollection: true, parent: self) + PostEditor.Path(name: "editors", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -1268,8 +1340,8 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let objectWithNativeTypes = ObjectWithNativeTypes.keys - model.listPluralName = \\"ObjectWithNativeTypes\\" - model.syncPluralName = \\"ObjectWithNativeTypes\\" + model.listPluralName = "ObjectWithNativeTypes" + model.syncPluralName = "ObjectWithNativeTypes" model.fields( .id(), @@ -1289,28 +1361,28 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == ObjectWithNativeTypes { public var id: FieldPath { - string(\\"id\\") + string("id") } public var intArr: FieldPath { - int(\\"intArr\\") + int("intArr") } public var strArr: FieldPath { - string(\\"strArr\\") + string("strArr") } public var floatArr: FieldPath { - double(\\"floatArr\\") + double("floatArr") } public var boolArr: FieldPath { - bool(\\"boolArr\\") + bool("boolArr") } public var dateArr: FieldPath { - date(\\"dateArr\\") + date("dateArr") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -1420,8 +1492,8 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let attraction = Attraction.keys - model.listPluralName = \\"Attractions\\" - model.syncPluralName = \\"Attractions\\" + model.listPluralName = "Attractions" + model.syncPluralName = "Attractions" model.fields( .id(), @@ -1441,19 +1513,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Attraction { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var tags: FieldPath { - string(\\"tags\\") + string("tags") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -1503,8 +1575,8 @@ describe('AppSyncSwiftVisitor', () => { public static let schema = defineSchema { model in let location = Location.keys - model.listPluralName = \\"Locations\\" - model.syncPluralName = \\"Locations\\" + model.listPluralName = "Locations" + model.syncPluralName = "Locations" model.fields( .field(location.lat, is: .required, ofType: .string), @@ -1524,7 +1596,7 @@ describe('AppSyncSwiftVisitor', () => { // Contains the set of classes that conforms to the \`Model\` protocol. final public class AmplifyModels: AmplifyModelRegistration { - public let version: String = \\"fcfad0bb5cf954c935899c0102689995\\" + public let version: String = "fcfad0bb5cf954c935899c0102689995" public func registerModels(registry: ModelRegistry.Type) { ModelRegistry.register(modelType: Attraction.self) @@ -1688,11 +1760,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .owner, ownerField: \\"owner\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.create, .update, .delete, .read]) + rule(allow: .owner, ownerField: "owner", identityClaim: "cognito:username", provider: .userPools, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -1708,19 +1780,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var owner: FieldPath { - string(\\"owner\\") + string("owner") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -1758,11 +1830,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .owner, ownerField: \\"author\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.create, .update, .delete, .read]) + rule(allow: .owner, ownerField: "author", identityClaim: "cognito:username", provider: .userPools, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -1778,19 +1850,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var author: FieldPath { - string(\\"author\\") + string("author") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -1829,11 +1901,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .owner, ownerField: \\"author\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.create, .update, .delete]) + rule(allow: .owner, ownerField: "author", identityClaim: "cognito:username", provider: .userPools, operations: [.create, .update, .delete]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -1849,19 +1921,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var author: FieldPath { - string(\\"author\\") + string("author") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -1900,11 +1972,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .owner, ownerField: \\"author\\", identityClaim: \\"sub\\", provider: .userPools, operations: [.create, .update, .delete, .read]) + rule(allow: .owner, ownerField: "author", identityClaim: "sub", provider: .userPools, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -1920,19 +1992,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var author: FieldPath { - string(\\"author\\") + string("author") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -1968,11 +2040,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .owner, ownerField: \\"owner\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.create, .update, .delete, .read]) + rule(allow: .owner, ownerField: "owner", identityClaim: "cognito:username", provider: .userPools, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -1987,16 +2059,16 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2032,11 +2104,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .owner, ownerField: \\"customField\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.create, .update, .delete, .read]) + rule(allow: .owner, ownerField: "customField", identityClaim: "cognito:username", provider: .userPools, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -2051,16 +2123,16 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2102,12 +2174,12 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .owner, ownerField: \\"author\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.create, .update, .delete, .read]), - rule(allow: .owner, ownerField: \\"editors\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.update, .read]) + rule(allow: .owner, ownerField: "author", identityClaim: "cognito:username", provider: .userPools, operations: [.create, .update, .delete, .read]), + rule(allow: .owner, ownerField: "editors", identityClaim: "cognito:username", provider: .userPools, operations: [.update, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -2124,22 +2196,22 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var author: FieldPath { - string(\\"author\\") + string("author") } public var editors: FieldPath { - string(\\"editors\\") + string("editors") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2179,12 +2251,12 @@ describe('AppSyncSwiftVisitor', () => { let employee = Employee.keys model.authRules = [ - rule(allow: .owner, ownerField: \\"owner\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.create, .update, .delete, .read]), - rule(allow: .groups, groupClaim: \\"cognito:groups\\", groups: [\\"Admins\\"], provider: .userPools, operations: [.create, .update, .delete, .read]) + rule(allow: .owner, ownerField: "owner", identityClaim: "cognito:username", provider: .userPools, operations: [.create, .update, .delete, .read]), + rule(allow: .groups, groupClaim: "cognito:groups", groups: ["Admins"], provider: .userPools, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Employees\\" - model.syncPluralName = \\"Employees\\" + model.listPluralName = "Employees" + model.syncPluralName = "Employees" model.fields( .id(), @@ -2201,22 +2273,22 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Employee { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var address: FieldPath { - string(\\"address\\") + string("address") } public var ssn: FieldPath { - string(\\"ssn\\") + string("ssn") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2255,11 +2327,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .groups, groupClaim: \\"cognito:groups\\", groups: [\\"admin\\", \\"editors\\"], provider: .userPools, operations: [.create, .update, .delete, .read]) + rule(allow: .groups, groupClaim: "cognito:groups", groups: ["admin", "editors"], provider: .userPools, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -2274,16 +2346,16 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2321,11 +2393,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .groups, groupClaim: \\"cognito:groups\\", groupsField: \\"groups\\", provider: .userPools, operations: [.create, .update, .delete, .read]) + rule(allow: .groups, groupClaim: "cognito:groups", groupsField: "groups", provider: .userPools, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -2341,19 +2413,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var groups: FieldPath { - string(\\"groups\\") + string("groups") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2390,11 +2462,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .groups, groupClaim: \\"cognito:groups\\", groups: [\\"admin\\"], provider: .userPools, operations: [.create, .update, .delete]) + rule(allow: .groups, groupClaim: "cognito:groups", groups: ["admin"], provider: .userPools, operations: [.create, .update, .delete]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -2409,16 +2481,16 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2455,11 +2527,11 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .groups, groupClaim: \\"custom:groups\\", groups: [\\"admin\\"], provider: .userPools, operations: [.create, .update, .delete, .read]) + rule(allow: .groups, groupClaim: "custom:groups", groups: ["admin"], provider: .userPools, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -2474,16 +2546,16 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2522,8 +2594,8 @@ describe('AppSyncSwiftVisitor', () => { rule(allow: .private, operations: [.create, .update, .delete, .read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -2538,16 +2610,16 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2594,13 +2666,13 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .groups, groupClaim: \\"cognito:groups\\", groups: [\\"admin\\"], provider: .userPools, operations: [.create, .update, .delete, .read]), - rule(allow: .owner, ownerField: \\"owner\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.create, .update]), + rule(allow: .groups, groupClaim: "cognito:groups", groups: ["admin"], provider: .userPools, operations: [.create, .update, .delete, .read]), + rule(allow: .owner, ownerField: "owner", identityClaim: "cognito:username", provider: .userPools, operations: [.create, .update]), rule(allow: .public, operations: [.read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -2616,19 +2688,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var owner: FieldPath { - string(\\"owner\\") + string("owner") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -2675,13 +2747,13 @@ describe('AppSyncSwiftVisitor', () => { let post = Post.keys model.authRules = [ - rule(allow: .groups, groupClaim: \\"cognito:groups\\", groups: [\\"admin\\"], provider: .userPools, operations: [.create, .update, .delete, .read]), - rule(allow: .owner, ownerField: \\"owner\\", identityClaim: \\"cognito:username\\", provider: .userPools, operations: [.create, .update]), + rule(allow: .groups, groupClaim: "cognito:groups", groups: ["admin"], provider: .userPools, operations: [.create, .update, .delete, .read]), + rule(allow: .owner, ownerField: "owner", identityClaim: "cognito:username", provider: .userPools, operations: [.create, .update]), rule(allow: .public, provider: .apiKey, operations: [.read]) ] - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -2697,19 +2769,19 @@ describe('AppSyncSwiftVisitor', () => { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var owner: FieldPath { - string(\\"owner\\") + string("owner") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }" `); @@ -3059,7 +3131,7 @@ describe('AppSyncSwiftVisitor', () => { content: String related: [SqlRelated!] @hasMany(references: ["primaryId"]) } - + type SqlRelated @refersTo(name: "sql_related") @model { id: Int! @primaryKey content: String @@ -3067,18 +3139,26 @@ describe('AppSyncSwiftVisitor', () => { primary: SqlPrimary @belongsTo(references: ["primaryId"]) } `; - expect(getVisitorPipelinedTransformer(schema, 'SqlPrimary', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'SqlPrimary', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'SqlRelated', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'SqlRelated', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'SqlPrimary', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'SqlPrimary', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'SqlRelated', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'SqlRelated', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); }); test('sets the association to the references field for hasOne/belongsTo', () => { @@ -3088,7 +3168,7 @@ describe('AppSyncSwiftVisitor', () => { content: String related: SqlRelated @hasOne(references: ["primaryId"]) } - + type SqlRelated @refersTo(name: "sql_related") @model { id: Int! @primaryKey content: String @@ -3096,18 +3176,26 @@ describe('AppSyncSwiftVisitor', () => { primary: SqlPrimary @belongsTo(references: ["primaryId"]) } `; - expect(getVisitorPipelinedTransformer(schema, 'SqlPrimary', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'SqlPrimary', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'SqlRelated', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'SqlRelated', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'SqlPrimary', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'SqlPrimary', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'SqlRelated', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'SqlRelated', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); }); test('sets the association to the references field for hasOne and hasMany', () => { @@ -3117,37 +3205,49 @@ describe('AppSyncSwiftVisitor', () => { relatedMany: [RelatedMany] @hasMany(references: ["primaryId"]) relatedOne: RelatedOne @hasOne(references: ["primaryId"]) } - + type RelatedMany @model { id: ID! @primaryKey primaryId: ID! primary: Primary @belongsTo(references: ["primaryId"]) } - + type RelatedOne @model { id: ID! @primaryKey primaryId: ID! primary: Primary @belongsTo(references: ["primaryId"]) } `; - expect(getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'RelatedMany', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'RelatedMany', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'RelatedOne', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'RelatedOne', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'RelatedMany', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'RelatedMany', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'RelatedOne', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'RelatedOne', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); }); test('double linked references', () => { @@ -3157,7 +3257,7 @@ describe('AppSyncSwiftVisitor', () => { bar1: Bar @hasOne(references: ["bar1Id"]) bar2: Bar @hasOne(references: ["bar2Id"]) } - + type Bar @model { id: ID! bar1Id: ID @@ -3166,18 +3266,26 @@ describe('AppSyncSwiftVisitor', () => { foo2: Foo @belongsTo(references: ["bar2Id"]) } `; - expect(getVisitorPipelinedTransformer(schema, 'Foo', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Foo', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Bar', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Bar', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Foo', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Foo', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Bar', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Bar', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); }); test('hasMany with sortKeyFields on primary key', () => { @@ -3189,7 +3297,7 @@ describe('AppSyncSwiftVisitor', () => { content: String related: [Related!] @hasMany(references: ["primaryTenantId", "primaryInstanceId", "primaryRecordId"]) } - + type Related @model { content: String primaryTenantId: ID! @@ -3199,18 +3307,26 @@ describe('AppSyncSwiftVisitor', () => { } `; - expect(getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Related', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Related', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Related', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Related', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); }); test('hasOne with sortKeyFields on primary key', () => { @@ -3222,7 +3338,7 @@ describe('AppSyncSwiftVisitor', () => { content: String related: Related @hasOne(references: ["primaryTenantId", "primaryInstanceId", "primaryRecordId"]) } - + type Related @model { content: String primaryTenantId: ID! @@ -3232,18 +3348,26 @@ describe('AppSyncSwiftVisitor', () => { } `; - expect(getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Related', CodeGenGenerateEnum.code, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); - expect(getVisitorPipelinedTransformer(schema, 'Related', CodeGenGenerateEnum.metadata, { - respectPrimaryKeyAttributesOnConnectionField: true, - }).generate()).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Primary', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Related', CodeGenGenerateEnum.code, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); + expect( + getVisitorPipelinedTransformer(schema, 'Related', CodeGenGenerateEnum.metadata, { + respectPrimaryKeyAttributesOnConnectionField: true, + }).generate(), + ).toMatchSnapshot(); }); }); }); diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-dart-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-dart-visitor.test.ts.snap index 1e4e4e6cc..601858470 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-dart-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-dart-visitor.test.ts.snap @@ -4,14 +4,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on explicit hasMany b "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -88,10 +88,10 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\"); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title"); + buffer.write("}"); return buffer.toString(); } @@ -142,14 +142,14 @@ class Post extends amplify_core.Model { 'comments': _comments }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -187,14 +187,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on explicit hasMany b "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -270,11 +270,11 @@ class Comment extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"post=\\" + (_post != null ? _post!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Comment {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("post=" + (_post != null ? _post!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -317,17 +317,17 @@ class Comment extends amplify_core.Model { 'post': _post }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final POST = amplify_core.QueryField( - fieldName: \\"post\\", + fieldName: "post", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment\\"; - modelSchemaDefinition.pluralName = \\"Comments\\"; + modelSchemaDefinition.name = "Comment"; + modelSchemaDefinition.pluralName = "Comments"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"postID\\", \\"content\\"], name: \\"byPost\\") + amplify_core.ModelIndex(fields: const ["postID", "content"], name: "byPost") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -366,14 +366,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on explicit hasOne be "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -447,11 +447,11 @@ class Project2 extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Project2 {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"project2TeamId=\\" + \\"$_project2TeamId\\"); - buffer.write(\\"}\\"); + buffer.write("Project2 {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("project2TeamId=" + "$_project2TeamId"); + buffer.write("}"); return buffer.toString(); } @@ -499,15 +499,15 @@ class Project2 extends amplify_core.Model { 'project2TeamId': _project2TeamId }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final TEAM = amplify_core.QueryField( - fieldName: \\"team\\", + fieldName: "team", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Team2')); - static final PROJECT2TEAMID = amplify_core.QueryField(fieldName: \\"project2TeamId\\"); + static final PROJECT2TEAMID = amplify_core.QueryField(fieldName: "project2TeamId"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Project2\\"; - modelSchemaDefinition.pluralName = \\"Project2s\\"; + modelSchemaDefinition.name = "Project2"; + modelSchemaDefinition.pluralName = "Project2s"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -551,14 +551,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on explicit hasOne be "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -634,11 +634,11 @@ class Team2 extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Team2 {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"project=\\" + (_project != null ? _project!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Team2 {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("project=" + (_project != null ? _project!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -681,14 +681,14 @@ class Team2 extends amplify_core.Model { 'project': _project }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final PROJECT = amplify_core.QueryField( - fieldName: \\"project\\", + fieldName: "project", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Project2')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Team2\\"; - modelSchemaDefinition.pluralName = \\"Team2s\\"; + modelSchemaDefinition.name = "Team2"; + modelSchemaDefinition.pluralName = "Team2s"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -726,14 +726,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on implicit hasMany b "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -810,10 +810,10 @@ class Blog7V2 extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Blog7V2 {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\"); - buffer.write(\\"}\\"); + buffer.write("Blog7V2 {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name"); + buffer.write("}"); return buffer.toString(); } @@ -864,14 +864,14 @@ class Blog7V2 extends amplify_core.Model { 'posts': _posts }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final POSTS = amplify_core.QueryField( - fieldName: \\"posts\\", + fieldName: "posts", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post7V2')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Blog7V2\\"; - modelSchemaDefinition.pluralName = \\"Blog7V2s\\"; + modelSchemaDefinition.name = "Blog7V2"; + modelSchemaDefinition.pluralName = "Blog7V2s"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -909,14 +909,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on implicit hasMany b "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1000,11 +1000,11 @@ class Post7V2 extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post7V2 {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"blog=\\" + (_blog != null ? _blog!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Post7V2 {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("blog=" + (_blog != null ? _blog!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -1064,17 +1064,17 @@ class Post7V2 extends amplify_core.Model { 'comments': _comments }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static final BLOG = amplify_core.QueryField( - fieldName: \\"blog\\", + fieldName: "blog", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Blog7V2')); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment7V2')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post7V2\\"; - modelSchemaDefinition.pluralName = \\"Post7V2s\\"; + modelSchemaDefinition.name = "Post7V2"; + modelSchemaDefinition.pluralName = "Post7V2s"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -1119,14 +1119,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on implicit hasMany b "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1193,11 +1193,11 @@ class Comment7V2 extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment7V2 {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"post=\\" + (_post != null ? _post!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Comment7V2 {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("post=" + (_post != null ? _post!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -1240,14 +1240,14 @@ class Comment7V2 extends amplify_core.Model { 'post': _post }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final POST = amplify_core.QueryField( - fieldName: \\"post\\", + fieldName: "post", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post7V2')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment7V2\\"; - modelSchemaDefinition.pluralName = \\"Comment7V2s\\"; + modelSchemaDefinition.name = "Comment7V2"; + modelSchemaDefinition.pluralName = "Comment7V2s"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -1285,14 +1285,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on implicit hasOne be "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1366,11 +1366,11 @@ class Project extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Project {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"projectTeamId=\\" + \\"$_projectTeamId\\"); - buffer.write(\\"}\\"); + buffer.write("Project {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("projectTeamId=" + "$_projectTeamId"); + buffer.write("}"); return buffer.toString(); } @@ -1418,15 +1418,15 @@ class Project extends amplify_core.Model { 'projectTeamId': _projectTeamId }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final TEAM = amplify_core.QueryField( - fieldName: \\"team\\", + fieldName: "team", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Team')); - static final PROJECTTEAMID = amplify_core.QueryField(fieldName: \\"projectTeamId\\"); + static final PROJECTTEAMID = amplify_core.QueryField(fieldName: "projectTeamId"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Project\\"; - modelSchemaDefinition.pluralName = \\"Projects\\"; + modelSchemaDefinition.name = "Project"; + modelSchemaDefinition.pluralName = "Projects"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -1470,14 +1470,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on implicit hasOne be "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1553,11 +1553,11 @@ class Team extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Team {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"project=\\" + (_project != null ? _project!.toString() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Team {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("project=" + (_project != null ? _project!.toString() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -1600,14 +1600,14 @@ class Team extends amplify_core.Model { 'project': _project }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final PROJECT = amplify_core.QueryField( - fieldName: \\"project\\", + fieldName: "project", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Project')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Team\\"; - modelSchemaDefinition.pluralName = \\"Teams\\"; + modelSchemaDefinition.name = "Team"; + modelSchemaDefinition.pluralName = "Teams"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -1645,14 +1645,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on many to many relat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1736,11 +1736,11 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\"); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("content=" + "$_content"); + buffer.write("}"); return buffer.toString(); } @@ -1796,15 +1796,15 @@ class Post extends amplify_core.Model { 'tags': _tags }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static final TAGS = amplify_core.QueryField( - fieldName: \\"tags\\", + fieldName: "tags", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'PostTags')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -1848,14 +1848,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on many to many relat "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -1932,10 +1932,10 @@ class Tag extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Tag {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"label=\\" + \\"$_label\\"); - buffer.write(\\"}\\"); + buffer.write("Tag {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("label=" + "$_label"); + buffer.write("}"); return buffer.toString(); } @@ -1986,14 +1986,14 @@ class Tag extends amplify_core.Model { 'posts': _posts }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final LABEL = amplify_core.QueryField(fieldName: \\"label\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final LABEL = amplify_core.QueryField(fieldName: "label"); static final POSTS = amplify_core.QueryField( - fieldName: \\"posts\\", + fieldName: "posts", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'PostTags')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Tag\\"; - modelSchemaDefinition.pluralName = \\"Tags\\"; + modelSchemaDefinition.name = "Tag"; + modelSchemaDefinition.pluralName = "Tags"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2031,14 +2031,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on record creation an "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2098,10 +2098,10 @@ class Todo extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Todo {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\"); - buffer.write(\\"}\\"); + buffer.write("Todo {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("content=" + "$_content"); + buffer.write("}"); return buffer.toString(); } @@ -2135,11 +2135,11 @@ class Todo extends amplify_core.Model { 'content': _content }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Todo\\"; - modelSchemaDefinition.pluralName = \\"Todos\\"; + modelSchemaDefinition.name = "Todo"; + modelSchemaDefinition.pluralName = "Todos"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2170,14 +2170,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on uni-directional ex "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2254,10 +2254,10 @@ class Post2 extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post2 {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\"); - buffer.write(\\"}\\"); + buffer.write("Post2 {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title"); + buffer.write("}"); return buffer.toString(); } @@ -2308,14 +2308,14 @@ class Post2 extends amplify_core.Model { 'comments': _comments }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment2')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post2\\"; - modelSchemaDefinition.pluralName = \\"Post2s\\"; + modelSchemaDefinition.name = "Post2"; + modelSchemaDefinition.pluralName = "Post2s"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2353,14 +2353,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on uni-directional ex "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2445,11 +2445,11 @@ class Comment2 extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment2 {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"postID=\\" + \\"$_postID\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\"); - buffer.write(\\"}\\"); + buffer.write("Comment2 {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("postID=" + "$_postID" + ", "); + buffer.write("content=" + "$_content"); + buffer.write("}"); return buffer.toString(); } @@ -2488,15 +2488,15 @@ class Comment2 extends amplify_core.Model { 'content': _content }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final POSTID = amplify_core.QueryField(fieldName: \\"postID\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final POSTID = amplify_core.QueryField(fieldName: "postID"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment2\\"; - modelSchemaDefinition.pluralName = \\"Comment2s\\"; + modelSchemaDefinition.name = "Comment2"; + modelSchemaDefinition.pluralName = "Comment2s"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"postID\\", \\"content\\"], name: \\"byPost\\") + amplify_core.ModelIndex(fields: const ["postID", "content"], name: "byPost") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2534,14 +2534,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on uni-directional ex "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2615,11 +2615,11 @@ class Project2 extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Project2 {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"teamID=\\" + \\"$_teamID\\"); - buffer.write(\\"}\\"); + buffer.write("Project2 {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("teamID=" + "$_teamID"); + buffer.write("}"); return buffer.toString(); } @@ -2667,15 +2667,15 @@ class Project2 extends amplify_core.Model { 'team': _team }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final TEAMID = amplify_core.QueryField(fieldName: \\"teamID\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final TEAMID = amplify_core.QueryField(fieldName: "teamID"); static final TEAM = amplify_core.QueryField( - fieldName: \\"team\\", + fieldName: "team", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Team2')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Project2\\"; - modelSchemaDefinition.pluralName = \\"Project2s\\"; + modelSchemaDefinition.name = "Project2"; + modelSchemaDefinition.pluralName = "Project2s"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2719,14 +2719,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on uni-directional ex "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2795,10 +2795,10 @@ class Team2 extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Team2 {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\"); - buffer.write(\\"}\\"); + buffer.write("Team2 {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name"); + buffer.write("}"); return buffer.toString(); } @@ -2832,11 +2832,11 @@ class Team2 extends amplify_core.Model { 'name': _name }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Team2\\"; - modelSchemaDefinition.pluralName = \\"Team2s\\"; + modelSchemaDefinition.name = "Team2"; + modelSchemaDefinition.pluralName = "Team2s"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2867,14 +2867,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on uni-directional im "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2951,10 +2951,10 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\"); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title"); + buffer.write("}"); return buffer.toString(); } @@ -3005,14 +3005,14 @@ class Post extends amplify_core.Model { 'comments': _comments }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3050,14 +3050,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on uni-directional im "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3133,11 +3133,11 @@ class Comment extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"postCommentsId=\\" + \\"$_postCommentsId\\"); - buffer.write(\\"}\\"); + buffer.write("Comment {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("postCommentsId=" + "$_postCommentsId"); + buffer.write("}"); return buffer.toString(); } @@ -3176,12 +3176,12 @@ class Comment extends amplify_core.Model { 'postCommentsId': _postCommentsId }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); - static final POSTCOMMENTSID = amplify_core.QueryField(fieldName: \\"postCommentsId\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); + static final POSTCOMMENTSID = amplify_core.QueryField(fieldName: "postCommentsId"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment\\"; - modelSchemaDefinition.pluralName = \\"Comments\\"; + modelSchemaDefinition.name = "Comment"; + modelSchemaDefinition.pluralName = "Comments"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3218,14 +3218,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on uni-directional im "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3299,11 +3299,11 @@ class Project extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Project {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"projectTeamId=\\" + \\"$_projectTeamId\\"); - buffer.write(\\"}\\"); + buffer.write("Project {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("projectTeamId=" + "$_projectTeamId"); + buffer.write("}"); return buffer.toString(); } @@ -3351,15 +3351,15 @@ class Project extends amplify_core.Model { 'projectTeamId': _projectTeamId }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final TEAM = amplify_core.QueryField( - fieldName: \\"team\\", + fieldName: "team", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Team')); - static final PROJECTTEAMID = amplify_core.QueryField(fieldName: \\"projectTeamId\\"); + static final PROJECTTEAMID = amplify_core.QueryField(fieldName: "projectTeamId"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Project\\"; - modelSchemaDefinition.pluralName = \\"Projects\\"; + modelSchemaDefinition.name = "Project"; + modelSchemaDefinition.pluralName = "Projects"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3403,14 +3403,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works on uni-directional im "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3479,10 +3479,10 @@ class Team extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Team {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\"); - buffer.write(\\"}\\"); + buffer.write("Team {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name"); + buffer.write("}"); return buffer.toString(); } @@ -3516,11 +3516,11 @@ class Team extends amplify_core.Model { 'name': _name }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Team\\"; - modelSchemaDefinition.pluralName = \\"Teams\\"; + modelSchemaDefinition.name = "Team"; + modelSchemaDefinition.pluralName = "Teams"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3551,14 +3551,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests Works when configuring a se "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3650,12 +3650,12 @@ class Customer extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Customer {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"phoneNumber=\\" + \\"$_phoneNumber\\" + \\", \\"); - buffer.write(\\"accountRepresentativeID=\\" + \\"$_accountRepresentativeID\\"); - buffer.write(\\"}\\"); + buffer.write("Customer {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("phoneNumber=" + "$_phoneNumber" + ", "); + buffer.write("accountRepresentativeID=" + "$_accountRepresentativeID"); + buffer.write("}"); return buffer.toString(); } @@ -3699,16 +3699,16 @@ class Customer extends amplify_core.Model { 'accountRepresentativeID': _accountRepresentativeID }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final PHONENUMBER = amplify_core.QueryField(fieldName: \\"phoneNumber\\"); - static final ACCOUNTREPRESENTATIVEID = amplify_core.QueryField(fieldName: \\"accountRepresentativeID\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final PHONENUMBER = amplify_core.QueryField(fieldName: "phoneNumber"); + static final ACCOUNTREPRESENTATIVEID = amplify_core.QueryField(fieldName: "accountRepresentativeID"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Customer\\"; - modelSchemaDefinition.pluralName = \\"Customers\\"; + modelSchemaDefinition.name = "Customer"; + modelSchemaDefinition.pluralName = "Customers"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"accountRepresentativeID\\"], name: \\"byRepresentative\\") + amplify_core.ModelIndex(fields: const ["accountRepresentativeID"], name: "byRepresentative") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3752,14 +3752,14 @@ exports[`AppSyncDartVisitor - GQLv2 Regression Tests model indexes should correc "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3883,14 +3883,14 @@ class ModelWithPrimaryKey extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"ModelWithPrimaryKey {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"productID=\\" + \\"$_productID\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"albumID=\\" + \\"$_albumID\\" + \\", \\"); - buffer.write(\\"categoryID=\\" + \\"$_categoryID\\"); - buffer.write(\\"}\\"); + buffer.write("ModelWithPrimaryKey {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("productID=" + "$_productID" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("albumID=" + "$_albumID" + ", "); + buffer.write("categoryID=" + "$_categoryID"); + buffer.write("}"); return buffer.toString(); } @@ -3944,20 +3944,20 @@ class ModelWithPrimaryKey extends amplify_core.Model { 'categoryID': _categoryID }; - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final PRODUCTID = amplify_core.QueryField(fieldName: \\"productID\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); - static final ALBUMID = amplify_core.QueryField(fieldName: \\"albumID\\"); - static final CATEGORYID = amplify_core.QueryField(fieldName: \\"categoryID\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final PRODUCTID = amplify_core.QueryField(fieldName: "productID"); + static final NAME = amplify_core.QueryField(fieldName: "name"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); + static final ALBUMID = amplify_core.QueryField(fieldName: "albumID"); + static final CATEGORYID = amplify_core.QueryField(fieldName: "categoryID"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"ModelWithPrimaryKey\\"; - modelSchemaDefinition.pluralName = \\"ModelWithPrimaryKeys\\"; + modelSchemaDefinition.name = "ModelWithPrimaryKey"; + modelSchemaDefinition.pluralName = "ModelWithPrimaryKeys"; modelSchemaDefinition.indexes = [ - amplify_core.ModelIndex(fields: const [\\"productID\\"], name: null), - amplify_core.ModelIndex(fields: const [\\"albumID\\", \\"name\\"], name: \\"byAlbum\\"), - amplify_core.ModelIndex(fields: const [\\"categoryID\\", \\"name\\", \\"content\\"], name: \\"byCategory\\") + amplify_core.ModelIndex(fields: const ["productID"], name: null), + amplify_core.ModelIndex(fields: const ["albumID", "name"], name: "byAlbum"), + amplify_core.ModelIndex(fields: const ["categoryID", "name", "content"], name: "byCategory") ]; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-java-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-java-visitor.test.ts.snap index 187cc3ca4..dadf0f3e6 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-java-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-java-visitor.test.ts.snap @@ -21,16 +21,16 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts") public final class Post implements Model { - public static final QueryField ID = field(\\"Post\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Comment\\") @HasMany(associatedWith = \\"post\\", type = Comment.class) List comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Post", "id"); + public static final QueryField TITLE = field("Post", "title"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Comment") @HasMany(associatedWith = "post", type = Comment.class) List comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -85,12 +85,12 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -204,18 +204,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Comment type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comments\\") -@Index(name = \\"byPost\\", fields = {\\"postID\\",\\"content\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comments") +@Index(name = "byPost", fields = {"postID","content"}) public final class Comment implements Model { - public static final QueryField ID = field(\\"Comment\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"Comment\\", \\"content\\"); - public static final QueryField POST = field(\\"Comment\\", \\"postID\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private final @ModelField(targetType=\\"Post\\") @BelongsTo(targetName = \\"postID\\", type = Post.class) Post post; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Comment", "id"); + public static final QueryField CONTENT = field("Comment", "content"); + public static final QueryField POST = field("Comment", "postID"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String content; + private final @ModelField(targetType="Post") @BelongsTo(targetName = "postID", type = Post.class) Post post; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -273,13 +273,13 @@ public final class Comment implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"post=\\" + String.valueOf(getPost()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Comment {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("post=" + String.valueOf(getPost()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -410,18 +410,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Project2 type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Project2s\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Project2s") public final class Project2 implements Model { - public static final QueryField ID = field(\\"Project2\\", \\"id\\"); - public static final QueryField NAME = field(\\"Project2\\", \\"name\\"); - public static final QueryField PROJECT2_TEAM_ID = field(\\"Project2\\", \\"project2TeamId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"Team2\\") @HasOne(associatedWith = \\"project\\", type = Team2.class) Team2 team = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String project2TeamId; + public static final QueryField ID = field("Project2", "id"); + public static final QueryField NAME = field("Project2", "name"); + public static final QueryField PROJECT2_TEAM_ID = field("Project2", "project2TeamId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="Team2") @HasOne(associatedWith = "project", type = Team2.class) Team2 team = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String project2TeamId; public String getId() { return id; } @@ -483,13 +483,13 @@ public final class Project2 implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Project2 {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"project2TeamId=\\" + String.valueOf(getProject2TeamId())) - .append(\\"}\\") + .append("Project2 {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("project2TeamId=" + String.valueOf(getProject2TeamId())) + .append("}") .toString(); } @@ -615,17 +615,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Team2 type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Team2s\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Team2s") public final class Team2 implements Model { - public static final QueryField ID = field(\\"Team2\\", \\"id\\"); - public static final QueryField NAME = field(\\"Team2\\", \\"name\\"); - public static final QueryField PROJECT = field(\\"Team2\\", \\"projectID\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Project2\\") @BelongsTo(targetName = \\"projectID\\", type = Project2.class) Project2 project; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Team2", "id"); + public static final QueryField NAME = field("Team2", "name"); + public static final QueryField PROJECT = field("Team2", "projectID"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Project2") @BelongsTo(targetName = "projectID", type = Project2.class) Project2 project; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -683,13 +683,13 @@ public final class Team2 implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Team2 {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"project=\\" + String.valueOf(getProject()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Team2 {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("project=" + String.valueOf(getProject()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -820,16 +820,16 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Blog7V2 type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Blog7V2s\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Blog7V2s") public final class Blog7V2 implements Model { - public static final QueryField ID = field(\\"Blog7V2\\", \\"id\\"); - public static final QueryField NAME = field(\\"Blog7V2\\", \\"name\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Post7V2\\") @HasMany(associatedWith = \\"blog\\", type = Post7V2.class) List posts = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Blog7V2", "id"); + public static final QueryField NAME = field("Blog7V2", "name"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Post7V2") @HasMany(associatedWith = "blog", type = Post7V2.class) List posts = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -884,12 +884,12 @@ public final class Blog7V2 implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Blog7V2 {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Blog7V2 {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1004,18 +1004,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post7V2 type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Post7V2s\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Post7V2s") public final class Post7V2 implements Model { - public static final QueryField ID = field(\\"Post7V2\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Post7V2\\", \\"title\\"); - public static final QueryField BLOG = field(\\"Post7V2\\", \\"blog7V2PostsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Blog7V2\\") @BelongsTo(targetName = \\"blog7V2PostsId\\", type = Blog7V2.class) Blog7V2 blog; - private final @ModelField(targetType=\\"Comment7V2\\") @HasMany(associatedWith = \\"post\\", type = Comment7V2.class) List comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Post7V2", "id"); + public static final QueryField TITLE = field("Post7V2", "title"); + public static final QueryField BLOG = field("Post7V2", "blog7V2PostsId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Blog7V2") @BelongsTo(targetName = "blog7V2PostsId", type = Blog7V2.class) Blog7V2 blog; + private final @ModelField(targetType="Comment7V2") @HasMany(associatedWith = "post", type = Comment7V2.class) List comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -1077,13 +1077,13 @@ public final class Post7V2 implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post7V2 {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"blog=\\" + String.valueOf(getBlog()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post7V2 {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("blog=" + String.valueOf(getBlog()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1214,17 +1214,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Comment7V2 type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comment7V2s\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comment7V2s") public final class Comment7V2 implements Model { - public static final QueryField ID = field(\\"Comment7V2\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"Comment7V2\\", \\"content\\"); - public static final QueryField POST = field(\\"Comment7V2\\", \\"post7V2CommentsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"Post7V2\\") @BelongsTo(targetName = \\"post7V2CommentsId\\", type = Post7V2.class) Post7V2 post; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Comment7V2", "id"); + public static final QueryField CONTENT = field("Comment7V2", "content"); + public static final QueryField POST = field("Comment7V2", "post7V2CommentsId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="Post7V2") @BelongsTo(targetName = "post7V2CommentsId", type = Post7V2.class) Post7V2 post; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -1282,13 +1282,13 @@ public final class Comment7V2 implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment7V2 {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"post=\\" + String.valueOf(getPost()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Comment7V2 {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("post=" + String.valueOf(getPost()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1414,18 +1414,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Project type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Projects\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Projects") public final class Project implements Model { - public static final QueryField ID = field(\\"Project\\", \\"id\\"); - public static final QueryField NAME = field(\\"Project\\", \\"name\\"); - public static final QueryField PROJECT_TEAM_ID = field(\\"Project\\", \\"projectTeamId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"Team\\") @HasOne(associatedWith = \\"project\\", type = Team.class) Team team = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String projectTeamId; + public static final QueryField ID = field("Project", "id"); + public static final QueryField NAME = field("Project", "name"); + public static final QueryField PROJECT_TEAM_ID = field("Project", "projectTeamId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="Team") @HasOne(associatedWith = "project", type = Team.class) Team team = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String projectTeamId; public String getId() { return id; } @@ -1487,13 +1487,13 @@ public final class Project implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Project {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"projectTeamId=\\" + String.valueOf(getProjectTeamId())) - .append(\\"}\\") + .append("Project {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("projectTeamId=" + String.valueOf(getProjectTeamId())) + .append("}") .toString(); } @@ -1619,17 +1619,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Team type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Teams\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Teams") public final class Team implements Model { - public static final QueryField ID = field(\\"Team\\", \\"id\\"); - public static final QueryField NAME = field(\\"Team\\", \\"name\\"); - public static final QueryField PROJECT = field(\\"Team\\", \\"teamProjectId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Project\\") @BelongsTo(targetName = \\"teamProjectId\\", type = Project.class) Project project; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Team", "id"); + public static final QueryField NAME = field("Team", "name"); + public static final QueryField PROJECT = field("Team", "teamProjectId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Project") @BelongsTo(targetName = "teamProjectId", type = Project.class) Project project; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -1687,13 +1687,13 @@ public final class Team implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Team {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"project=\\" + String.valueOf(getProject()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Team {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("project=" + String.valueOf(getProject()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1824,18 +1824,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts") public final class Post implements Model { - public static final QueryField ID = field(\\"Post\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - public static final QueryField CONTENT = field(\\"Post\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"String\\") String content; - private final @ModelField(targetType=\\"PostTags\\") @HasMany(associatedWith = \\"post\\", type = PostTags.class) List tags = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Post", "id"); + public static final QueryField TITLE = field("Post", "title"); + public static final QueryField CONTENT = field("Post", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="String") String content; + private final @ModelField(targetType="PostTags") @HasMany(associatedWith = "post", type = PostTags.class) List tags = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -1897,13 +1897,13 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2034,16 +2034,16 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Tag type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Tags\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Tags") public final class Tag implements Model { - public static final QueryField ID = field(\\"Tag\\", \\"id\\"); - public static final QueryField LABEL = field(\\"Tag\\", \\"label\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String label; - private final @ModelField(targetType=\\"PostTags\\") @HasMany(associatedWith = \\"tag\\", type = PostTags.class) List posts = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Tag", "id"); + public static final QueryField LABEL = field("Tag", "label"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String label; + private final @ModelField(targetType="PostTags") @HasMany(associatedWith = "tag", type = PostTags.class) List posts = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -2098,12 +2098,12 @@ public final class Tag implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Tag {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"label=\\" + String.valueOf(getLabel()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Tag {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("label=" + String.valueOf(getLabel()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2216,15 +2216,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Todo type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Todos\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Todos") public final class Todo implements Model { - public static final QueryField ID = field(\\"Todo\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"Todo\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdOn; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedOn; + public static final QueryField ID = field("Todo", "id"); + public static final QueryField CONTENT = field("Todo", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdOn; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedOn; public String getId() { return id; } @@ -2275,12 +2275,12 @@ public final class Todo implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Todo {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdOn=\\" + String.valueOf(getCreatedOn()) + \\", \\") - .append(\\"updatedOn=\\" + String.valueOf(getUpdatedOn())) - .append(\\"}\\") + .append("Todo {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdOn=" + String.valueOf(getCreatedOn()) + ", ") + .append("updatedOn=" + String.valueOf(getUpdatedOn())) + .append("}") .toString(); } @@ -2389,16 +2389,16 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post2 type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Post2s\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Post2s") public final class Post2 implements Model { - public static final QueryField ID = field(\\"Post2\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Post2\\", \\"title\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Comment2\\") @HasMany(associatedWith = \\"postID\\", type = Comment2.class) List comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Post2", "id"); + public static final QueryField TITLE = field("Post2", "title"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Comment2") @HasMany(associatedWith = "postID", type = Comment2.class) List comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -2453,12 +2453,12 @@ public final class Post2 implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post2 {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post2 {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2571,18 +2571,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Comment2 type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comment2s\\") -@Index(name = \\"byPost\\", fields = {\\"postID\\",\\"content\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comment2s") +@Index(name = "byPost", fields = {"postID","content"}) public final class Comment2 implements Model { - public static final QueryField ID = field(\\"Comment2\\", \\"id\\"); - public static final QueryField POST_ID = field(\\"Comment2\\", \\"postID\\"); - public static final QueryField CONTENT = field(\\"Comment2\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String postID; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Comment2", "id"); + public static final QueryField POST_ID = field("Comment2", "postID"); + public static final QueryField CONTENT = field("Comment2", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="ID", isRequired = true) String postID; + private final @ModelField(targetType="String", isRequired = true) String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -2640,13 +2640,13 @@ public final class Comment2 implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment2 {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"postID=\\" + String.valueOf(getPostId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Comment2 {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("postID=" + String.valueOf(getPostId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2783,18 +2783,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Project2 type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Project2s\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Project2s") public final class Project2 implements Model { - public static final QueryField ID = field(\\"Project2\\", \\"id\\"); - public static final QueryField NAME = field(\\"Project2\\", \\"name\\"); - public static final QueryField TEAM_ID = field(\\"Project2\\", \\"teamID\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"ID\\") String teamID; - private final @ModelField(targetType=\\"Team2\\") @HasOne(associatedWith = \\"id\\", type = Team2.class) Team2 team = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Project2", "id"); + public static final QueryField NAME = field("Project2", "name"); + public static final QueryField TEAM_ID = field("Project2", "teamID"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="ID") String teamID; + private final @ModelField(targetType="Team2") @HasOne(associatedWith = "id", type = Team2.class) Team2 team = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -2856,13 +2856,13 @@ public final class Project2 implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Project2 {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"teamID=\\" + String.valueOf(getTeamId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Project2 {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("teamID=" + String.valueOf(getTeamId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -2987,15 +2987,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Team2 type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Team2s\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Team2s") public final class Team2 implements Model { - public static final QueryField ID = field(\\"Team2\\", \\"id\\"); - public static final QueryField NAME = field(\\"Team2\\", \\"name\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Team2", "id"); + public static final QueryField NAME = field("Team2", "name"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3046,12 +3046,12 @@ public final class Team2 implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Team2 {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Team2 {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3165,16 +3165,16 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts") public final class Post implements Model { - public static final QueryField ID = field(\\"Post\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Comment\\") @HasMany(associatedWith = \\"postCommentsId\\", type = Comment.class) List comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Post", "id"); + public static final QueryField TITLE = field("Post", "title"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Comment") @HasMany(associatedWith = "postCommentsId", type = Comment.class) List comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3229,12 +3229,12 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3347,17 +3347,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Comment type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comments\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comments") public final class Comment implements Model { - public static final QueryField ID = field(\\"Comment\\", \\"id\\"); - public static final QueryField CONTENT = field(\\"Comment\\", \\"content\\"); - public static final QueryField POST_COMMENTS_ID = field(\\"Comment\\", \\"postCommentsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String postCommentsId; + public static final QueryField ID = field("Comment", "id"); + public static final QueryField CONTENT = field("Comment", "content"); + public static final QueryField POST_COMMENTS_ID = field("Comment", "postCommentsId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String postCommentsId; public String getId() { return id; } @@ -3415,13 +3415,13 @@ public final class Comment implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"postCommentsId=\\" + String.valueOf(getPostCommentsId())) - .append(\\"}\\") + .append("Comment {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("postCommentsId=" + String.valueOf(getPostCommentsId())) + .append("}") .toString(); } @@ -3552,18 +3552,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Project type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Projects\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Projects") public final class Project implements Model { - public static final QueryField ID = field(\\"Project\\", \\"id\\"); - public static final QueryField NAME = field(\\"Project\\", \\"name\\"); - public static final QueryField PROJECT_TEAM_ID = field(\\"Project\\", \\"projectTeamId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\") String name; - private final @ModelField(targetType=\\"Team\\") @HasOne(associatedWith = \\"id\\", type = Team.class) Team team = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; - private final @ModelField(targetType=\\"ID\\") String projectTeamId; + public static final QueryField ID = field("Project", "id"); + public static final QueryField NAME = field("Project", "name"); + public static final QueryField PROJECT_TEAM_ID = field("Project", "projectTeamId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String") String name; + private final @ModelField(targetType="Team") @HasOne(associatedWith = "id", type = Team.class) Team team = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; + private final @ModelField(targetType="ID") String projectTeamId; public String getId() { return id; } @@ -3625,13 +3625,13 @@ public final class Project implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Project {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt()) + \\", \\") - .append(\\"projectTeamId=\\" + String.valueOf(getProjectTeamId())) - .append(\\"}\\") + .append("Project {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt()) + ", ") + .append("projectTeamId=" + String.valueOf(getProjectTeamId())) + .append("}") .toString(); } @@ -3756,15 +3756,15 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Team type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Teams\\") +@SuppressWarnings("all") +@ModelConfig(pluralName = "Teams") public final class Team implements Model { - public static final QueryField ID = field(\\"Team\\", \\"id\\"); - public static final QueryField NAME = field(\\"Team\\", \\"name\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Team", "id"); + public static final QueryField NAME = field("Team", "name"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -3815,12 +3815,12 @@ public final class Team implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Team {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Team {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3933,20 +3933,20 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Customer type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Customers\\") -@Index(name = \\"byRepresentative\\", fields = {\\"accountRepresentativeID\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Customers") +@Index(name = "byRepresentative", fields = {"accountRepresentativeID"}) public final class Customer implements Model { - public static final QueryField ID = field(\\"Customer\\", \\"id\\"); - public static final QueryField NAME = field(\\"Customer\\", \\"name\\"); - public static final QueryField PHONE_NUMBER = field(\\"Customer\\", \\"phoneNumber\\"); - public static final QueryField ACCOUNT_REPRESENTATIVE_ID = field(\\"Customer\\", \\"accountRepresentativeID\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"String\\") String phoneNumber; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String accountRepresentativeID; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Customer", "id"); + public static final QueryField NAME = field("Customer", "name"); + public static final QueryField PHONE_NUMBER = field("Customer", "phoneNumber"); + public static final QueryField ACCOUNT_REPRESENTATIVE_ID = field("Customer", "accountRepresentativeID"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="String") String phoneNumber; + private final @ModelField(targetType="ID", isRequired = true) String accountRepresentativeID; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4011,14 +4011,14 @@ public final class Customer implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Customer {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"phoneNumber=\\" + String.valueOf(getPhoneNumber()) + \\", \\") - .append(\\"accountRepresentativeID=\\" + String.valueOf(getAccountRepresentativeId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Customer {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("phoneNumber=" + String.valueOf(getPhoneNumber()) + ", ") + .append("accountRepresentativeID=" + String.valueOf(getAccountRepresentativeId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4171,20 +4171,20 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Customer type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Customers\\") -@Index(name = \\"byRepresentative\\", fields = {\\"accountRepresentativeID\\"}) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Customers") +@Index(name = "byRepresentative", fields = {"accountRepresentativeID"}) public final class Customer implements Model { - public static final QueryField ID = field(\\"Customer\\", \\"id\\"); - public static final QueryField NAME = field(\\"Customer\\", \\"name\\"); - public static final QueryField PHONE_NUMBER = field(\\"Customer\\", \\"phoneNumber\\"); - public static final QueryField ACCOUNT_REPRESENTATIVE_ID = field(\\"Customer\\", \\"accountRepresentativeID\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"String\\") String phoneNumber; - private final @ModelField(targetType=\\"ID\\", isRequired = true) String accountRepresentativeID; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final QueryField ID = field("Customer", "id"); + public static final QueryField NAME = field("Customer", "name"); + public static final QueryField PHONE_NUMBER = field("Customer", "phoneNumber"); + public static final QueryField ACCOUNT_REPRESENTATIVE_ID = field("Customer", "accountRepresentativeID"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="String") String phoneNumber; + private final @ModelField(targetType="ID", isRequired = true) String accountRepresentativeID; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; public String getId() { return id; } @@ -4249,14 +4249,14 @@ public final class Customer implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Customer {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"phoneNumber=\\" + String.valueOf(getPhoneNumber()) + \\", \\") - .append(\\"accountRepresentativeID=\\" + String.valueOf(getAccountRepresentativeId()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Customer {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("phoneNumber=" + String.valueOf(getPhoneNumber()) + ", ") + .append("accountRepresentativeID=" + String.valueOf(getAccountRepresentativeId()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-javascript-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-javascript-visitor.test.ts.snap index ec69bb5d9..3d32a6261 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-javascript-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-javascript-visitor.test.ts.snap @@ -16,9 +16,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on explicit hasMany belongs to relationship @belongsTo 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from "@aws-amplify/datastore"; type PostMetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; @@ -89,9 +89,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on explicit hasOne belongs to relationship @belongsTo 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncItem } from "@aws-amplify/datastore"; type Project2MetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; @@ -165,9 +165,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on implicit hasMany belongs to relationship @belongsTo (extended) 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from "@aws-amplify/datastore"; type Blog7V2MetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; @@ -266,9 +266,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on implicit hasOne belongs to relationship @belongsTo 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncItem } from "@aws-amplify/datastore"; type ProjectMetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; @@ -342,9 +342,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on many to many relationship @manyToMany 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from "@aws-amplify/datastore"; type PostMetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; @@ -442,9 +442,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on record creation and updating timestamp 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled } from "@aws-amplify/datastore"; type TodoMetaData = { readOnlyFields: 'createdOn' | 'updatedOn'; @@ -487,9 +487,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on uni-directional explicit has many relationship @hasMany 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from "@aws-amplify/datastore"; type Post2MetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; @@ -560,9 +560,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on uni-directional explicit has one relationship @hasOne 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncItem } from "@aws-amplify/datastore"; type Project2MetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; @@ -633,9 +633,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on uni-directional implicit has many relationship @hasMany 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection } from "@aws-amplify/datastore"; type PostMetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; @@ -706,9 +706,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works on uni-directional implicit has one relationship @hasOne 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncItem } from "@aws-amplify/datastore"; type ProjectMetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; @@ -778,9 +778,9 @@ export { `; exports[`AppSyncJavascriptVisitor - GQLv2 Regression Tests Works when configuring a secondary index 2`] = ` -"import { ModelInit, MutableModel } from \\"@aws-amplify/datastore\\"; +"import { ModelInit, MutableModel } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled } from "@aws-amplify/datastore"; type CustomerMetaData = { readOnlyFields: 'createdAt' | 'updatedAt'; diff --git a/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-swift-visitor.test.ts.snap b/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-swift-visitor.test.ts.snap index f524c102e..4c3b764e5 100644 --- a/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-swift-visitor.test.ts.snap +++ b/packages/appsync-modelgen-plugin/src/__tests__/visitors/gqlv2-regression-tests/__snapshots__/appsync-swift-visitor.test.ts.snap @@ -56,8 +56,8 @@ extension Post3 { public static let schema = defineSchema { model in let post3 = Post3.keys - model.listPluralName = \\"Post3s\\" - model.syncPluralName = \\"Post3s\\" + model.listPluralName = "Post3s" + model.syncPluralName = "Post3s" model.fields( .id(), @@ -126,17 +126,17 @@ extension Comment3 { public static let schema = defineSchema { model in let comment3 = Comment3.keys - model.listPluralName = \\"Comment3s\\" - model.syncPluralName = \\"Comment3s\\" + model.listPluralName = "Comment3s" + model.syncPluralName = "Comment3s" model.attributes( - .index(fields: [\\"postID\\", \\"content\\"], name: \\"byPost\\") + .index(fields: ["postID", "content"], name: "byPost") ) model.fields( .id(), .field(comment3.content, is: .required, ofType: .string), - .belongsTo(comment3.post, is: .required, ofType: Post3.self, targetName: \\"postID\\"), + .belongsTo(comment3.post, is: .required, ofType: Post3.self, targetName: "postID"), .field(comment3.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(comment3.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -200,8 +200,8 @@ extension Post { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -270,17 +270,17 @@ extension Comment { public static let schema = defineSchema { model in let comment = Comment.keys - model.listPluralName = \\"Comments\\" - model.syncPluralName = \\"Comments\\" + model.listPluralName = "Comments" + model.syncPluralName = "Comments" model.attributes( - .index(fields: [\\"postID\\", \\"content\\"], name: \\"byPost\\") + .index(fields: ["postID", "content"], name: "byPost") ) model.fields( .id(), .field(comment.content, is: .required, ofType: .string), - .belongsTo(comment.post, is: .optional, ofType: Post.self, targetName: \\"postID\\"), + .belongsTo(comment.post, is: .optional, ofType: Post.self, targetName: "postID"), .field(comment.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(comment.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -350,13 +350,13 @@ extension Project2 { public static let schema = defineSchema { model in let project2 = Project2.keys - model.listPluralName = \\"Project2s\\" - model.syncPluralName = \\"Project2s\\" + model.listPluralName = "Project2s" + model.syncPluralName = "Project2s" model.fields( .id(), .field(project2.name, is: .optional, ofType: .string), - .hasOne(project2.team, is: .optional, ofType: Team2.self, associatedWith: Team2.keys.project, targetName: \\"project2TeamId\\"), + .hasOne(project2.team, is: .optional, ofType: Team2.self, associatedWith: Team2.keys.project, targetName: "project2TeamId"), .field(project2.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(project2.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(project2.project2TeamId, is: .optional, ofType: .string) @@ -421,13 +421,13 @@ extension Team2 { public static let schema = defineSchema { model in let team2 = Team2.keys - model.listPluralName = \\"Team2s\\" - model.syncPluralName = \\"Team2s\\" + model.listPluralName = "Team2s" + model.syncPluralName = "Team2s" model.fields( .id(), .field(team2.name, is: .required, ofType: .string), - .belongsTo(team2.project, is: .optional, ofType: Project2.self, targetName: \\"projectID\\"), + .belongsTo(team2.project, is: .optional, ofType: Project2.self, targetName: "projectID"), .field(team2.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(team2.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -491,8 +491,8 @@ extension Blog7V2 { public static let schema = defineSchema { model in let blog7V2 = Blog7V2.keys - model.listPluralName = \\"Blog7V2s\\" - model.syncPluralName = \\"Blog7V2s\\" + model.listPluralName = "Blog7V2s" + model.syncPluralName = "Blog7V2s" model.fields( .id(), @@ -567,13 +567,13 @@ extension Post7V2 { public static let schema = defineSchema { model in let post7V2 = Post7V2.keys - model.listPluralName = \\"Post7V2s\\" - model.syncPluralName = \\"Post7V2s\\" + model.listPluralName = "Post7V2s" + model.syncPluralName = "Post7V2s" model.fields( .id(), .field(post7V2.title, is: .required, ofType: .string), - .belongsTo(post7V2.blog, is: .optional, ofType: Blog7V2.self, targetName: \\"blog7V2PostsId\\"), + .belongsTo(post7V2.blog, is: .optional, ofType: Blog7V2.self, targetName: "blog7V2PostsId"), .hasMany(post7V2.comments, is: .optional, ofType: Comment7V2.self, associatedWith: Comment7V2.keys.post), .field(post7V2.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(post7V2.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -638,13 +638,13 @@ extension Comment7V2 { public static let schema = defineSchema { model in let comment7V2 = Comment7V2.keys - model.listPluralName = \\"Comment7V2s\\" - model.syncPluralName = \\"Comment7V2s\\" + model.listPluralName = "Comment7V2s" + model.syncPluralName = "Comment7V2s" model.fields( .id(), .field(comment7V2.content, is: .optional, ofType: .string), - .belongsTo(comment7V2.post, is: .optional, ofType: Post7V2.self, targetName: \\"post7V2CommentsId\\"), + .belongsTo(comment7V2.post, is: .optional, ofType: Post7V2.self, targetName: "post7V2CommentsId"), .field(comment7V2.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(comment7V2.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -708,8 +708,8 @@ extension Blog8V2 { public static let schema = defineSchema { model in let blog8V2 = Blog8V2.keys - model.listPluralName = \\"Blog8V2s\\" - model.syncPluralName = \\"Blog8V2s\\" + model.listPluralName = "Blog8V2s" + model.syncPluralName = "Blog8V2s" model.fields( .id(), @@ -784,13 +784,13 @@ extension Post8V2 { public static let schema = defineSchema { model in let post8V2 = Post8V2.keys - model.listPluralName = \\"Post8V2s\\" - model.syncPluralName = \\"Post8V2s\\" + model.listPluralName = "Post8V2s" + model.syncPluralName = "Post8V2s" model.fields( .id(), .field(post8V2.title, is: .required, ofType: .string), - .belongsTo(post8V2.blog, is: .required, ofType: Blog8V2.self, targetName: \\"blog8V2PostsId\\"), + .belongsTo(post8V2.blog, is: .required, ofType: Blog8V2.self, targetName: "blog8V2PostsId"), .hasMany(post8V2.comments, is: .optional, ofType: Comment8V2.self, associatedWith: Comment8V2.keys.post), .field(post8V2.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(post8V2.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -855,13 +855,13 @@ extension Comment8V2 { public static let schema = defineSchema { model in let comment8V2 = Comment8V2.keys - model.listPluralName = \\"Comment8V2s\\" - model.syncPluralName = \\"Comment8V2s\\" + model.listPluralName = "Comment8V2s" + model.syncPluralName = "Comment8V2s" model.fields( .id(), .field(comment8V2.content, is: .optional, ofType: .string), - .belongsTo(comment8V2.post, is: .required, ofType: Post8V2.self, targetName: \\"post8V2CommentsId\\"), + .belongsTo(comment8V2.post, is: .required, ofType: Post8V2.self, targetName: "post8V2CommentsId"), .field(comment8V2.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(comment8V2.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -931,13 +931,13 @@ extension Project { public static let schema = defineSchema { model in let project = Project.keys - model.listPluralName = \\"Projects\\" - model.syncPluralName = \\"Projects\\" + model.listPluralName = "Projects" + model.syncPluralName = "Projects" model.fields( .id(), .field(project.name, is: .optional, ofType: .string), - .hasOne(project.team, is: .optional, ofType: Team.self, associatedWith: Team.keys.project, targetName: \\"projectTeamId\\"), + .hasOne(project.team, is: .optional, ofType: Team.self, associatedWith: Team.keys.project, targetName: "projectTeamId"), .field(project.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(project.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(project.projectTeamId, is: .optional, ofType: .string) @@ -1002,13 +1002,13 @@ extension Team { public static let schema = defineSchema { model in let team = Team.keys - model.listPluralName = \\"Teams\\" - model.syncPluralName = \\"Teams\\" + model.listPluralName = "Teams" + model.syncPluralName = "Teams" model.fields( .id(), .field(team.name, is: .required, ofType: .string), - .belongsTo(team.project, is: .optional, ofType: Project.self, targetName: \\"teamProjectId\\"), + .belongsTo(team.project, is: .optional, ofType: Project.self, targetName: "teamProjectId"), .field(team.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(team.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -1078,8 +1078,8 @@ extension Post { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -1149,8 +1149,8 @@ extension Tag { public static let schema = defineSchema { model in let tag = Tag.keys - model.listPluralName = \\"Tags\\" - model.syncPluralName = \\"Tags\\" + model.listPluralName = "Tags" + model.syncPluralName = "Tags" model.fields( .id(), @@ -1213,8 +1213,8 @@ extension Todo { public static let schema = defineSchema { model in let todo = Todo.keys - model.listPluralName = \\"Todos\\" - model.syncPluralName = \\"Todos\\" + model.listPluralName = "Todos" + model.syncPluralName = "Todos" model.fields( .id(), @@ -1282,8 +1282,8 @@ extension Post2 { public static let schema = defineSchema { model in let post2 = Post2.keys - model.listPluralName = \\"Post2s\\" - model.syncPluralName = \\"Post2s\\" + model.listPluralName = "Post2s" + model.syncPluralName = "Post2s" model.fields( .id(), @@ -1352,11 +1352,11 @@ extension Comment2 { public static let schema = defineSchema { model in let comment2 = Comment2.keys - model.listPluralName = \\"Comment2s\\" - model.syncPluralName = \\"Comment2s\\" + model.listPluralName = "Comment2s" + model.syncPluralName = "Comment2s" model.attributes( - .index(fields: [\\"postID\\", \\"content\\"], name: \\"byPost\\") + .index(fields: ["postID", "content"], name: "byPost") ) model.fields( @@ -1432,14 +1432,14 @@ extension Project2 { public static let schema = defineSchema { model in let project2 = Project2.keys - model.listPluralName = \\"Project2s\\" - model.syncPluralName = \\"Project2s\\" + model.listPluralName = "Project2s" + model.syncPluralName = "Project2s" model.fields( .id(), .field(project2.name, is: .optional, ofType: .string), .field(project2.teamID, is: .optional, ofType: .string), - .hasOne(project2.team, is: .optional, ofType: Team2.self, associatedWith: Team2.keys.id, targetName: \\"teamID\\"), + .hasOne(project2.team, is: .optional, ofType: Team2.self, associatedWith: Team2.keys.id, targetName: "teamID"), .field(project2.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(project2.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) ) @@ -1497,8 +1497,8 @@ extension Team2 { public static let schema = defineSchema { model in let team2 = Team2.keys - model.listPluralName = \\"Team2s\\" - model.syncPluralName = \\"Team2s\\" + model.listPluralName = "Team2s" + model.syncPluralName = "Team2s" model.fields( .id(), @@ -1566,8 +1566,8 @@ extension Post { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.fields( .id(), @@ -1636,8 +1636,8 @@ extension Comment { public static let schema = defineSchema { model in let comment = Comment.keys - model.listPluralName = \\"Comments\\" - model.syncPluralName = \\"Comments\\" + model.listPluralName = "Comments" + model.syncPluralName = "Comments" model.fields( .id(), @@ -1712,13 +1712,13 @@ extension Project { public static let schema = defineSchema { model in let project = Project.keys - model.listPluralName = \\"Projects\\" - model.syncPluralName = \\"Projects\\" + model.listPluralName = "Projects" + model.syncPluralName = "Projects" model.fields( .id(), .field(project.name, is: .optional, ofType: .string), - .hasOne(project.team, is: .optional, ofType: Team.self, associatedWith: Team.keys.id, targetName: \\"projectTeamId\\"), + .hasOne(project.team, is: .optional, ofType: Team.self, associatedWith: Team.keys.id, targetName: "projectTeamId"), .field(project.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(project.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(project.projectTeamId, is: .optional, ofType: .string) @@ -1777,8 +1777,8 @@ extension Team { public static let schema = defineSchema { model in let team = Team.keys - model.listPluralName = \\"Teams\\" - model.syncPluralName = \\"Teams\\" + model.listPluralName = "Teams" + model.syncPluralName = "Teams" model.fields( .id(), @@ -1852,11 +1852,11 @@ extension Customer { public static let schema = defineSchema { model in let customer = Customer.keys - model.listPluralName = \\"Customers\\" - model.syncPluralName = \\"Customers\\" + model.listPluralName = "Customers" + model.syncPluralName = "Customers" model.attributes( - .index(fields: [\\"accountRepresentativeID\\"], name: \\"byRepresentative\\") + .index(fields: ["accountRepresentativeID"], name: "byRepresentative") ) model.fields( diff --git a/packages/appsync-modelgen-plugin/src/types/disposable-compat.d.ts b/packages/appsync-modelgen-plugin/src/types/disposable-compat.d.ts deleted file mode 100644 index b30806d9a..000000000 --- a/packages/appsync-modelgen-plugin/src/types/disposable-compat.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// TypeScript 4.7 does not ship the standard Disposable globals that newer -// graphql-tools type declarations reference. This package does not use those -// contracts directly, so lightweight ambient declarations keep the package -// buildable until the repo's TypeScript floor moves forward. -interface Disposable {} - -interface AsyncDisposable {} diff --git a/packages/graphql-docs-generator/package.json b/packages/graphql-docs-generator/package.json index e2d5ea7b6..c94ab0ac5 100644 --- a/packages/graphql-docs-generator/package.json +++ b/packages/graphql-docs-generator/package.json @@ -25,7 +25,7 @@ "test": "tests" }, "scripts": { - "test": "jest", + "test": "jest --coverage --coverageReporters=clover --coverageReporters=text", "test-watch": "jest --watch", "build": "tsc", "watch": "tsc -w", @@ -45,11 +45,17 @@ }, "jest": { "transform": { - "^.+\\.tsx?$": "ts-jest" + "^.+\\.tsx?$": [ + "ts-jest", + { + "diagnostics": false + } + ] + }, + "testEnvironmentOptions": { + "url": "http://localhost" }, - "testURL": "http://localhost", "testRegex": "(src/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", - "collectCoverage": true, "collectCoverageFrom": [ "src/**/*.ts" ], @@ -60,21 +66,12 @@ "lines": 80 } }, - "coverageReporters": [ - "clover", - "text" - ], "moduleFileExtensions": [ "ts", "tsx", "js", "jsx", "node" - ], - "globals": { - "ts-jest": { - "diagnostics": false - } - } + ] } } diff --git a/packages/graphql-types-generator/package.json b/packages/graphql-types-generator/package.json index ec7ece23b..825af4ce1 100644 --- a/packages/graphql-types-generator/package.json +++ b/packages/graphql-types-generator/package.json @@ -30,7 +30,7 @@ "clean": "rimraf lib", "build": "tsc", "watch": "tsc -w", - "test": "jest", + "test": "jest --coverage --coverageReporters=clover --coverageReporters=text", "test:smoke": "npm install && npm run build && rimraf node_modules && npm install --prod && node ./lib/cli.js && echo 'Smoke Test Passed'", "extract-api": "ts-node ../../scripts/extract-api.ts" }, @@ -72,7 +72,6 @@ "setupFiles": [ "/src/polyfills.js" ], - "collectCoverage": true, "coverageThreshold": { "global": { "branches": 79, @@ -80,11 +79,9 @@ "lines": 80 } }, - "coverageReporters": [ - "clover", - "text" - ], - "testURL": "http://localhost", + "testEnvironmentOptions": { + "url": "http://localhost" + }, "setupFilesAfterEnv": [ "/test/test-utils/matchers.ts" ], @@ -99,16 +96,16 @@ "/test/test-utils" ], "transform": { - "^.+\\.(ts|js)x?$": "ts-jest" + "^.+\\.(ts|js)x?$": [ + "ts-jest", + { + "diagnostics": false + } + ] }, "moduleFileExtensions": [ "ts", "js" - ], - "globals": { - "ts-jest": { - "diagnostics": false - } - } + ] } } diff --git a/packages/graphql-types-generator/test/__snapshots__/jsonOutput.ts.snap b/packages/graphql-types-generator/test/__snapshots__/jsonOutput.ts.snap index 97ee3bed1..9a6b3f803 100644 --- a/packages/graphql-types-generator/test/__snapshots__/jsonOutput.ts.snap +++ b/packages/graphql-types-generator/test/__snapshots__/jsonOutput.ts.snap @@ -2,170 +2,170 @@ exports[`JSON output should generate JSON output for a mutation with an enum and an input object variable 1`] = ` "{ - \\"operations\\": [ + "operations": [ { - \\"filePath\\": \\"GraphQL request\\", - \\"operationName\\": \\"CreateReview\\", - \\"operationType\\": \\"mutation\\", - \\"rootType\\": \\"Mutation\\", - \\"variables\\": [ + "filePath": "GraphQL request", + "operationName": "CreateReview", + "operationType": "mutation", + "rootType": "Mutation", + "variables": [ { - \\"name\\": \\"episode\\", - \\"type\\": \\"Episode\\" + "name": "episode", + "type": "Episode" }, { - \\"name\\": \\"review\\", - \\"type\\": \\"ReviewInput\\" + "name": "review", + "type": "ReviewInput" } ], - \\"source\\": \\"mutation CreateReview($episode: Episode, $review: ReviewInput) {\\\\n createReview(episode: $episode, review: $review) {\\\\n __typename\\\\n stars\\\\n commentary\\\\n }\\\\n}\\", - \\"fields\\": [ + "source": "mutation CreateReview($episode: Episode, $review: ReviewInput) {\\n createReview(episode: $episode, review: $review) {\\n __typename\\n stars\\n commentary\\n }\\n}", + "fields": [ { - \\"responseName\\": \\"createReview\\", - \\"fieldName\\": \\"createReview\\", - \\"type\\": \\"Review\\", - \\"args\\": [ + "responseName": "createReview", + "fieldName": "createReview", + "type": "Review", + "args": [ { - \\"name\\": \\"episode\\", - \\"value\\": { - \\"kind\\": \\"Variable\\", - \\"variableName\\": \\"episode\\" + "name": "episode", + "value": { + "kind": "Variable", + "variableName": "episode" }, - \\"type\\": \\"Episode\\" + "type": "Episode" }, { - \\"name\\": \\"review\\", - \\"value\\": { - \\"kind\\": \\"Variable\\", - \\"variableName\\": \\"review\\" + "name": "review", + "value": { + "kind": "Variable", + "variableName": "review" }, - \\"type\\": \\"ReviewInput!\\" + "type": "ReviewInput!" } ], - \\"isConditional\\": false, - \\"isDeprecated\\": false, - \\"fields\\": [ + "isConditional": false, + "isDeprecated": false, + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"stars\\", - \\"fieldName\\": \\"stars\\", - \\"type\\": \\"Int!\\", - \\"isConditional\\": false, - \\"description\\": \\"The number of stars this review gave, 1-5\\", - \\"isDeprecated\\": false + "responseName": "stars", + "fieldName": "stars", + "type": "Int!", + "isConditional": false, + "description": "The number of stars this review gave, 1-5", + "isDeprecated": false }, { - \\"responseName\\": \\"commentary\\", - \\"fieldName\\": \\"commentary\\", - \\"type\\": \\"String\\", - \\"isConditional\\": false, - \\"description\\": \\"Comment about the movie\\", - \\"isDeprecated\\": false + "responseName": "commentary", + "fieldName": "commentary", + "type": "String", + "isConditional": false, + "description": "Comment about the movie", + "isDeprecated": false } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [] + "fragmentSpreads": [], + "inlineFragments": [] } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [], - \\"fragmentsReferenced\\": [], - \\"sourceWithFragments\\": \\"mutation CreateReview($episode: Episode, $review: ReviewInput) {\\\\n createReview(episode: $episode, review: $review) {\\\\n __typename\\\\n stars\\\\n commentary\\\\n }\\\\n}\\", - \\"operationId\\": \\"0ce790562a5f5a8afc1e0d002d0436768d7649e4ec8b4aa816d3849f66768c7e\\" + "fragmentSpreads": [], + "inlineFragments": [], + "fragmentsReferenced": [], + "sourceWithFragments": "mutation CreateReview($episode: Episode, $review: ReviewInput) {\\n createReview(episode: $episode, review: $review) {\\n __typename\\n stars\\n commentary\\n }\\n}", + "operationId": "0ce790562a5f5a8afc1e0d002d0436768d7649e4ec8b4aa816d3849f66768c7e" } ], - \\"fragments\\": [], - \\"typesUsed\\": [ + "fragments": [], + "typesUsed": [ { - \\"kind\\": \\"EnumType\\", - \\"name\\": \\"Episode\\", - \\"description\\": \\"The episodes in the Star Wars trilogy\\", - \\"values\\": [ + "kind": "EnumType", + "name": "Episode", + "description": "The episodes in the Star Wars trilogy", + "values": [ { - \\"name\\": \\"NEWHOPE\\", - \\"description\\": \\"Star Wars Episode IV: A New Hope, released in 1977.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "NEWHOPE", + "description": "Star Wars Episode IV: A New Hope, released in 1977.", + "isDeprecated": false, + "deprecationReason": null }, { - \\"name\\": \\"EMPIRE\\", - \\"description\\": \\"Star Wars Episode V: The Empire Strikes Back, released in 1980.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "EMPIRE", + "description": "Star Wars Episode V: The Empire Strikes Back, released in 1980.", + "isDeprecated": false, + "deprecationReason": null }, { - \\"name\\": \\"JEDI\\", - \\"description\\": \\"Star Wars Episode VI: Return of the Jedi, released in 1983.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "JEDI", + "description": "Star Wars Episode VI: Return of the Jedi, released in 1983.", + "isDeprecated": false, + "deprecationReason": null } ] }, { - \\"kind\\": \\"InputObjectType\\", - \\"name\\": \\"ReviewInput\\", - \\"description\\": \\"The input object sent when someone is creating a new review\\", - \\"fields\\": [ + "kind": "InputObjectType", + "name": "ReviewInput", + "description": "The input object sent when someone is creating a new review", + "fields": [ { - \\"name\\": \\"stars\\", - \\"type\\": \\"Int!\\", - \\"description\\": \\"0-5 stars\\" + "name": "stars", + "type": "Int!", + "description": "0-5 stars" }, { - \\"name\\": \\"commentary\\", - \\"type\\": \\"String\\", - \\"description\\": \\"Comment about the movie, optional\\" + "name": "commentary", + "type": "String", + "description": "Comment about the movie, optional" }, { - \\"name\\": \\"favorite_color\\", - \\"type\\": \\"ColorInput\\", - \\"description\\": \\"Favorite color, optional\\" + "name": "favorite_color", + "type": "ColorInput", + "description": "Favorite color, optional" } ] }, { - \\"kind\\": \\"InputObjectType\\", - \\"name\\": \\"ColorInput\\", - \\"description\\": \\"The input object sent when passing in a color\\", - \\"fields\\": [ + "kind": "InputObjectType", + "name": "ColorInput", + "description": "The input object sent when passing in a color", + "fields": [ { - \\"name\\": \\"red\\", - \\"type\\": \\"Int!\\", - \\"description\\": \\"\\" + "name": "red", + "type": "Int!", + "description": "" }, { - \\"name\\": \\"green\\", - \\"type\\": \\"Int!\\", - \\"description\\": \\"\\" + "name": "green", + "type": "Int!", + "description": "" }, { - \\"name\\": \\"blue\\", - \\"type\\": \\"Int!\\", - \\"description\\": \\"\\" + "name": "blue", + "type": "Int!", + "description": "" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Review\\", - \\"description\\": \\"Represents a review for a movie\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Review", + "description": "Represents a review for a movie", + "ifaces": [], + "fields": [ { - \\"name\\": \\"stars\\", - \\"type\\": \\"Int!\\", - \\"description\\": \\"The number of stars this review gave, 1-5\\" + "name": "stars", + "type": "Int!", + "description": "The number of stars this review gave, 1-5" }, { - \\"name\\": \\"commentary\\", - \\"type\\": \\"String\\", - \\"description\\": \\"Comment about the movie\\" + "name": "commentary", + "type": "String", + "description": "Comment about the movie" } ] } @@ -175,402 +175,402 @@ exports[`JSON output should generate JSON output for a mutation with an enum and exports[`JSON output should generate JSON output for a query with a fragment spread and nested inline fragments 1`] = ` "{ - \\"operations\\": [ + "operations": [ { - \\"filePath\\": \\"GraphQL request\\", - \\"operationName\\": \\"HeroAndDetails\\", - \\"operationType\\": \\"query\\", - \\"rootType\\": \\"Query\\", - \\"variables\\": [], - \\"source\\": \\"query HeroAndDetails {\\\\n hero {\\\\n __typename\\\\n id\\\\n ...CharacterDetails\\\\n }\\\\n}\\", - \\"fields\\": [ - { - \\"responseName\\": \\"hero\\", - \\"fieldName\\": \\"hero\\", - \\"type\\": \\"Character\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false, - \\"fields\\": [ + "filePath": "GraphQL request", + "operationName": "HeroAndDetails", + "operationType": "query", + "rootType": "Query", + "variables": [], + "source": "query HeroAndDetails {\\n hero {\\n __typename\\n id\\n ...CharacterDetails\\n }\\n}", + "fields": [ + { + "responseName": "hero", + "fieldName": "hero", + "type": "Character", + "isConditional": false, + "isDeprecated": false, + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"id\\", - \\"fieldName\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"isConditional\\": false, - \\"description\\": \\"The ID of the character\\", - \\"isDeprecated\\": false + "responseName": "id", + "fieldName": "id", + "type": "ID!", + "isConditional": false, + "description": "The ID of the character", + "isDeprecated": false } ], - \\"fragmentSpreads\\": [ - \\"CharacterDetails\\" + "fragmentSpreads": [ + "CharacterDetails" ], - \\"inlineFragments\\": [] + "inlineFragments": [] } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [], - \\"fragmentsReferenced\\": [ - \\"CharacterDetails\\" + "fragmentSpreads": [], + "inlineFragments": [], + "fragmentsReferenced": [ + "CharacterDetails" ], - \\"sourceWithFragments\\": \\"query HeroAndDetails {\\\\n hero {\\\\n __typename\\\\n id\\\\n ...CharacterDetails\\\\n }\\\\n}\\\\nfragment CharacterDetails on Character {\\\\n __typename\\\\n name\\\\n ... on Droid {\\\\n primaryFunction\\\\n }\\\\n ... on Human {\\\\n height\\\\n }\\\\n}\\", - \\"operationId\\": \\"9ea2d583a2bcf98ddcedc95a807e34011ff3c0f66fabaf01fa0169e4a4159121\\" + "sourceWithFragments": "query HeroAndDetails {\\n hero {\\n __typename\\n id\\n ...CharacterDetails\\n }\\n}\\nfragment CharacterDetails on Character {\\n __typename\\n name\\n ... on Droid {\\n primaryFunction\\n }\\n ... on Human {\\n height\\n }\\n}", + "operationId": "9ea2d583a2bcf98ddcedc95a807e34011ff3c0f66fabaf01fa0169e4a4159121" } ], - \\"fragments\\": [ + "fragments": [ { - \\"typeCondition\\": \\"Character\\", - \\"possibleTypes\\": [ - \\"Human\\", - \\"Droid\\" + "typeCondition": "Character", + "possibleTypes": [ + "Human", + "Droid" ], - \\"fragmentName\\": \\"CharacterDetails\\", - \\"filePath\\": \\"GraphQL request\\", - \\"source\\": \\"fragment CharacterDetails on Character {\\\\n __typename\\\\n name\\\\n ... on Droid {\\\\n primaryFunction\\\\n }\\\\n ... on Human {\\\\n height\\\\n }\\\\n}\\", - \\"fields\\": [ - { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false - }, - { - \\"responseName\\": \\"name\\", - \\"fieldName\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"description\\": \\"The name of the character\\", - \\"isDeprecated\\": false + "fragmentName": "CharacterDetails", + "filePath": "GraphQL request", + "source": "fragment CharacterDetails on Character {\\n __typename\\n name\\n ... on Droid {\\n primaryFunction\\n }\\n ... on Human {\\n height\\n }\\n}", + "fields": [ + { + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false + }, + { + "responseName": "name", + "fieldName": "name", + "type": "String!", + "isConditional": false, + "description": "The name of the character", + "isDeprecated": false } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [ + "fragmentSpreads": [], + "inlineFragments": [ { - \\"typeCondition\\": \\"Droid\\", - \\"possibleTypes\\": [ - \\"Droid\\" + "typeCondition": "Droid", + "possibleTypes": [ + "Droid" ], - \\"fields\\": [ + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"name\\", - \\"fieldName\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"description\\": \\"What others call this droid\\", - \\"isDeprecated\\": false + "responseName": "name", + "fieldName": "name", + "type": "String!", + "isConditional": false, + "description": "What others call this droid", + "isDeprecated": false }, { - \\"responseName\\": \\"primaryFunction\\", - \\"fieldName\\": \\"primaryFunction\\", - \\"type\\": \\"String\\", - \\"isConditional\\": false, - \\"description\\": \\"This droid's primary function\\", - \\"isDeprecated\\": false + "responseName": "primaryFunction", + "fieldName": "primaryFunction", + "type": "String", + "isConditional": false, + "description": "This droid's primary function", + "isDeprecated": false } ], - \\"fragmentSpreads\\": [] + "fragmentSpreads": [] }, { - \\"typeCondition\\": \\"Human\\", - \\"possibleTypes\\": [ - \\"Human\\" + "typeCondition": "Human", + "possibleTypes": [ + "Human" ], - \\"fields\\": [ + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"name\\", - \\"fieldName\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"description\\": \\"What this human calls themselves\\", - \\"isDeprecated\\": false + "responseName": "name", + "fieldName": "name", + "type": "String!", + "isConditional": false, + "description": "What this human calls themselves", + "isDeprecated": false }, { - \\"responseName\\": \\"height\\", - \\"fieldName\\": \\"height\\", - \\"type\\": \\"Float\\", - \\"isConditional\\": false, - \\"description\\": \\"Height in the preferred unit, default is meters\\", - \\"isDeprecated\\": false + "responseName": "height", + "fieldName": "height", + "type": "Float", + "isConditional": false, + "description": "Height in the preferred unit, default is meters", + "isDeprecated": false } ], - \\"fragmentSpreads\\": [] + "fragmentSpreads": [] } ] } ], - \\"typesUsed\\": [ + "typesUsed": [ { - \\"kind\\": \\"InterfaceType\\", - \\"name\\": \\"Character\\", - \\"description\\": \\"A character from the Star Wars universe\\", - \\"fields\\": [ + "kind": "InterfaceType", + "name": "Character", + "description": "A character from the Star Wars universe", + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the character\\" + "name": "id", + "type": "ID!", + "description": "The ID of the character" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"The name of the character\\" + "name": "name", + "type": "String!", + "description": "The name of the character" }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"The friends of the character, or an empty list if they have none\\" + "name": "friends", + "type": "[Character]", + "description": "The friends of the character, or an empty list if they have none" }, { - \\"name\\": \\"friendsConnection\\", - \\"type\\": \\"FriendsConnection!\\", - \\"description\\": \\"The friends of the character exposed as a connection with edges\\" + "name": "friendsConnection", + "type": "FriendsConnection!", + "description": "The friends of the character exposed as a connection with edges" }, { - \\"name\\": \\"appearsIn\\", - \\"type\\": \\"[Episode]!\\", - \\"description\\": \\"The movies this character appears in\\" + "name": "appearsIn", + "type": "[Episode]!", + "description": "The movies this character appears in" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Human\\", - \\"description\\": \\"A humanoid creature from the Star Wars universe\\", - \\"ifaces\\": [ + "kind": "ObjectType", + "name": "Human", + "description": "A humanoid creature from the Star Wars universe", + "ifaces": [ { - \\"name\\": \\"Character\\", - \\"description\\": \\"A character from the Star Wars universe\\" + "name": "Character", + "description": "A character from the Star Wars universe" } ], - \\"fields\\": [ + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the human\\" + "name": "id", + "type": "ID!", + "description": "The ID of the human" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"What this human calls themselves\\" + "name": "name", + "type": "String!", + "description": "What this human calls themselves" }, { - \\"name\\": \\"homePlanet\\", - \\"type\\": \\"String\\", - \\"description\\": \\"The home planet of the human, or null if unknown\\" + "name": "homePlanet", + "type": "String", + "description": "The home planet of the human, or null if unknown" }, { - \\"name\\": \\"height\\", - \\"type\\": \\"Float\\", - \\"description\\": \\"Height in the preferred unit, default is meters\\" + "name": "height", + "type": "Float", + "description": "Height in the preferred unit, default is meters" }, { - \\"name\\": \\"mass\\", - \\"type\\": \\"Float\\", - \\"description\\": \\"Mass in kilograms, or null if unknown\\" + "name": "mass", + "type": "Float", + "description": "Mass in kilograms, or null if unknown" }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"This human's friends, or an empty list if they have none\\" + "name": "friends", + "type": "[Character]", + "description": "This human's friends, or an empty list if they have none" }, { - \\"name\\": \\"friendsConnection\\", - \\"type\\": \\"FriendsConnection!\\", - \\"description\\": \\"The friends of the human exposed as a connection with edges\\" + "name": "friendsConnection", + "type": "FriendsConnection!", + "description": "The friends of the human exposed as a connection with edges" }, { - \\"name\\": \\"appearsIn\\", - \\"type\\": \\"[Episode]!\\", - \\"description\\": \\"The movies this human appears in\\" + "name": "appearsIn", + "type": "[Episode]!", + "description": "The movies this human appears in" }, { - \\"name\\": \\"starships\\", - \\"type\\": \\"[Starship]\\", - \\"description\\": \\"A list of starships this person has piloted, or an empty list if none\\" + "name": "starships", + "type": "[Starship]", + "description": "A list of starships this person has piloted, or an empty list if none" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"FriendsConnection\\", - \\"description\\": \\"A connection object for a character's friends\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "FriendsConnection", + "description": "A connection object for a character's friends", + "ifaces": [], + "fields": [ { - \\"name\\": \\"totalCount\\", - \\"type\\": \\"Int\\", - \\"description\\": \\"The total number of friends\\" + "name": "totalCount", + "type": "Int", + "description": "The total number of friends" }, { - \\"name\\": \\"edges\\", - \\"type\\": \\"[FriendsEdge]\\", - \\"description\\": \\"The edges for each of the character's friends.\\" + "name": "edges", + "type": "[FriendsEdge]", + "description": "The edges for each of the character's friends." }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"A list of the friends, as a convenience when edges are not needed.\\" + "name": "friends", + "type": "[Character]", + "description": "A list of the friends, as a convenience when edges are not needed." }, { - \\"name\\": \\"pageInfo\\", - \\"type\\": \\"PageInfo!\\", - \\"description\\": \\"Information for paginating this connection\\" + "name": "pageInfo", + "type": "PageInfo!", + "description": "Information for paginating this connection" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"FriendsEdge\\", - \\"description\\": \\"An edge object for a character's friends\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "FriendsEdge", + "description": "An edge object for a character's friends", + "ifaces": [], + "fields": [ { - \\"name\\": \\"cursor\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"A cursor used for pagination\\" + "name": "cursor", + "type": "ID!", + "description": "A cursor used for pagination" }, { - \\"name\\": \\"node\\", - \\"type\\": \\"Character\\", - \\"description\\": \\"The character represented by this friendship edge\\" + "name": "node", + "type": "Character", + "description": "The character represented by this friendship edge" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"PageInfo\\", - \\"description\\": \\"Information for paginating this connection\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "PageInfo", + "description": "Information for paginating this connection", + "ifaces": [], + "fields": [ { - \\"name\\": \\"startCursor\\", - \\"type\\": \\"ID\\", - \\"description\\": \\"\\" + "name": "startCursor", + "type": "ID", + "description": "" }, { - \\"name\\": \\"endCursor\\", - \\"type\\": \\"ID\\", - \\"description\\": \\"\\" + "name": "endCursor", + "type": "ID", + "description": "" }, { - \\"name\\": \\"hasNextPage\\", - \\"type\\": \\"Boolean!\\", - \\"description\\": \\"\\" + "name": "hasNextPage", + "type": "Boolean!", + "description": "" } ] }, { - \\"kind\\": \\"EnumType\\", - \\"name\\": \\"Episode\\", - \\"description\\": \\"The episodes in the Star Wars trilogy\\", - \\"values\\": [ + "kind": "EnumType", + "name": "Episode", + "description": "The episodes in the Star Wars trilogy", + "values": [ { - \\"name\\": \\"NEWHOPE\\", - \\"description\\": \\"Star Wars Episode IV: A New Hope, released in 1977.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "NEWHOPE", + "description": "Star Wars Episode IV: A New Hope, released in 1977.", + "isDeprecated": false, + "deprecationReason": null }, { - \\"name\\": \\"EMPIRE\\", - \\"description\\": \\"Star Wars Episode V: The Empire Strikes Back, released in 1980.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "EMPIRE", + "description": "Star Wars Episode V: The Empire Strikes Back, released in 1980.", + "isDeprecated": false, + "deprecationReason": null }, { - \\"name\\": \\"JEDI\\", - \\"description\\": \\"Star Wars Episode VI: Return of the Jedi, released in 1983.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "JEDI", + "description": "Star Wars Episode VI: Return of the Jedi, released in 1983.", + "isDeprecated": false, + "deprecationReason": null } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Starship\\", - \\"description\\": \\"\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Starship", + "description": "", + "ifaces": [], + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the starship\\" + "name": "id", + "type": "ID!", + "description": "The ID of the starship" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"The name of the starship\\" + "name": "name", + "type": "String!", + "description": "The name of the starship" }, { - \\"name\\": \\"length\\", - \\"type\\": \\"Float\\", - \\"description\\": \\"Length of the starship, along the longest axis\\" + "name": "length", + "type": "Float", + "description": "Length of the starship, along the longest axis" }, { - \\"name\\": \\"coordinates\\", - \\"type\\": \\"[[Float!]!]\\", - \\"description\\": \\"\\" + "name": "coordinates", + "type": "[[Float!]!]", + "description": "" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Droid\\", - \\"description\\": \\"An autonomous mechanical character in the Star Wars universe\\", - \\"ifaces\\": [ + "kind": "ObjectType", + "name": "Droid", + "description": "An autonomous mechanical character in the Star Wars universe", + "ifaces": [ { - \\"name\\": \\"Character\\", - \\"description\\": \\"A character from the Star Wars universe\\" + "name": "Character", + "description": "A character from the Star Wars universe" } ], - \\"fields\\": [ + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the droid\\" + "name": "id", + "type": "ID!", + "description": "The ID of the droid" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"What others call this droid\\" + "name": "name", + "type": "String!", + "description": "What others call this droid" }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"This droid's friends, or an empty list if they have none\\" + "name": "friends", + "type": "[Character]", + "description": "This droid's friends, or an empty list if they have none" }, { - \\"name\\": \\"friendsConnection\\", - \\"type\\": \\"FriendsConnection!\\", - \\"description\\": \\"The friends of the droid exposed as a connection with edges\\" + "name": "friendsConnection", + "type": "FriendsConnection!", + "description": "The friends of the droid exposed as a connection with edges" }, { - \\"name\\": \\"appearsIn\\", - \\"type\\": \\"[Episode]!\\", - \\"description\\": \\"The movies this droid appears in\\" + "name": "appearsIn", + "type": "[Episode]!", + "description": "The movies this droid appears in" }, { - \\"name\\": \\"primaryFunction\\", - \\"type\\": \\"String\\", - \\"description\\": \\"This droid's primary function\\" + "name": "primaryFunction", + "type": "String", + "description": "This droid's primary function" } ] } @@ -580,330 +580,330 @@ exports[`JSON output should generate JSON output for a query with a fragment spr exports[`JSON output should generate JSON output for a query with a nested selection set 1`] = ` "{ - \\"operations\\": [ + "operations": [ { - \\"filePath\\": \\"GraphQL request\\", - \\"operationName\\": \\"HeroAndFriendsNames\\", - \\"operationType\\": \\"query\\", - \\"rootType\\": \\"Query\\", - \\"variables\\": [], - \\"source\\": \\"query HeroAndFriendsNames {\\\\n hero {\\\\n __typename\\\\n name\\\\n friends {\\\\n __typename\\\\n name\\\\n }\\\\n }\\\\n}\\", - \\"fields\\": [ - { - \\"responseName\\": \\"hero\\", - \\"fieldName\\": \\"hero\\", - \\"type\\": \\"Character\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false, - \\"fields\\": [ + "filePath": "GraphQL request", + "operationName": "HeroAndFriendsNames", + "operationType": "query", + "rootType": "Query", + "variables": [], + "source": "query HeroAndFriendsNames {\\n hero {\\n __typename\\n name\\n friends {\\n __typename\\n name\\n }\\n }\\n}", + "fields": [ + { + "responseName": "hero", + "fieldName": "hero", + "type": "Character", + "isConditional": false, + "isDeprecated": false, + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"name\\", - \\"fieldName\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"description\\": \\"The name of the character\\", - \\"isDeprecated\\": false + "responseName": "name", + "fieldName": "name", + "type": "String!", + "isConditional": false, + "description": "The name of the character", + "isDeprecated": false }, { - \\"responseName\\": \\"friends\\", - \\"fieldName\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"isConditional\\": false, - \\"description\\": \\"The friends of the character, or an empty list if they have none\\", - \\"isDeprecated\\": false, - \\"fields\\": [ + "responseName": "friends", + "fieldName": "friends", + "type": "[Character]", + "isConditional": false, + "description": "The friends of the character, or an empty list if they have none", + "isDeprecated": false, + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"name\\", - \\"fieldName\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"description\\": \\"The name of the character\\", - \\"isDeprecated\\": false + "responseName": "name", + "fieldName": "name", + "type": "String!", + "isConditional": false, + "description": "The name of the character", + "isDeprecated": false } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [] + "fragmentSpreads": [], + "inlineFragments": [] } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [] + "fragmentSpreads": [], + "inlineFragments": [] } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [], - \\"fragmentsReferenced\\": [], - \\"sourceWithFragments\\": \\"query HeroAndFriendsNames {\\\\n hero {\\\\n __typename\\\\n name\\\\n friends {\\\\n __typename\\\\n name\\\\n }\\\\n }\\\\n}\\", - \\"operationId\\": \\"d424c7c31d5147b382972b3c316ace3d51f2f039b53852a280d707df2848f715\\" + "fragmentSpreads": [], + "inlineFragments": [], + "fragmentsReferenced": [], + "sourceWithFragments": "query HeroAndFriendsNames {\\n hero {\\n __typename\\n name\\n friends {\\n __typename\\n name\\n }\\n }\\n}", + "operationId": "d424c7c31d5147b382972b3c316ace3d51f2f039b53852a280d707df2848f715" } ], - \\"fragments\\": [], - \\"typesUsed\\": [ + "fragments": [], + "typesUsed": [ { - \\"kind\\": \\"InterfaceType\\", - \\"name\\": \\"Character\\", - \\"description\\": \\"A character from the Star Wars universe\\", - \\"fields\\": [ + "kind": "InterfaceType", + "name": "Character", + "description": "A character from the Star Wars universe", + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the character\\" + "name": "id", + "type": "ID!", + "description": "The ID of the character" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"The name of the character\\" + "name": "name", + "type": "String!", + "description": "The name of the character" }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"The friends of the character, or an empty list if they have none\\" + "name": "friends", + "type": "[Character]", + "description": "The friends of the character, or an empty list if they have none" }, { - \\"name\\": \\"friendsConnection\\", - \\"type\\": \\"FriendsConnection!\\", - \\"description\\": \\"The friends of the character exposed as a connection with edges\\" + "name": "friendsConnection", + "type": "FriendsConnection!", + "description": "The friends of the character exposed as a connection with edges" }, { - \\"name\\": \\"appearsIn\\", - \\"type\\": \\"[Episode]!\\", - \\"description\\": \\"The movies this character appears in\\" + "name": "appearsIn", + "type": "[Episode]!", + "description": "The movies this character appears in" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Human\\", - \\"description\\": \\"A humanoid creature from the Star Wars universe\\", - \\"ifaces\\": [ + "kind": "ObjectType", + "name": "Human", + "description": "A humanoid creature from the Star Wars universe", + "ifaces": [ { - \\"name\\": \\"Character\\", - \\"description\\": \\"A character from the Star Wars universe\\" + "name": "Character", + "description": "A character from the Star Wars universe" } ], - \\"fields\\": [ + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the human\\" + "name": "id", + "type": "ID!", + "description": "The ID of the human" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"What this human calls themselves\\" + "name": "name", + "type": "String!", + "description": "What this human calls themselves" }, { - \\"name\\": \\"homePlanet\\", - \\"type\\": \\"String\\", - \\"description\\": \\"The home planet of the human, or null if unknown\\" + "name": "homePlanet", + "type": "String", + "description": "The home planet of the human, or null if unknown" }, { - \\"name\\": \\"height\\", - \\"type\\": \\"Float\\", - \\"description\\": \\"Height in the preferred unit, default is meters\\" + "name": "height", + "type": "Float", + "description": "Height in the preferred unit, default is meters" }, { - \\"name\\": \\"mass\\", - \\"type\\": \\"Float\\", - \\"description\\": \\"Mass in kilograms, or null if unknown\\" + "name": "mass", + "type": "Float", + "description": "Mass in kilograms, or null if unknown" }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"This human's friends, or an empty list if they have none\\" + "name": "friends", + "type": "[Character]", + "description": "This human's friends, or an empty list if they have none" }, { - \\"name\\": \\"friendsConnection\\", - \\"type\\": \\"FriendsConnection!\\", - \\"description\\": \\"The friends of the human exposed as a connection with edges\\" + "name": "friendsConnection", + "type": "FriendsConnection!", + "description": "The friends of the human exposed as a connection with edges" }, { - \\"name\\": \\"appearsIn\\", - \\"type\\": \\"[Episode]!\\", - \\"description\\": \\"The movies this human appears in\\" + "name": "appearsIn", + "type": "[Episode]!", + "description": "The movies this human appears in" }, { - \\"name\\": \\"starships\\", - \\"type\\": \\"[Starship]\\", - \\"description\\": \\"A list of starships this person has piloted, or an empty list if none\\" + "name": "starships", + "type": "[Starship]", + "description": "A list of starships this person has piloted, or an empty list if none" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"FriendsConnection\\", - \\"description\\": \\"A connection object for a character's friends\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "FriendsConnection", + "description": "A connection object for a character's friends", + "ifaces": [], + "fields": [ { - \\"name\\": \\"totalCount\\", - \\"type\\": \\"Int\\", - \\"description\\": \\"The total number of friends\\" + "name": "totalCount", + "type": "Int", + "description": "The total number of friends" }, { - \\"name\\": \\"edges\\", - \\"type\\": \\"[FriendsEdge]\\", - \\"description\\": \\"The edges for each of the character's friends.\\" + "name": "edges", + "type": "[FriendsEdge]", + "description": "The edges for each of the character's friends." }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"A list of the friends, as a convenience when edges are not needed.\\" + "name": "friends", + "type": "[Character]", + "description": "A list of the friends, as a convenience when edges are not needed." }, { - \\"name\\": \\"pageInfo\\", - \\"type\\": \\"PageInfo!\\", - \\"description\\": \\"Information for paginating this connection\\" + "name": "pageInfo", + "type": "PageInfo!", + "description": "Information for paginating this connection" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"FriendsEdge\\", - \\"description\\": \\"An edge object for a character's friends\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "FriendsEdge", + "description": "An edge object for a character's friends", + "ifaces": [], + "fields": [ { - \\"name\\": \\"cursor\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"A cursor used for pagination\\" + "name": "cursor", + "type": "ID!", + "description": "A cursor used for pagination" }, { - \\"name\\": \\"node\\", - \\"type\\": \\"Character\\", - \\"description\\": \\"The character represented by this friendship edge\\" + "name": "node", + "type": "Character", + "description": "The character represented by this friendship edge" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"PageInfo\\", - \\"description\\": \\"Information for paginating this connection\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "PageInfo", + "description": "Information for paginating this connection", + "ifaces": [], + "fields": [ { - \\"name\\": \\"startCursor\\", - \\"type\\": \\"ID\\", - \\"description\\": \\"\\" + "name": "startCursor", + "type": "ID", + "description": "" }, { - \\"name\\": \\"endCursor\\", - \\"type\\": \\"ID\\", - \\"description\\": \\"\\" + "name": "endCursor", + "type": "ID", + "description": "" }, { - \\"name\\": \\"hasNextPage\\", - \\"type\\": \\"Boolean!\\", - \\"description\\": \\"\\" + "name": "hasNextPage", + "type": "Boolean!", + "description": "" } ] }, { - \\"kind\\": \\"EnumType\\", - \\"name\\": \\"Episode\\", - \\"description\\": \\"The episodes in the Star Wars trilogy\\", - \\"values\\": [ + "kind": "EnumType", + "name": "Episode", + "description": "The episodes in the Star Wars trilogy", + "values": [ { - \\"name\\": \\"NEWHOPE\\", - \\"description\\": \\"Star Wars Episode IV: A New Hope, released in 1977.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "NEWHOPE", + "description": "Star Wars Episode IV: A New Hope, released in 1977.", + "isDeprecated": false, + "deprecationReason": null }, { - \\"name\\": \\"EMPIRE\\", - \\"description\\": \\"Star Wars Episode V: The Empire Strikes Back, released in 1980.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "EMPIRE", + "description": "Star Wars Episode V: The Empire Strikes Back, released in 1980.", + "isDeprecated": false, + "deprecationReason": null }, { - \\"name\\": \\"JEDI\\", - \\"description\\": \\"Star Wars Episode VI: Return of the Jedi, released in 1983.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "JEDI", + "description": "Star Wars Episode VI: Return of the Jedi, released in 1983.", + "isDeprecated": false, + "deprecationReason": null } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Starship\\", - \\"description\\": \\"\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Starship", + "description": "", + "ifaces": [], + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the starship\\" + "name": "id", + "type": "ID!", + "description": "The ID of the starship" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"The name of the starship\\" + "name": "name", + "type": "String!", + "description": "The name of the starship" }, { - \\"name\\": \\"length\\", - \\"type\\": \\"Float\\", - \\"description\\": \\"Length of the starship, along the longest axis\\" + "name": "length", + "type": "Float", + "description": "Length of the starship, along the longest axis" }, { - \\"name\\": \\"coordinates\\", - \\"type\\": \\"[[Float!]!]\\", - \\"description\\": \\"\\" + "name": "coordinates", + "type": "[[Float!]!]", + "description": "" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Droid\\", - \\"description\\": \\"An autonomous mechanical character in the Star Wars universe\\", - \\"ifaces\\": [ + "kind": "ObjectType", + "name": "Droid", + "description": "An autonomous mechanical character in the Star Wars universe", + "ifaces": [ { - \\"name\\": \\"Character\\", - \\"description\\": \\"A character from the Star Wars universe\\" + "name": "Character", + "description": "A character from the Star Wars universe" } ], - \\"fields\\": [ + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the droid\\" + "name": "id", + "type": "ID!", + "description": "The ID of the droid" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"What others call this droid\\" + "name": "name", + "type": "String!", + "description": "What others call this droid" }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"This droid's friends, or an empty list if they have none\\" + "name": "friends", + "type": "[Character]", + "description": "This droid's friends, or an empty list if they have none" }, { - \\"name\\": \\"friendsConnection\\", - \\"type\\": \\"FriendsConnection!\\", - \\"description\\": \\"The friends of the droid exposed as a connection with edges\\" + "name": "friendsConnection", + "type": "FriendsConnection!", + "description": "The friends of the droid exposed as a connection with edges" }, { - \\"name\\": \\"appearsIn\\", - \\"type\\": \\"[Episode]!\\", - \\"description\\": \\"The movies this droid appears in\\" + "name": "appearsIn", + "type": "[Episode]!", + "description": "The movies this droid appears in" }, { - \\"name\\": \\"primaryFunction\\", - \\"type\\": \\"String\\", - \\"description\\": \\"This droid's primary function\\" + "name": "primaryFunction", + "type": "String", + "description": "This droid's primary function" } ] } @@ -913,318 +913,318 @@ exports[`JSON output should generate JSON output for a query with a nested selec exports[`JSON output should generate JSON output for a query with an enum variable 1`] = ` "{ - \\"operations\\": [ + "operations": [ { - \\"filePath\\": \\"GraphQL request\\", - \\"operationName\\": \\"HeroName\\", - \\"operationType\\": \\"query\\", - \\"rootType\\": \\"Query\\", - \\"variables\\": [ - { - \\"name\\": \\"episode\\", - \\"type\\": \\"Episode\\" + "filePath": "GraphQL request", + "operationName": "HeroName", + "operationType": "query", + "rootType": "Query", + "variables": [ + { + "name": "episode", + "type": "Episode" } ], - \\"source\\": \\"query HeroName($episode: Episode) {\\\\n hero(episode: $episode) {\\\\n __typename\\\\n name\\\\n }\\\\n}\\", - \\"fields\\": [ + "source": "query HeroName($episode: Episode) {\\n hero(episode: $episode) {\\n __typename\\n name\\n }\\n}", + "fields": [ { - \\"responseName\\": \\"hero\\", - \\"fieldName\\": \\"hero\\", - \\"type\\": \\"Character\\", - \\"args\\": [ + "responseName": "hero", + "fieldName": "hero", + "type": "Character", + "args": [ { - \\"name\\": \\"episode\\", - \\"value\\": { - \\"kind\\": \\"Variable\\", - \\"variableName\\": \\"episode\\" + "name": "episode", + "value": { + "kind": "Variable", + "variableName": "episode" }, - \\"type\\": \\"Episode\\" + "type": "Episode" } ], - \\"isConditional\\": false, - \\"isDeprecated\\": false, - \\"fields\\": [ + "isConditional": false, + "isDeprecated": false, + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"name\\", - \\"fieldName\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"description\\": \\"The name of the character\\", - \\"isDeprecated\\": false + "responseName": "name", + "fieldName": "name", + "type": "String!", + "isConditional": false, + "description": "The name of the character", + "isDeprecated": false } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [] + "fragmentSpreads": [], + "inlineFragments": [] } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [], - \\"fragmentsReferenced\\": [], - \\"sourceWithFragments\\": \\"query HeroName($episode: Episode) {\\\\n hero(episode: $episode) {\\\\n __typename\\\\n name\\\\n }\\\\n}\\", - \\"operationId\\": \\"f6e76545cd03aa21368d9969cb39447f6e836a16717823281803778e7805d671\\" + "fragmentSpreads": [], + "inlineFragments": [], + "fragmentsReferenced": [], + "sourceWithFragments": "query HeroName($episode: Episode) {\\n hero(episode: $episode) {\\n __typename\\n name\\n }\\n}", + "operationId": "f6e76545cd03aa21368d9969cb39447f6e836a16717823281803778e7805d671" } ], - \\"fragments\\": [], - \\"typesUsed\\": [ + "fragments": [], + "typesUsed": [ { - \\"kind\\": \\"EnumType\\", - \\"name\\": \\"Episode\\", - \\"description\\": \\"The episodes in the Star Wars trilogy\\", - \\"values\\": [ + "kind": "EnumType", + "name": "Episode", + "description": "The episodes in the Star Wars trilogy", + "values": [ { - \\"name\\": \\"NEWHOPE\\", - \\"description\\": \\"Star Wars Episode IV: A New Hope, released in 1977.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "NEWHOPE", + "description": "Star Wars Episode IV: A New Hope, released in 1977.", + "isDeprecated": false, + "deprecationReason": null }, { - \\"name\\": \\"EMPIRE\\", - \\"description\\": \\"Star Wars Episode V: The Empire Strikes Back, released in 1980.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "EMPIRE", + "description": "Star Wars Episode V: The Empire Strikes Back, released in 1980.", + "isDeprecated": false, + "deprecationReason": null }, { - \\"name\\": \\"JEDI\\", - \\"description\\": \\"Star Wars Episode VI: Return of the Jedi, released in 1983.\\", - \\"isDeprecated\\": false, - \\"deprecationReason\\": null + "name": "JEDI", + "description": "Star Wars Episode VI: Return of the Jedi, released in 1983.", + "isDeprecated": false, + "deprecationReason": null } ] }, { - \\"kind\\": \\"InterfaceType\\", - \\"name\\": \\"Character\\", - \\"description\\": \\"A character from the Star Wars universe\\", - \\"fields\\": [ + "kind": "InterfaceType", + "name": "Character", + "description": "A character from the Star Wars universe", + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the character\\" + "name": "id", + "type": "ID!", + "description": "The ID of the character" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"The name of the character\\" + "name": "name", + "type": "String!", + "description": "The name of the character" }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"The friends of the character, or an empty list if they have none\\" + "name": "friends", + "type": "[Character]", + "description": "The friends of the character, or an empty list if they have none" }, { - \\"name\\": \\"friendsConnection\\", - \\"type\\": \\"FriendsConnection!\\", - \\"description\\": \\"The friends of the character exposed as a connection with edges\\" + "name": "friendsConnection", + "type": "FriendsConnection!", + "description": "The friends of the character exposed as a connection with edges" }, { - \\"name\\": \\"appearsIn\\", - \\"type\\": \\"[Episode]!\\", - \\"description\\": \\"The movies this character appears in\\" + "name": "appearsIn", + "type": "[Episode]!", + "description": "The movies this character appears in" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Human\\", - \\"description\\": \\"A humanoid creature from the Star Wars universe\\", - \\"ifaces\\": [ + "kind": "ObjectType", + "name": "Human", + "description": "A humanoid creature from the Star Wars universe", + "ifaces": [ { - \\"name\\": \\"Character\\", - \\"description\\": \\"A character from the Star Wars universe\\" + "name": "Character", + "description": "A character from the Star Wars universe" } ], - \\"fields\\": [ + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the human\\" + "name": "id", + "type": "ID!", + "description": "The ID of the human" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"What this human calls themselves\\" + "name": "name", + "type": "String!", + "description": "What this human calls themselves" }, { - \\"name\\": \\"homePlanet\\", - \\"type\\": \\"String\\", - \\"description\\": \\"The home planet of the human, or null if unknown\\" + "name": "homePlanet", + "type": "String", + "description": "The home planet of the human, or null if unknown" }, { - \\"name\\": \\"height\\", - \\"type\\": \\"Float\\", - \\"description\\": \\"Height in the preferred unit, default is meters\\" + "name": "height", + "type": "Float", + "description": "Height in the preferred unit, default is meters" }, { - \\"name\\": \\"mass\\", - \\"type\\": \\"Float\\", - \\"description\\": \\"Mass in kilograms, or null if unknown\\" + "name": "mass", + "type": "Float", + "description": "Mass in kilograms, or null if unknown" }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"This human's friends, or an empty list if they have none\\" + "name": "friends", + "type": "[Character]", + "description": "This human's friends, or an empty list if they have none" }, { - \\"name\\": \\"friendsConnection\\", - \\"type\\": \\"FriendsConnection!\\", - \\"description\\": \\"The friends of the human exposed as a connection with edges\\" + "name": "friendsConnection", + "type": "FriendsConnection!", + "description": "The friends of the human exposed as a connection with edges" }, { - \\"name\\": \\"appearsIn\\", - \\"type\\": \\"[Episode]!\\", - \\"description\\": \\"The movies this human appears in\\" + "name": "appearsIn", + "type": "[Episode]!", + "description": "The movies this human appears in" }, { - \\"name\\": \\"starships\\", - \\"type\\": \\"[Starship]\\", - \\"description\\": \\"A list of starships this person has piloted, or an empty list if none\\" + "name": "starships", + "type": "[Starship]", + "description": "A list of starships this person has piloted, or an empty list if none" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"FriendsConnection\\", - \\"description\\": \\"A connection object for a character's friends\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "FriendsConnection", + "description": "A connection object for a character's friends", + "ifaces": [], + "fields": [ { - \\"name\\": \\"totalCount\\", - \\"type\\": \\"Int\\", - \\"description\\": \\"The total number of friends\\" + "name": "totalCount", + "type": "Int", + "description": "The total number of friends" }, { - \\"name\\": \\"edges\\", - \\"type\\": \\"[FriendsEdge]\\", - \\"description\\": \\"The edges for each of the character's friends.\\" + "name": "edges", + "type": "[FriendsEdge]", + "description": "The edges for each of the character's friends." }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"A list of the friends, as a convenience when edges are not needed.\\" + "name": "friends", + "type": "[Character]", + "description": "A list of the friends, as a convenience when edges are not needed." }, { - \\"name\\": \\"pageInfo\\", - \\"type\\": \\"PageInfo!\\", - \\"description\\": \\"Information for paginating this connection\\" + "name": "pageInfo", + "type": "PageInfo!", + "description": "Information for paginating this connection" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"FriendsEdge\\", - \\"description\\": \\"An edge object for a character's friends\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "FriendsEdge", + "description": "An edge object for a character's friends", + "ifaces": [], + "fields": [ { - \\"name\\": \\"cursor\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"A cursor used for pagination\\" + "name": "cursor", + "type": "ID!", + "description": "A cursor used for pagination" }, { - \\"name\\": \\"node\\", - \\"type\\": \\"Character\\", - \\"description\\": \\"The character represented by this friendship edge\\" + "name": "node", + "type": "Character", + "description": "The character represented by this friendship edge" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"PageInfo\\", - \\"description\\": \\"Information for paginating this connection\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "PageInfo", + "description": "Information for paginating this connection", + "ifaces": [], + "fields": [ { - \\"name\\": \\"startCursor\\", - \\"type\\": \\"ID\\", - \\"description\\": \\"\\" + "name": "startCursor", + "type": "ID", + "description": "" }, { - \\"name\\": \\"endCursor\\", - \\"type\\": \\"ID\\", - \\"description\\": \\"\\" + "name": "endCursor", + "type": "ID", + "description": "" }, { - \\"name\\": \\"hasNextPage\\", - \\"type\\": \\"Boolean!\\", - \\"description\\": \\"\\" + "name": "hasNextPage", + "type": "Boolean!", + "description": "" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Starship\\", - \\"description\\": \\"\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Starship", + "description": "", + "ifaces": [], + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the starship\\" + "name": "id", + "type": "ID!", + "description": "The ID of the starship" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"The name of the starship\\" + "name": "name", + "type": "String!", + "description": "The name of the starship" }, { - \\"name\\": \\"length\\", - \\"type\\": \\"Float\\", - \\"description\\": \\"Length of the starship, along the longest axis\\" + "name": "length", + "type": "Float", + "description": "Length of the starship, along the longest axis" }, { - \\"name\\": \\"coordinates\\", - \\"type\\": \\"[[Float!]!]\\", - \\"description\\": \\"\\" + "name": "coordinates", + "type": "[[Float!]!]", + "description": "" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Droid\\", - \\"description\\": \\"An autonomous mechanical character in the Star Wars universe\\", - \\"ifaces\\": [ + "kind": "ObjectType", + "name": "Droid", + "description": "An autonomous mechanical character in the Star Wars universe", + "ifaces": [ { - \\"name\\": \\"Character\\", - \\"description\\": \\"A character from the Star Wars universe\\" + "name": "Character", + "description": "A character from the Star Wars universe" } ], - \\"fields\\": [ + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": \\"The ID of the droid\\" + "name": "id", + "type": "ID!", + "description": "The ID of the droid" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": \\"What others call this droid\\" + "name": "name", + "type": "String!", + "description": "What others call this droid" }, { - \\"name\\": \\"friends\\", - \\"type\\": \\"[Character]\\", - \\"description\\": \\"This droid's friends, or an empty list if they have none\\" + "name": "friends", + "type": "[Character]", + "description": "This droid's friends, or an empty list if they have none" }, { - \\"name\\": \\"friendsConnection\\", - \\"type\\": \\"FriendsConnection!\\", - \\"description\\": \\"The friends of the droid exposed as a connection with edges\\" + "name": "friendsConnection", + "type": "FriendsConnection!", + "description": "The friends of the droid exposed as a connection with edges" }, { - \\"name\\": \\"appearsIn\\", - \\"type\\": \\"[Episode]!\\", - \\"description\\": \\"The movies this droid appears in\\" + "name": "appearsIn", + "type": "[Episode]!", + "description": "The movies this droid appears in" }, { - \\"name\\": \\"primaryFunction\\", - \\"type\\": \\"String\\", - \\"description\\": \\"This droid's primary function\\" + "name": "primaryFunction", + "type": "String", + "description": "This droid's primary function" } ] } @@ -1234,117 +1234,117 @@ exports[`JSON output should generate JSON output for a query with an enum variab exports[`JSON output should generate JSON output for an input object type with default field values 1`] = ` "{ - \\"operations\\": [ + "operations": [ { - \\"filePath\\": \\"GraphQL request\\", - \\"operationName\\": \\"QueryWithComplexInput\\", - \\"operationType\\": \\"query\\", - \\"rootType\\": \\"Query\\", - \\"variables\\": [ - { - \\"name\\": \\"input\\", - \\"type\\": \\"ComplexInput\\" + "filePath": "GraphQL request", + "operationName": "QueryWithComplexInput", + "operationType": "query", + "rootType": "Query", + "variables": [ + { + "name": "input", + "type": "ComplexInput" } ], - \\"source\\": \\"query QueryWithComplexInput($input: ComplexInput) {\\\\n someField(input: $input)\\\\n}\\", - \\"fields\\": [ + "source": "query QueryWithComplexInput($input: ComplexInput) {\\n someField(input: $input)\\n}", + "fields": [ { - \\"responseName\\": \\"someField\\", - \\"fieldName\\": \\"someField\\", - \\"type\\": \\"String!\\", - \\"args\\": [ + "responseName": "someField", + "fieldName": "someField", + "type": "String!", + "args": [ { - \\"name\\": \\"input\\", - \\"value\\": { - \\"kind\\": \\"Variable\\", - \\"variableName\\": \\"input\\" + "name": "input", + "value": { + "kind": "Variable", + "variableName": "input" }, - \\"type\\": \\"ComplexInput!\\" + "type": "ComplexInput!" } ], - \\"isConditional\\": false, - \\"isDeprecated\\": false + "isConditional": false, + "isDeprecated": false } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [], - \\"fragmentsReferenced\\": [], - \\"sourceWithFragments\\": \\"query QueryWithComplexInput($input: ComplexInput) {\\\\n someField(input: $input)\\\\n}\\", - \\"operationId\\": \\"55e208ec5def01b99b65c64b666d06e95558a6e455c52eb5c2307c4775afb805\\" + "fragmentSpreads": [], + "inlineFragments": [], + "fragmentsReferenced": [], + "sourceWithFragments": "query QueryWithComplexInput($input: ComplexInput) {\\n someField(input: $input)\\n}", + "operationId": "55e208ec5def01b99b65c64b666d06e95558a6e455c52eb5c2307c4775afb805" } ], - \\"fragments\\": [], - \\"typesUsed\\": [ + "fragments": [], + "typesUsed": [ { - \\"kind\\": \\"InputObjectType\\", - \\"name\\": \\"ComplexInput\\", - \\"fields\\": [ + "kind": "InputObjectType", + "name": "ComplexInput", + "fields": [ { - \\"name\\": \\"string\\", - \\"type\\": \\"String\\", - \\"defaultValue\\": \\"Hello\\" + "name": "string", + "type": "String", + "defaultValue": "Hello" }, { - \\"name\\": \\"customScalar\\", - \\"type\\": \\"Date\\", - \\"defaultValue\\": \\"2017-04-16\\" + "name": "customScalar", + "type": "Date", + "defaultValue": "2017-04-16" }, { - \\"name\\": \\"listOfString\\", - \\"type\\": \\"[String]\\", - \\"defaultValue\\": [ - \\"test1\\", - \\"test2\\", - \\"test3\\" + "name": "listOfString", + "type": "[String]", + "defaultValue": [ + "test1", + "test2", + "test3" ] }, { - \\"name\\": \\"listOfInt\\", - \\"type\\": \\"[Int]\\", - \\"defaultValue\\": [ + "name": "listOfInt", + "type": "[Int]", + "defaultValue": [ 1, 2, 3 ] }, { - \\"name\\": \\"listOfEnums\\", - \\"type\\": \\"[Episode]\\", - \\"defaultValue\\": [ - \\"JEDI\\", - \\"EMPIRE\\" + "name": "listOfEnums", + "type": "[Episode]", + "defaultValue": [ + "JEDI", + "EMPIRE" ] }, { - \\"name\\": \\"listOfCustomScalar\\", - \\"type\\": \\"[Date]\\", - \\"defaultValue\\": [ - \\"2017-04-16\\", - \\"2017-04-17\\", - \\"2017-04-18\\" + "name": "listOfCustomScalar", + "type": "[Date]", + "defaultValue": [ + "2017-04-16", + "2017-04-17", + "2017-04-18" ] } ] }, { - \\"kind\\": \\"ScalarType\\", - \\"name\\": \\"Date\\" + "kind": "ScalarType", + "name": "Date" }, { - \\"kind\\": \\"EnumType\\", - \\"name\\": \\"Episode\\", - \\"values\\": [ + "kind": "EnumType", + "name": "Episode", + "values": [ { - \\"name\\": \\"NEWHOPE\\", - \\"isDeprecated\\": false + "name": "NEWHOPE", + "isDeprecated": false }, { - \\"name\\": \\"EMPIRE\\", - \\"isDeprecated\\": false + "name": "EMPIRE", + "isDeprecated": false }, { - \\"name\\": \\"JEDI\\", - \\"isDeprecated\\": false + "name": "JEDI", + "isDeprecated": false } ] } diff --git a/packages/graphql-types-generator/test/angular/__snapshots__/angularv6.ts.snap b/packages/graphql-types-generator/test/angular/__snapshots__/angularv6.ts.snap index 89aeb31f0..cef19ce65 100644 --- a/packages/graphql-types-generator/test/angular/__snapshots__/angularv6.ts.snap +++ b/packages/graphql-types-generator/test/angular/__snapshots__/angularv6.ts.snap @@ -4,12 +4,12 @@ exports[`Angular code generation should generate simple query operations 1`] = ` "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import { Client, generateClient, GraphQLResult } from \\"aws-amplify/api\\"; -import { Observable } from \\"rxjs\\"; +import { Injectable } from "@angular/core"; +import { Client, generateClient, GraphQLResult } from "aws-amplify/api"; +import { Observable } from "rxjs"; export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -23,7 +23,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -45,7 +45,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -57,7 +57,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -65,7 +65,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; @@ -73,13 +73,13 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -90,7 +90,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -106,13 +106,13 @@ export type Droid = { }; export type HeroNameQuery = { - __typename: \\"Character\\"; + __typename: "Character"; // The name of the character name: string; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { public client: Client; @@ -137,19 +137,19 @@ exports[`Angular code generation should generate simple query operations includi "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import { Client, generateClient, GraphQLResult } from \\"aws-amplify/api\\"; -import { Observable } from \\"rxjs\\"; +import { Injectable } from "@angular/core"; +import { Client, generateClient, GraphQLResult } from "aws-amplify/api"; +import { Observable } from "rxjs"; // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -163,7 +163,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -185,7 +185,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -197,7 +197,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -205,14 +205,14 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; }; export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -223,7 +223,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -239,13 +239,13 @@ export type Droid = { }; export type HeroNameQuery = { - __typename: \\"Character\\"; + __typename: "Character"; // The name of the character name: string; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { public client: Client; @@ -277,16 +277,16 @@ exports[`Angular code generation should generate subscriptions 1`] = ` "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import { Client, generateClient, GraphQLResult } from \\"aws-amplify/api\\"; -import { Observable } from \\"rxjs\\"; +import { Injectable } from "@angular/core"; +import { Client, generateClient, GraphQLResult } from "aws-amplify/api"; +import { Observable } from "rxjs"; export type __SubscriptionContainer = { onCreateRestaurant: OnCreateRestaurantSubscription; }; export type Restaurant = { - __typename: \\"Restaurant\\"; + __typename: "Restaurant"; id: string; name: string; description: string; @@ -294,7 +294,7 @@ export type Restaurant = { }; export type OnCreateRestaurantSubscription = { - __typename: \\"Restaurant\\"; + __typename: "Restaurant"; id: string; name: string; description: string; @@ -302,7 +302,7 @@ export type OnCreateRestaurantSubscription = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { public client: Client; @@ -310,7 +310,7 @@ export class APIService { this.client = generateClient(); } OnCreateRestaurantListener(): Observable< - GraphQLResult> + GraphQLResult> > { return this.client.graphql({ query: \`subscription OnCreateRestaurant { @@ -332,16 +332,16 @@ exports[`Angular code generation should generate subscriptions with parameters 1 "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import { Client, generateClient, GraphQLResult } from \\"aws-amplify/api\\"; -import { Observable } from \\"rxjs\\"; +import { Injectable } from "@angular/core"; +import { Client, generateClient, GraphQLResult } from "aws-amplify/api"; +import { Observable } from "rxjs"; export type __SubscriptionContainer = { onCreateRestaurant: OnCreateRestaurantSubscription; }; export type Restaurant = { - __typename: \\"Restaurant\\"; + __typename: "Restaurant"; id: string; name: string; description: string; @@ -352,7 +352,7 @@ export type Restaurant = { }; export type OnCreateRestaurantSubscription = { - __typename: \\"Restaurant\\"; + __typename: "Restaurant"; id: string; name: string; description: string; @@ -363,7 +363,7 @@ export type OnCreateRestaurantSubscription = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { public client: Client; @@ -373,7 +373,7 @@ export class APIService { OnCreateRestaurantListener( owner: string ): Observable< - GraphQLResult> + GraphQLResult> > { const statement = \`subscription OnCreateRestaurant($owner: String!) { onCreateRestaurant(owner: $owner) { diff --git a/packages/graphql-types-generator/test/angular/__snapshots__/index.js.snap b/packages/graphql-types-generator/test/angular/__snapshots__/index.js.snap index 02df87126..b8b65c896 100644 --- a/packages/graphql-types-generator/test/angular/__snapshots__/index.js.snap +++ b/packages/graphql-types-generator/test/angular/__snapshots__/index.js.snap @@ -4,19 +4,19 @@ exports[`Angular code generation #generateSource() should generate correct list "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -30,7 +30,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -52,7 +52,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -64,7 +64,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -72,14 +72,14 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; }; export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -90,7 +90,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -106,19 +106,19 @@ export type Droid = { }; export type HeroAndFriendsNamesQuery = { - __typename: \\"Character\\"; + __typename: "Character"; // The name of the character name: string; // The friends of the character, or an empty list if they have none friends: Array< | ( | { - __typename: \\"Human\\"; + __typename: "Human"; // The name of the character name: string; } | { - __typename: \\"Droid\\"; + __typename: "Droid"; // The name of the character name: string; } @@ -129,18 +129,18 @@ export type HeroAndFriendsNamesQuery = { export type FriendFragment = | { - __typename: \\"Human\\"; + __typename: "Human"; // The name of the character name: string; } | { - __typename: \\"Droid\\"; + __typename: "Droid"; // The name of the character name: string; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async HeroAndFriendsNames( @@ -173,12 +173,12 @@ exports[`Angular code generation #generateSource() should generate fragmented qu "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -192,7 +192,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -214,7 +214,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -226,7 +226,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -234,7 +234,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; @@ -242,13 +242,13 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -259,7 +259,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -275,19 +275,19 @@ export type Droid = { }; export type HeroAndFriendsNamesQuery = { - __typename: \\"Character\\"; + __typename: "Character"; // The name of the character name: string; // The friends of the character, or an empty list if they have none friends: Array< | ( | { - __typename: \\"Human\\"; + __typename: "Human"; // The name of the character name: string; } | { - __typename: \\"Droid\\"; + __typename: "Droid"; // The name of the character name: string; } @@ -298,17 +298,17 @@ export type HeroAndFriendsNamesQuery = { export type heroFriendsFragment = | { - __typename: \\"Human\\"; + __typename: "Human"; // The friends of the character, or an empty list if they have none friends: Array< | ( | { - __typename: \\"Human\\"; + __typename: "Human"; // The name of the character name: string; } | { - __typename: \\"Droid\\"; + __typename: "Droid"; // The name of the character name: string; } @@ -317,17 +317,17 @@ export type heroFriendsFragment = > | null; } | { - __typename: \\"Droid\\"; + __typename: "Droid"; // The friends of the character, or an empty list if they have none friends: Array< | ( | { - __typename: \\"Human\\"; + __typename: "Human"; // The name of the character name: string; } | { - __typename: \\"Droid\\"; + __typename: "Droid"; // The name of the character name: string; } @@ -337,7 +337,7 @@ export type heroFriendsFragment = }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async HeroAndFriendsNames(): Promise { @@ -359,15 +359,15 @@ exports[`Angular code generation #generateSource() should generate mutation oper "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type ReviewInput = { @@ -386,7 +386,7 @@ export type ColorInput = { }; export type Review = { - __typename: \\"Review\\"; + __typename: "Review"; // The number of stars this review gave, 1-5 stars: number; // Comment about the movie @@ -394,7 +394,7 @@ export type Review = { }; export type ReviewMovieMutation = { - __typename: \\"Review\\"; + __typename: "Review"; // The number of stars this review gave, 1-5 stars: number; // Comment about the movie @@ -402,7 +402,7 @@ export type ReviewMovieMutation = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async ReviewMovie( @@ -436,22 +436,22 @@ exports[`Angular code generation #generateSource() should generate queries retur "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type QueryObject = { - __typename: \\"QueryObject\\"; + __typename: "QueryObject"; test?: string | null; }; export type CustomScalarQuery = { - __typename: \\"QueryObject\\"; + __typename: "QueryObject"; test?: string | null; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async CustomScalar(): Promise> { @@ -472,12 +472,12 @@ exports[`Angular code generation #generateSource() should generate query operati "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -491,7 +491,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -513,7 +513,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -525,7 +525,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -533,7 +533,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; @@ -541,13 +541,13 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -558,7 +558,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -574,25 +574,25 @@ export type Droid = { }; export type HeroAndDetailsQuery = { - __typename: \\"Character\\"; + __typename: "Character"; // The name of the character name: string; }; export type HeroDetailsFragment = | { - __typename: \\"Human\\"; + __typename: "Human"; // Height in the preferred unit, default is meters height?: number | null; } | { - __typename: \\"Droid\\"; + __typename: "Droid"; // This droid's primary function primaryFunction?: string | null; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async HeroAndDetails(): Promise { @@ -614,19 +614,19 @@ exports[`Angular code generation #generateSource() should generate simple nested "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -640,7 +640,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -662,7 +662,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -674,7 +674,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -682,14 +682,14 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; }; export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -700,7 +700,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -716,19 +716,19 @@ export type Droid = { }; export type HeroAndFriendsNamesQuery = { - __typename: \\"Character\\"; + __typename: "Character"; // The name of the character name: string; // The friends of the character, or an empty list if they have none friends: Array< | ( | { - __typename: \\"Human\\"; + __typename: "Human"; // The name of the character name: string; } | { - __typename: \\"Droid\\"; + __typename: "Droid"; // The name of the character name: string; } @@ -738,7 +738,7 @@ export type HeroAndFriendsNamesQuery = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async HeroAndFriendsNames( @@ -771,12 +771,12 @@ exports[`Angular code generation #generateSource() should generate simple nested "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -787,12 +787,12 @@ export type Starship = { }; export type StarshipCoordsQuery = { - __typename: \\"Starship\\"; + __typename: "Starship"; coordinates?: Array> | null; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async StarshipCoords(): Promise { @@ -813,12 +813,12 @@ exports[`Angular code generation #generateSource() should generate simple query "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async Echo(msg?: string): Promise { @@ -842,22 +842,22 @@ exports[`Angular code generation #generateSource() should generate simple query "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export interface SubscriptionResponse { value: GraphQLResult; } export enum Status { - APPROVED = \\"APPROVED\\", - PENDING = \\"PENDING\\", - REJECTED = \\"REJECTED\\" + APPROVED = "APPROVED", + PENDING = "PENDING", + REJECTED = "REJECTED" } @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async GetScalars(): Promise> { @@ -896,12 +896,12 @@ exports[`Angular code generation #generateSource() should generate simple query "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -915,7 +915,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -937,7 +937,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -949,7 +949,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -957,7 +957,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; @@ -965,13 +965,13 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -982,7 +982,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -998,13 +998,13 @@ export type Droid = { }; export type HeroNameQuery = { - __typename: \\"Character\\"; + __typename: "Character"; // The name of the character name: string; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async HeroName(): Promise { @@ -1025,19 +1025,19 @@ exports[`Angular code generation #generateSource() should generate simple query "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -1051,7 +1051,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -1073,7 +1073,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -1085,7 +1085,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -1093,14 +1093,14 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; }; export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -1111,7 +1111,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -1127,13 +1127,13 @@ export type Droid = { }; export type HeroNameQuery = { - __typename: \\"Character\\"; + __typename: "Character"; // The name of the character name: string; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async HeroName(episode?: Episode): Promise { @@ -1160,9 +1160,9 @@ exports[`Angular code generation #generateSource() should generate subscriptions "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export interface SubscriptionResponse { value: GraphQLResult; @@ -1173,7 +1173,7 @@ export type __SubscriptionContainer = { }; export type Restaurant = { - __typename: \\"Restaurant\\"; + __typename: "Restaurant"; id: string; name: string; description: string; @@ -1181,7 +1181,7 @@ export type Restaurant = { }; export type OnCreateRestaurantSubscription = { - __typename: \\"Restaurant\\"; + __typename: "Restaurant"; id: string; name: string; description: string; @@ -1189,11 +1189,11 @@ export type OnCreateRestaurantSubscription = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { OnCreateRestaurantListener: Observable< - SubscriptionResponse> + SubscriptionResponse> > = API.graphql( graphqlOperation( \`subscription OnCreateRestaurant { @@ -1207,7 +1207,7 @@ export class APIService { }\` ) ) as Observable< - SubscriptionResponse> + SubscriptionResponse> >; } " @@ -1217,9 +1217,9 @@ exports[`Angular code generation #generateSource() should generate subscriptions "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export interface SubscriptionResponse { value: GraphQLResult; @@ -1230,7 +1230,7 @@ export type __SubscriptionContainer = { }; export type Restaurant = { - __typename: \\"Restaurant\\"; + __typename: "Restaurant"; id: string; name: string; description: string; @@ -1241,7 +1241,7 @@ export type Restaurant = { }; export type OnCreateRestaurantSubscription = { - __typename: \\"Restaurant\\"; + __typename: "Restaurant"; id: string; name: string; description: string; @@ -1252,13 +1252,13 @@ export type OnCreateRestaurantSubscription = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { OnCreateRestaurantListener( owner: string ): Observable< - SubscriptionResponse> + SubscriptionResponse> > { const statement = \`subscription OnCreateRestaurant($owner: String!) { onCreateRestaurant(owner: $owner) { @@ -1278,7 +1278,7 @@ export class APIService { return API.graphql( graphqlOperation(statement, gqlAPIServiceArguments) ) as Observable< - SubscriptionResponse> + SubscriptionResponse> >; } } @@ -1289,12 +1289,12 @@ exports[`Angular code generation #generateSource() should handle comments in enu "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type CommentTest = { - __typename: \\"CommentTest\\"; + __typename: "CommentTest"; // This is a single-line comment singleLine?: string | null; // This is a multi-line @@ -1304,19 +1304,19 @@ export type CommentTest = { }; export enum EnumCommentTestCase { - first = \\"first\\", // This is a single-line comment + first = "first", // This is a single-line comment // This is a multi-line // comment. - second = \\"second\\" + second = "second" } export type CustomScalarQuery = { - __typename: \\"CommentTest\\"; + __typename: "CommentTest"; enumCommentTest?: EnumCommentTestCase | null; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async CustomScalar(): Promise { @@ -1337,34 +1337,34 @@ exports[`Angular code generation #generateSource() should handle interfaces at r "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type InterfaceTestCase = { - __typename: \\"InterfaceTestCase\\"; + __typename: "InterfaceTestCase"; prop: string; }; export type ImplA = { - __typename: \\"ImplA\\"; + __typename: "ImplA"; prop: string; propA: string; }; export type ImplB = { - __typename: \\"ImplB\\"; + __typename: "ImplB"; prop: string; propB?: number | null; }; export type CustomScalarQuery = { - __typename: \\"InterfaceTestCase\\"; + __typename: "InterfaceTestCase"; prop: string; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async CustomScalar(): Promise { @@ -1391,12 +1391,12 @@ exports[`Angular code generation #generateSource() should handle multi-line comm "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type CommentTest = { - __typename: \\"CommentTest\\"; + __typename: "CommentTest"; // This is a single-line comment singleLine?: string | null; // This is a multi-line @@ -1406,21 +1406,21 @@ export type CommentTest = { }; export enum EnumCommentTestCase { - first = \\"first\\", // This is a single-line comment + first = "first", // This is a single-line comment // This is a multi-line // comment. - second = \\"second\\" + second = "second" } export type CustomScalarQuery = { - __typename: \\"CommentTest\\"; + __typename: "CommentTest"; // This is a multi-line // comment. multiLine?: string | null; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async CustomScalar(): Promise { @@ -1441,12 +1441,12 @@ exports[`Angular code generation #generateSource() should handle single line com "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type CommentTest = { - __typename: \\"CommentTest\\"; + __typename: "CommentTest"; // This is a single-line comment singleLine?: string | null; // This is a multi-line @@ -1456,20 +1456,20 @@ export type CommentTest = { }; export enum EnumCommentTestCase { - first = \\"first\\", // This is a single-line comment + first = "first", // This is a single-line comment // This is a multi-line // comment. - second = \\"second\\" + second = "second" } export type CustomScalarQuery = { - __typename: \\"CommentTest\\"; + __typename: "CommentTest"; // This is a single-line comment singleLine?: string | null; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async CustomScalar(): Promise { @@ -1490,28 +1490,28 @@ exports[`Angular code generation #generateSource() should handle unions at root "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type UnionTestCase = PartialA | PartialB; export type PartialA = { - __typename: \\"PartialA\\"; + __typename: "PartialA"; prop: string; }; export type PartialB = { - __typename: \\"PartialB\\"; + __typename: "PartialB"; prop: string; }; export type CustomScalarQuery = { - __typename: \\"PartialA\\" | \\"PartialB\\"; + __typename: "PartialA" | "PartialB"; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async CustomScalar(): Promise { @@ -1537,12 +1537,12 @@ exports[`Angular code generation #generateSource() should have __typename value "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -1556,7 +1556,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -1578,7 +1578,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -1590,7 +1590,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -1598,7 +1598,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; @@ -1606,13 +1606,13 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -1623,7 +1623,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -1639,25 +1639,25 @@ export type Droid = { }; export type HeroNameQuery = { - __typename: \\"Character\\"; + __typename: "Character"; // The name of the character name: string; }; export type HeroWithNameFragment = | { - __typename: \\"Human\\"; + __typename: "Human"; // The name of the character name: string; } | { - __typename: \\"Droid\\"; + __typename: "Droid"; // The name of the character name: string; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async HeroName(): Promise { @@ -1678,12 +1678,12 @@ exports[`Angular code generation #generateSource() should have __typename value "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -1699,7 +1699,7 @@ export type Droid = { }; export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -1713,7 +1713,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -1735,7 +1735,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -1747,7 +1747,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -1755,7 +1755,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; @@ -1763,13 +1763,13 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -1780,19 +1780,19 @@ export type Starship = { }; export type DroidNameQuery = { - __typename: \\"Droid\\"; + __typename: "Droid"; // What others call this droid name: string; }; export type DroidWithNameFragment = { - __typename: \\"Droid\\"; + __typename: "Droid"; // What others call this droid name: string; }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async DroidName(): Promise { @@ -1813,12 +1813,12 @@ exports[`Angular code generation #generateSource() should have the correct __typ "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export type Human = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves @@ -1840,7 +1840,7 @@ export type Human = { }; export type Character = { - __typename: \\"Character\\"; + __typename: "Character"; // The ID of the character id: string; // The name of the character @@ -1854,7 +1854,7 @@ export type Character = { }; export type Droid = { - __typename: \\"Droid\\"; + __typename: "Droid"; // The ID of the droid id: string; // What others call this droid @@ -1870,7 +1870,7 @@ export type Droid = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\"; + __typename: "FriendsConnection"; // The total number of friends totalCount?: number | null; // The edges for each of the character's friends. @@ -1882,7 +1882,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\"; + __typename: "FriendsEdge"; // A cursor used for pagination cursor: string; // The character represented by this friendship edge @@ -1890,7 +1890,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\"; + __typename: "PageInfo"; startCursor?: string | null; endCursor?: string | null; hasNextPage: boolean; @@ -1898,13 +1898,13 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\" // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI" // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -1915,14 +1915,14 @@ export type Starship = { }; export type FindHumanQuery = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves name: string; // A list of starships this person has piloted, or an empty list if none starships?: Array<{ - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -1931,14 +1931,14 @@ export type FindHumanQuery = { }; export type humanDetailsFragment = { - __typename: \\"Human\\"; + __typename: "Human"; // The ID of the human id: string; // What this human calls themselves name: string; // A list of starships this person has piloted, or an empty list if none starships?: Array<{ - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -1947,7 +1947,7 @@ export type humanDetailsFragment = { }; export type starshipDetailsFragment = { - __typename: \\"Starship\\"; + __typename: "Starship"; // The ID of the starship id: string; // The name of the starship @@ -1955,7 +1955,7 @@ export type starshipDetailsFragment = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async FindHuman(id: string): Promise { diff --git a/packages/graphql-types-generator/test/flow/__snapshots__/codeGeneration.js.snap b/packages/graphql-types-generator/test/flow/__snapshots__/codeGeneration.js.snap index 6e52fa6c0..e651f7c38 100644 --- a/packages/graphql-types-generator/test/flow/__snapshots__/codeGeneration.js.snap +++ b/packages/graphql-types-generator/test/flow/__snapshots__/codeGeneration.js.snap @@ -7,7 +7,7 @@ exports[`Flow code generation #generateSource() should annotate custom scalars a export type CustomScalarQuery = {| misc: ? {| - __typename: \\"OddType\\", + __typename: "OddType", date: ?any, |}, |};" @@ -20,7 +20,7 @@ exports[`Flow code generation #generateSource() should generate array query oper export type ReviewsStarsQuery = {| reviews: ? Array, @@ -34,9 +34,9 @@ exports[`Flow code generation #generateSource() should generate correct typedefs // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type HeroAndFriendsNamesQueryVariables = {| @@ -45,31 +45,31 @@ export type HeroAndFriendsNamesQueryVariables = {| export type HeroAndFriendsNamesQuery = {| hero: ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ) >, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -79,22 +79,22 @@ export type HeroAndFriendsNamesQuery = {| |}; export type FriendFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ); export type PersonFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -108,9 +108,9 @@ exports[`Flow code generation #generateSource() should generate correct typedefs // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type HeroAndFriendsNamesQueryVariables = {| @@ -119,31 +119,31 @@ export type HeroAndFriendsNamesQueryVariables = {| export type HeroAndFriendsNamesQuery = {| hero: ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ) >, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -153,11 +153,11 @@ export type HeroAndFriendsNamesQuery = {| |}; export type FriendFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -171,38 +171,38 @@ exports[`Flow code generation #generateSource() should generate fragmented query // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type HeroAndFriendsNamesQuery = {| hero: ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ) >, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -212,27 +212,27 @@ export type HeroAndFriendsNamesQuery = {| |}; export type heroFriendsFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ) >, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -248,9 +248,9 @@ exports[`Flow code generation #generateSource() should generate mutation operati // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type ReviewInput = {| @@ -275,7 +275,7 @@ export type ReviewMovieMutationVariables = {| export type ReviewMovieMutation = {| createReview: ? {| - __typename: \\"Review\\", + __typename: "Review", // The number of stars this review gave, 1-5 stars: number, // Comment about the movie @@ -291,20 +291,20 @@ exports[`Flow code generation #generateSource() should generate query operations // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type HeroAndDetailsQuery = {| hero: ?( { - __typename: \\"Human\\", + __typename: "Human", // What this human calls themselves name: string, // Height in the preferred unit, default is meters height: ?number, } | { - __typename: \\"Droid\\", + __typename: "Droid", // What others call this droid name: string, // This droid's primary function @@ -314,11 +314,11 @@ export type HeroAndDetailsQuery = {| |}; export type HeroDetailsFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // Height in the preferred unit, default is meters height: ?number, } | { - __typename: \\"Droid\\", + __typename: "Droid", // This droid's primary function primaryFunction: ?string, } @@ -332,9 +332,9 @@ exports[`Flow code generation #generateSource() should generate simple nested qu // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type HeroAndFriendsNamesQueryVariables = {| @@ -343,31 +343,31 @@ export type HeroAndFriendsNamesQueryVariables = {| export type HeroAndFriendsNamesQuery = {| hero: ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ) >, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: ?Array< ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -384,7 +384,7 @@ exports[`Flow code generation #generateSource() should generate simple nested wi export type StarshipCoordsQuery = {| starship: ? {| - __typename: \\"Starship\\", + __typename: "Starship", coordinates: ?Array< Array< number > >, |}, |};" @@ -397,18 +397,18 @@ exports[`Flow code generation #generateSource() should generate simple query ope // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type HeroNameQuery = {| hero: ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -423,9 +423,9 @@ exports[`Flow code generation #generateSource() should generate simple query ope // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type HeroNameQueryVariables = {| @@ -434,11 +434,11 @@ export type HeroNameQueryVariables = {| export type HeroNameQuery = {| hero: ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -452,15 +452,15 @@ exports[`Flow code generation #generateSource() should handle comments in enums // This file was automatically generated and should not be edited. export type EnumCommentTestCase = - \\"first\\" | // This is a single-line comment + "first" | // This is a single-line comment // This is a multi-line // comment. - \\"second\\"; + "second"; export type CustomScalarQuery = {| commentTest: ? {| - __typename: \\"CommentTest\\", + __typename: "CommentTest", enumCommentTest: ?EnumCommentTestCase, |}, |};" @@ -473,11 +473,11 @@ exports[`Flow code generation #generateSource() should handle interfaces at root export type CustomScalarQuery = {| interfaceTest: ?( { - __typename: \\"ImplA\\", + __typename: "ImplA", prop: string, propA: string, } | { - __typename: \\"ImplB\\", + __typename: "ImplB", prop: string, propB: ?number, } @@ -491,15 +491,15 @@ exports[`Flow code generation #generateSource() should handle multi-line comment // This file was automatically generated and should not be edited. export type EnumCommentTestCase = - \\"first\\" | // This is a single-line comment + "first" | // This is a single-line comment // This is a multi-line // comment. - \\"second\\"; + "second"; export type CustomScalarQuery = {| commentTest: ? {| - __typename: \\"CommentTest\\", + __typename: "CommentTest", // This is a multi-line // comment. multiLine: ?string, @@ -523,15 +523,15 @@ exports[`Flow code generation #generateSource() should handle single line commen // This file was automatically generated and should not be edited. export type EnumCommentTestCase = - \\"first\\" | // This is a single-line comment + "first" | // This is a single-line comment // This is a multi-line // comment. - \\"second\\"; + "second"; export type CustomScalarQuery = {| commentTest: ? {| - __typename: \\"CommentTest\\", + __typename: "CommentTest", // This is a single-line comment singleLine: ?string, |}, @@ -545,10 +545,10 @@ exports[`Flow code generation #generateSource() should handle unions at root 1`] export type CustomScalarQuery = {| unionTest: ?( { - __typename: \\"PartialA\\", + __typename: "PartialA", prop: string, } | { - __typename: \\"PartialB\\", + __typename: "PartialB", prop: string, } ), @@ -562,18 +562,18 @@ exports[`Flow code generation #generateSource() should have __typename value mat // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type HeroNameQuery = {| hero: ?( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -581,11 +581,11 @@ export type HeroNameQuery = {| |}; export type HeroWithNameFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -599,21 +599,21 @@ exports[`Flow code generation #generateSource() should have __typename value mat // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type DroidNameQuery = {| droid: ? {| - __typename: \\"Droid\\", + __typename: "Droid", // What others call this droid name: string, |}, |}; export type DroidWithNameFragment = {| - __typename: \\"Droid\\", + __typename: "Droid", // What others call this droid name: string, |};" @@ -626,21 +626,21 @@ exports[`Flow code generation #generateSource() should have __typename value mat // The episodes in the Star Wars trilogy export type Episode = - \\"NEWHOPE\\" | // Star Wars Episode IV: A New Hope, released in 1977. - \\"EMPIRE\\" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. - \\"JEDI\\"; // Star Wars Episode VI: Return of the Jedi, released in 1983. + "NEWHOPE" | // Star Wars Episode IV: A New Hope, released in 1977. + "EMPIRE" | // Star Wars Episode V: The Empire Strikes Back, released in 1980. + "JEDI"; // Star Wars Episode VI: Return of the Jedi, released in 1983. export type DroidNameQuery = {| droid: ? {| - __typename: \\"Droid\\", + __typename: "Droid", // What others call this droid name: string, |}, |}; export type DroidWithNameFragment = {| - __typename: \\"Droid\\", + __typename: "Droid", // What others call this droid name: string, |};" diff --git a/packages/graphql-types-generator/test/loading.ts b/packages/graphql-types-generator/test/loading.ts index 698cf5d63..ba63b4b5e 100644 --- a/packages/graphql-types-generator/test/loading.ts +++ b/packages/graphql-types-generator/test/loading.ts @@ -12,15 +12,16 @@ describe('Validation', () => { }); test(`should throw when a file has invalid gql snippets`, () => { const inputPaths = [path.join(__dirname, '.', 'fixtures', 'misc', 'invalid-gqlQueries.js')]; - expect(() => { + let error: Error | undefined; + + try { loadAndMergeQueryDocuments(inputPaths); - }).toThrowError( - `Could not parse graphql operations in ${path.join( - 'test', - 'fixtures', - 'misc', - 'invalid-gqlQueries.js', - )}\n Failed on : world and other words`, - ); + } catch (err) { + error = err as Error; + } + + expect(error).toBeDefined(); + expect(error?.message.replace(/\\/g, '/')).toContain('test/fixtures/misc/invalid-gqlQueries.js'); + expect(error?.message).toContain('Failed on : world and other words'); }); }); diff --git a/packages/graphql-types-generator/test/scala/__snapshots__/codeGeneration.js.snap b/packages/graphql-types-generator/test/scala/__snapshots__/codeGeneration.js.snap index 3c246851c..7840cfcc8 100644 --- a/packages/graphql-types-generator/test/scala/__snapshots__/codeGeneration.js.snap +++ b/packages/graphql-types-generator/test/scala/__snapshots__/codeGeneration.js.snap @@ -5,13 +5,13 @@ exports[`Scala code generation #caseClassDeclarationForFragment() should generat } object HeroDetails { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") implicit def toMoreHeroDetails(a: HeroDetails): MoreHeroDetails = MoreHeroDetails(a.appearsIn) val fragmentString = - \\"fragment HeroDetails on Character {\\" + - \\" name\\" + - \\" ...MoreHeroDetails\\" + - \\"}\\" + "fragment HeroDetails on Character {" + + " name" + + " ...MoreHeroDetails" + + "}" }" `; @@ -20,12 +20,12 @@ exports[`Scala code generation #caseClassDeclarationForFragment() should generat } object DroidDetails { - val possibleTypes = scala.collection.Set(\\"Droid\\") + val possibleTypes = scala.collection.Set("Droid") val fragmentString = - \\"fragment DroidDetails on Droid {\\" + - \\" name\\" + - \\" primaryFunction\\" + - \\"}\\" + "fragment DroidDetails on Droid {" + + " name" + + " primaryFunction" + + "}" }" `; @@ -34,14 +34,14 @@ exports[`Scala code generation #caseClassDeclarationForFragment() should generat } object HeroDetails { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") val fragmentString = - \\"fragment HeroDetails on Character {\\" + - \\" name\\" + - \\" friends {\\" + - \\" name\\" + - \\" }\\" + - \\"}\\" + "fragment HeroDetails on Character {" + + " name" + + " friends {" + + " name" + + " }" + + "}" } @@ -49,7 +49,7 @@ case class Friend(name: String) extends me.shadaj.slinky.core.WithRaw { } object Friend { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") }" `; @@ -58,12 +58,12 @@ exports[`Scala code generation #caseClassDeclarationForFragment() should generat } object HeroDetails { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") val fragmentString = - \\"fragment HeroDetails on Character {\\" + - \\" name\\" + - \\" appearsIn\\" + - \\"}\\" + "fragment HeroDetails on Character {" + + " name" + + " appearsIn" + + "}" }" `; @@ -72,7 +72,7 @@ exports[`Scala code generation #caseClassDeclarationForSelectionSet() should esc } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") }" `; @@ -87,13 +87,13 @@ case class AsDroid() { } object AsDroid { - val possibleTypes = scala.collection.Set(\\"Droid\\") + val possibleTypes = scala.collection.Set("Droid") implicit def toHero(a: AsDroid): Hero = Hero() implicit def toHeroDetails(a: AsDroid): HeroDetails = HeroDetails() } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") }" `; @@ -102,7 +102,7 @@ exports[`Scala code generation #caseClassDeclarationForSelectionSet() should gen } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") }" `; @@ -111,7 +111,7 @@ exports[`Scala code generation #caseClassDeclarationForSelectionSet() should gen } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") implicit def toHeroDetails(a: Hero): HeroDetails = HeroDetails() }" `; @@ -124,7 +124,7 @@ exports[`Scala code generation #caseClassDeclarationForSelectionSet() should gen } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") }" `; @@ -139,12 +139,12 @@ case class AsDroid(name: String, primaryFunction: Option[String]) { } object AsDroid { - val possibleTypes = scala.collection.Set(\\"Droid\\") + val possibleTypes = scala.collection.Set("Droid") implicit def toHero(a: AsDroid): Hero = Hero(a.name) } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") }" `; @@ -153,7 +153,7 @@ exports[`Scala code generation #caseClassDeclarationForSelectionSet() should gen } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") } @@ -161,19 +161,19 @@ case class Friend(name: Option[String]) extends me.shadaj.slinky.core.WithRaw { } object Friend { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") }" `; exports[`Scala code generation #classDeclarationForOperation() should generate a class declaration for a mutation with variables 1`] = ` "object CreateReviewMutation extends com.apollographql.scalajs.GraphQLMutation { val operationString = - \\"mutation CreateReview($episode: Episode) {\\" + - \\" createReview(episode: $episode, review: {stars: 5, commentary: \\\\\\"Wow!\\\\\\"}) {\\" + - \\" stars\\" + - \\" commentary\\" + - \\" }\\" + - \\"}\\" + "mutation CreateReview($episode: Episode) {" + + " createReview(episode: $episode, review: {stars: 5, commentary: \\"Wow!\\"}) {" + + " stars" + + " commentary" + + " }" + + "}" val operation = com.apollographql.scalajs.gql(operationString) @@ -184,14 +184,14 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a } object Data { - val possibleTypes = scala.collection.Set(\\"Mutation\\") + val possibleTypes = scala.collection.Set("Mutation") } case class CreateReview(stars: Int, commentary: Option[String]) { } object CreateReview { - val possibleTypes = scala.collection.Set(\\"Review\\") + val possibleTypes = scala.collection.Set("Review") } }" `; @@ -199,13 +199,13 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a exports[`Scala code generation #classDeclarationForOperation() should generate a class declaration for a query with a fragment spread nested in an inline fragment 1`] = ` "object HeroQuery extends com.apollographql.scalajs.GraphQLQuery { val operationString = - \\"query Hero {\\" + - \\" hero {\\" + - \\" ... on Droid {\\" + - \\" ...HeroDetails\\" + - \\" }\\" + - \\" }\\" + - \\"}\\" + "query Hero {" + + " hero {" + + " ... on Droid {" + + " ...HeroDetails" + + " }" + + " }" + + "}" val requestString: String = { operationString + HeroDetails.fragmentString } val operation = com.apollographql.scalajs.gql(requestString) @@ -216,7 +216,7 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a } object Data { - val possibleTypes = scala.collection.Set(\\"Query\\") + val possibleTypes = scala.collection.Set("Query") } @@ -230,13 +230,13 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a } object AsDroid { - val possibleTypes = scala.collection.Set(\\"Droid\\") + val possibleTypes = scala.collection.Set("Droid") implicit def toHero(a: AsDroid): Hero = Hero() implicit def toHeroDetails(a: AsDroid): HeroDetails = HeroDetails(a.name) } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") } }" `; @@ -244,11 +244,11 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a exports[`Scala code generation #classDeclarationForOperation() should generate a class declaration for a query with conditional fragment spreads 1`] = ` "object HeroQuery extends com.apollographql.scalajs.GraphQLQuery { val operationString = - \\"query Hero {\\" + - \\" hero {\\" + - \\" ...DroidDetails\\" + - \\" }\\" + - \\"}\\" + "query Hero {" + + " hero {" + + " ...DroidDetails" + + " }" + + "}" val requestString: String = { operationString + DroidDetails.fragmentString } val operation = com.apollographql.scalajs.gql(requestString) @@ -259,7 +259,7 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a } object Data { - val possibleTypes = scala.collection.Set(\\"Query\\") + val possibleTypes = scala.collection.Set("Query") } @@ -276,13 +276,13 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a } object AsDroid { - val possibleTypes = scala.collection.Set(\\"Droid\\") + val possibleTypes = scala.collection.Set("Droid") implicit def toHero(a: AsDroid): Hero = Hero() implicit def toDroidDetails(a: AsDroid): DroidDetails = DroidDetails(a.primaryFunction) } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") } }" `; @@ -290,11 +290,11 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a exports[`Scala code generation #classDeclarationForOperation() should generate a class declaration for a query with fragment spreads 1`] = ` "object HeroQuery extends com.apollographql.scalajs.GraphQLQuery { val operationString = - \\"query Hero {\\" + - \\" hero {\\" + - \\" ...HeroDetails\\" + - \\" }\\" + - \\"}\\" + "query Hero {" + + " hero {" + + " ...HeroDetails" + + " }" + + "}" val requestString: String = { operationString + HeroDetails.fragmentString } val operation = com.apollographql.scalajs.gql(requestString) @@ -305,7 +305,7 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a } object Data { - val possibleTypes = scala.collection.Set(\\"Query\\") + val possibleTypes = scala.collection.Set("Query") } @@ -313,7 +313,7 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") implicit def toHeroDetails(a: Hero): HeroDetails = HeroDetails(a.name) } }" @@ -322,11 +322,11 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a exports[`Scala code generation #classDeclarationForOperation() should generate a class declaration for a query with variables 1`] = ` "object HeroNameQuery extends com.apollographql.scalajs.GraphQLQuery { val operationString = - \\"query HeroName($episode: Episode) {\\" + - \\" hero(episode: $episode) {\\" + - \\" name\\" + - \\" }\\" + - \\"}\\" + "query HeroName($episode: Episode) {" + + " hero(episode: $episode) {" + + " name" + + " }" + + "}" val operation = com.apollographql.scalajs.gql(operationString) @@ -337,7 +337,7 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a } object Data { - val possibleTypes = scala.collection.Set(\\"Query\\") + val possibleTypes = scala.collection.Set("Query") } @@ -345,7 +345,7 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") } }" `; @@ -353,13 +353,13 @@ exports[`Scala code generation #classDeclarationForOperation() should generate a exports[`Scala code generation #classDeclarationForOperation() when generateOperationIds is specified should generate a class declaration with an operationId property 1`] = ` "object HeroQuery extends com.apollographql.scalajs.GraphQLQuery { val operationString = - \\"query Hero {\\" + - \\" hero {\\" + - \\" ...HeroDetails\\" + - \\" }\\" + - \\"}\\" + "query Hero {" + + " hero {" + + " ...HeroDetails" + + " }" + + "}" - val operationIdentifier: String = \\"90d0d674eb6a7b33776f63200d6cec3d09f881247c360a2ac9a29037a02210c4\\" + val operationIdentifier: String = "90d0d674eb6a7b33776f63200d6cec3d09f881247c360a2ac9a29037a02210c4" val requestString: String = { operationString + HeroDetails.fragmentString } val operation = com.apollographql.scalajs.gql(requestString) @@ -370,7 +370,7 @@ exports[`Scala code generation #classDeclarationForOperation() when generateOper } object Data { - val possibleTypes = scala.collection.Set(\\"Query\\") + val possibleTypes = scala.collection.Set("Query") } @@ -378,7 +378,7 @@ exports[`Scala code generation #classDeclarationForOperation() when generateOper } object Hero { - val possibleTypes = scala.collection.Set(\\"Human\\", \\"Droid\\") + val possibleTypes = scala.collection.Set("Human", "Droid") implicit def toHeroDetails(a: Hero): HeroDetails = HeroDetails(a.name) } }" @@ -401,8 +401,8 @@ fragment HeroName on Character { exports[`Scala code generation #typeDeclarationForGraphQLType() should escape identifiers in cases of enum declaration for a GraphQLEnumType 1`] = ` "object AlbumPrivacies { - val public = \\"PUBLIC\\" - val private = \\"PRIVATE\\" + val public = "PUBLIC" + val private = "PRIVATE" } " `; @@ -423,15 +423,15 @@ object Episode { /** * Star Wars Episode IV: A New Hope, released in 1977. */ - val newhope = \\"NEWHOPE\\" + val newhope = "NEWHOPE" /** * Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - val empire = \\"EMPIRE\\" + val empire = "EMPIRE" /** * Star Wars Episode VI: Return of the Jedi, released in 1983. */ - val jedi = \\"JEDI\\" + val jedi = "JEDI" } " `; diff --git a/packages/graphql-types-generator/test/swift/__snapshots__/codeGeneration.ts.snap b/packages/graphql-types-generator/test/swift/__snapshots__/codeGeneration.ts.snap index dcb1d8adf..a8e61c7f3 100644 --- a/packages/graphql-types-generator/test/swift/__snapshots__/codeGeneration.ts.snap +++ b/packages/graphql-types-generator/test/swift/__snapshots__/codeGeneration.ts.snap @@ -3,7 +3,7 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a class declaration for a mutation with variables 1`] = ` "public final class CreateReviewMutation: GraphQLMutation { public static let operationString = - \\"mutation CreateReview($episode: Episode) {\\\\n createReview(episode: $episode, review: {stars: 5, commentary: \\\\\\"Wow!\\\\\\"}) {\\\\n stars\\\\n commentary\\\\n }\\\\n}\\" + "mutation CreateReview($episode: Episode) {\\n createReview(episode: $episode, review: {stars: 5, commentary: \\"Wow!\\"}) {\\n stars\\n commentary\\n }\\n}" public var episode: Episode? @@ -12,14 +12,14 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public var variables: GraphQLMap? { - return [\\"episode\\": episode] + return ["episode": episode] } public struct Data: GraphQLSelectionSet { - public static let possibleTypes = [\\"Mutation\\"] + public static let possibleTypes = ["Mutation"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"createReview\\", arguments: [\\"episode\\": GraphQLVariable(\\"episode\\"), \\"review\\": [\\"stars\\": 5, \\"commentary\\": \\"Wow!\\"]], type: .object(CreateReview.selections)), + GraphQLField("createReview", arguments: ["episode": GraphQLVariable("episode"), "review": ["stars": 5, "commentary": "Wow!"]], type: .object(CreateReview.selections)), ] public var snapshot: Snapshot @@ -29,24 +29,24 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public init(createReview: CreateReview? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Mutation\\", \\"createReview\\": createReview.flatMap { $0.snapshot }]) + self.init(snapshot: ["__typename": "Mutation", "createReview": createReview.flatMap { $0.snapshot }]) } public var createReview: CreateReview? { get { - return (snapshot[\\"createReview\\"] as? Snapshot).flatMap { CreateReview(snapshot: $0) } + return (snapshot["createReview"] as? Snapshot).flatMap { CreateReview(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"createReview\\") + snapshot.updateValue(newValue?.snapshot, forKey: "createReview") } } public struct CreateReview: GraphQLSelectionSet { - public static let possibleTypes = [\\"Review\\"] + public static let possibleTypes = ["Review"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"stars\\", type: .nonNull(.scalar(Int.self))), - GraphQLField(\\"commentary\\", type: .scalar(String.self)), + GraphQLField("stars", type: .nonNull(.scalar(Int.self))), + GraphQLField("commentary", type: .scalar(String.self)), ] public var snapshot: Snapshot @@ -56,26 +56,26 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public init(stars: Int, commentary: String? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Review\\", \\"stars\\": stars, \\"commentary\\": commentary]) + self.init(snapshot: ["__typename": "Review", "stars": stars, "commentary": commentary]) } /// The number of stars this review gave, 1-5 public var stars: Int { get { - return snapshot[\\"stars\\"]! as! Int + return snapshot["stars"]! as! Int } set { - snapshot.updateValue(newValue, forKey: \\"stars\\") + snapshot.updateValue(newValue, forKey: "stars") } } /// Comment about the movie public var commentary: String? { get { - return snapshot[\\"commentary\\"] as? String + return snapshot["commentary"] as? String } set { - snapshot.updateValue(newValue, forKey: \\"commentary\\") + snapshot.updateValue(newValue, forKey: "commentary") } } } @@ -86,7 +86,7 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a exports[`Swift code generation #classDeclarationForOperation() should generate a class declaration for a query with a fragment spread nested in an inline fragment 1`] = ` "public final class HeroQuery: GraphQLQuery { public static let operationString = - \\"query Hero {\\\\n hero {\\\\n ... on Droid {\\\\n ...HeroDetails\\\\n }\\\\n }\\\\n}\\" + "query Hero {\\n hero {\\n ... on Droid {\\n ...HeroDetails\\n }\\n }\\n}" public static var requestString: String { return operationString.appending(HeroDetails.fragmentString) } @@ -94,10 +94,10 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public struct Data: GraphQLSelectionSet { - public static let possibleTypes = [\\"Query\\"] + public static let possibleTypes = ["Query"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"hero\\", type: .object(Hero.selections)), + GraphQLField("hero", type: .object(Hero.selections)), ] public var snapshot: Snapshot @@ -107,24 +107,24 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public init(hero: Hero? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Query\\", \\"hero\\": hero.flatMap { $0.snapshot }]) + self.init(snapshot: ["__typename": "Query", "hero": hero.flatMap { $0.snapshot }]) } public var hero: Hero? { get { - return (snapshot[\\"hero\\"] as? Snapshot).flatMap { Hero(snapshot: $0) } + return (snapshot["hero"] as? Snapshot).flatMap { Hero(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"hero\\") + snapshot.updateValue(newValue?.snapshot, forKey: "hero") } } public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ GraphQLTypeCase( - variants: [\\"Droid\\": AsDroid.selections], + variants: ["Droid": AsDroid.selections], default: [ ] ) @@ -137,11 +137,11 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public static func makeHuman() -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\"]) + return Hero(snapshot: ["__typename": "Human"]) } public static func makeDroid(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Droid", "name": name]) } public var asDroid: AsDroid? { @@ -156,10 +156,10 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public struct AsDroid: GraphQLSelectionSet { - public static let possibleTypes = [\\"Droid\\"] + public static let possibleTypes = ["Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -169,16 +169,16 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public init(name: String) { - self.init(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + self.init(snapshot: ["__typename": "Droid", "name": name]) } /// What others call this droid public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } @@ -212,7 +212,7 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a exports[`Swift code generation #classDeclarationForOperation() should generate a class declaration for a query with conditional fragment spreads 1`] = ` "public final class HeroQuery: GraphQLQuery { public static let operationString = - \\"query Hero {\\\\n hero {\\\\n ...DroidDetails\\\\n }\\\\n}\\" + "query Hero {\\n hero {\\n ...DroidDetails\\n }\\n}" public static var requestString: String { return operationString.appending(DroidDetails.fragmentString) } @@ -220,10 +220,10 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public struct Data: GraphQLSelectionSet { - public static let possibleTypes = [\\"Query\\"] + public static let possibleTypes = ["Query"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"hero\\", type: .object(Hero.selections)), + GraphQLField("hero", type: .object(Hero.selections)), ] public var snapshot: Snapshot @@ -233,24 +233,24 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public init(hero: Hero? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Query\\", \\"hero\\": hero.flatMap { $0.snapshot }]) + self.init(snapshot: ["__typename": "Query", "hero": hero.flatMap { $0.snapshot }]) } public var hero: Hero? { get { - return (snapshot[\\"hero\\"] as? Snapshot).flatMap { Hero(snapshot: $0) } + return (snapshot["hero"] as? Snapshot).flatMap { Hero(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"hero\\") + snapshot.updateValue(newValue?.snapshot, forKey: "hero") } } public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ GraphQLTypeCase( - variants: [\\"Droid\\": AsDroid.selections], + variants: ["Droid": AsDroid.selections], default: [ ] ) @@ -263,11 +263,11 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public static func makeHuman() -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\"]) + return Hero(snapshot: ["__typename": "Human"]) } public static func makeDroid(primaryFunction: String? = nil) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"primaryFunction\\": primaryFunction]) + return Hero(snapshot: ["__typename": "Droid", "primaryFunction": primaryFunction]) } public var fragments: Fragments { @@ -284,7 +284,7 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a public var droidDetails: DroidDetails? { get { - if !DroidDetails.possibleTypes.contains(snapshot[\\"__typename\\"]! as! String) { return nil } + if !DroidDetails.possibleTypes.contains(snapshot["__typename"]! as! String) { return nil } return DroidDetails(snapshot: snapshot) } set { @@ -306,10 +306,10 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public struct AsDroid: GraphQLSelectionSet { - public static let possibleTypes = [\\"Droid\\"] + public static let possibleTypes = ["Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"primaryFunction\\", type: .scalar(String.self)), + GraphQLField("primaryFunction", type: .scalar(String.self)), ] public var snapshot: Snapshot @@ -319,16 +319,16 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public init(primaryFunction: String? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Droid\\", \\"primaryFunction\\": primaryFunction]) + self.init(snapshot: ["__typename": "Droid", "primaryFunction": primaryFunction]) } /// This droid's primary function public var primaryFunction: String? { get { - return snapshot[\\"primaryFunction\\"] as? String + return snapshot["primaryFunction"] as? String } set { - snapshot.updateValue(newValue, forKey: \\"primaryFunction\\") + snapshot.updateValue(newValue, forKey: "primaryFunction") } } @@ -362,7 +362,7 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a exports[`Swift code generation #classDeclarationForOperation() should generate a class declaration for a query with fragment spreads 1`] = ` "public final class HeroQuery: GraphQLQuery { public static let operationString = - \\"query Hero {\\\\n hero {\\\\n ...HeroDetails\\\\n }\\\\n}\\" + "query Hero {\\n hero {\\n ...HeroDetails\\n }\\n}" public static var requestString: String { return operationString.appending(HeroDetails.fragmentString) } @@ -370,10 +370,10 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public struct Data: GraphQLSelectionSet { - public static let possibleTypes = [\\"Query\\"] + public static let possibleTypes = ["Query"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"hero\\", type: .object(Hero.selections)), + GraphQLField("hero", type: .object(Hero.selections)), ] public var snapshot: Snapshot @@ -383,23 +383,23 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public init(hero: Hero? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Query\\", \\"hero\\": hero.flatMap { $0.snapshot }]) + self.init(snapshot: ["__typename": "Query", "hero": hero.flatMap { $0.snapshot }]) } public var hero: Hero? { get { - return (snapshot[\\"hero\\"] as? Snapshot).flatMap { Hero(snapshot: $0) } + return (snapshot["hero"] as? Snapshot).flatMap { Hero(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"hero\\") + snapshot.updateValue(newValue?.snapshot, forKey: "hero") } } public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -409,20 +409,20 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public static func makeHuman(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } @@ -455,7 +455,7 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a exports[`Swift code generation #classDeclarationForOperation() should generate a class declaration for a query with variables 1`] = ` "public final class HeroNameQuery: GraphQLQuery { public static let operationString = - \\"query HeroName($episode: Episode) {\\\\n hero(episode: $episode) {\\\\n name\\\\n }\\\\n}\\" + "query HeroName($episode: Episode) {\\n hero(episode: $episode) {\\n name\\n }\\n}" public var episode: Episode? @@ -464,14 +464,14 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public var variables: GraphQLMap? { - return [\\"episode\\": episode] + return ["episode": episode] } public struct Data: GraphQLSelectionSet { - public static let possibleTypes = [\\"Query\\"] + public static let possibleTypes = ["Query"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"hero\\", arguments: [\\"episode\\": GraphQLVariable(\\"episode\\")], type: .object(Hero.selections)), + GraphQLField("hero", arguments: ["episode": GraphQLVariable("episode")], type: .object(Hero.selections)), ] public var snapshot: Snapshot @@ -481,23 +481,23 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public init(hero: Hero? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Query\\", \\"hero\\": hero.flatMap { $0.snapshot }]) + self.init(snapshot: ["__typename": "Query", "hero": hero.flatMap { $0.snapshot }]) } public var hero: Hero? { get { - return (snapshot[\\"hero\\"] as? Snapshot).flatMap { Hero(snapshot: $0) } + return (snapshot["hero"] as? Snapshot).flatMap { Hero(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"hero\\") + snapshot.updateValue(newValue?.snapshot, forKey: "hero") } } public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -507,20 +507,20 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public static func makeHuman(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } } @@ -531,9 +531,9 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a exports[`Swift code generation #classDeclarationForOperation() should generate a class declaration with an operationIdentifier property when generateOperationIds is specified 1`] = ` "public final class HeroQuery: GraphQLQuery { public static let operationString = - \\"query Hero {\\\\n hero {\\\\n ...HeroDetails\\\\n }\\\\n}\\" + "query Hero {\\n hero {\\n ...HeroDetails\\n }\\n}" - public static let operationIdentifier: String? = \\"90d0d674eb6a7b33776f63200d6cec3d09f881247c360a2ac9a29037a02210c4\\" + public static let operationIdentifier: String? = "90d0d674eb6a7b33776f63200d6cec3d09f881247c360a2ac9a29037a02210c4" public static var requestString: String { return operationString.appending(HeroDetails.fragmentString) } @@ -541,10 +541,10 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public struct Data: GraphQLSelectionSet { - public static let possibleTypes = [\\"Query\\"] + public static let possibleTypes = ["Query"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"hero\\", type: .object(Hero.selections)), + GraphQLField("hero", type: .object(Hero.selections)), ] public var snapshot: Snapshot @@ -554,23 +554,23 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public init(hero: Hero? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Query\\", \\"hero\\": hero.flatMap { $0.snapshot }]) + self.init(snapshot: ["__typename": "Query", "hero": hero.flatMap { $0.snapshot }]) } public var hero: Hero? { get { - return (snapshot[\\"hero\\"] as? Snapshot).flatMap { Hero(snapshot: $0) } + return (snapshot["hero"] as? Snapshot).flatMap { Hero(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"hero\\") + snapshot.updateValue(newValue?.snapshot, forKey: "hero") } } public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -580,20 +580,20 @@ exports[`Swift code generation #classDeclarationForOperation() should generate a } public static func makeHuman(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } @@ -879,13 +879,13 @@ public enum JSONDecodingError: Error, LocalizedError { public var errorDescription: String? { switch self { case .missingValue: - return \\"Missing value\\" + return "Missing value" case .nullValue: - return \\"Unexpected null value\\" + return "Unexpected null value" case .wrongType: - return \\"Wrong type\\" + return "Wrong type" case .couldNotConvert(let value, let expectedType): - return \\"Could not convert \\\\\\"\\\\(value)\\\\\\" to \\\\(expectedType)\\" + return "Could not convert \\"\\(value)\\" to \\(expectedType)" } } } @@ -990,7 +990,7 @@ extension Optional: JSONEncodable { case .some(let wrapped as JSONEncodable): return wrapped.jsonValue default: - fatalError(\\"Optional is only JSONEncodable if Wrapped is\\") + fatalError("Optional is only JSONEncodable if Wrapped is") } } } @@ -1006,7 +1006,7 @@ extension Dictionary: JSONEncodable { if case let (key as String, value as JSONEncodable) = (key, value) { jsonObject[key] = value.jsonValue } else { - fatalError(\\"Dictionary is only JSONEncodable if Value is (and if Key is String)\\") + fatalError("Dictionary is only JSONEncodable if Value is (and if Key is String)") } } return jsonObject @@ -1019,7 +1019,7 @@ extension Array: JSONEncodable { if case let element as JSONEncodable = element { return element.jsonValue } else { - fatalError(\\"Array is only JSONEncodable if Element is\\") + fatalError("Array is only JSONEncodable if Element is") } } } @@ -1071,13 +1071,13 @@ exports[`Swift code generation #initializerDeclarationForProperties() should gen exports[`Swift code generation #structDeclarationForFragment() should generate a struct declaration for a fragment that includes a fragment spread 1`] = ` "public struct HeroDetails: GraphQLFragment { public static let fragmentString = - \\"fragment HeroDetails on Character {\\\\n name\\\\n ...MoreHeroDetails\\\\n}\\" + "fragment HeroDetails on Character {\\n name\\n ...MoreHeroDetails\\n}" - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"appearsIn\\", type: .nonNull(.list(.scalar(Episode.self)))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("appearsIn", type: .nonNull(.list(.scalar(Episode.self)))), ] public var snapshot: Snapshot @@ -1087,30 +1087,30 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a } public static func makeHuman(name: String, appearsIn: [Episode?]) -> HeroDetails { - return HeroDetails(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name, \\"appearsIn\\": appearsIn]) + return HeroDetails(snapshot: ["__typename": "Human", "name": name, "appearsIn": appearsIn]) } public static func makeDroid(name: String, appearsIn: [Episode?]) -> HeroDetails { - return HeroDetails(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name, \\"appearsIn\\": appearsIn]) + return HeroDetails(snapshot: ["__typename": "Droid", "name": name, "appearsIn": appearsIn]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } /// The movies this character appears in public var appearsIn: [Episode?] { get { - return snapshot[\\"appearsIn\\"]! as! [Episode?] + return snapshot["appearsIn"]! as! [Episode?] } set { - snapshot.updateValue(newValue, forKey: \\"appearsIn\\") + snapshot.updateValue(newValue, forKey: "appearsIn") } } @@ -1141,13 +1141,13 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a exports[`Swift code generation #structDeclarationForFragment() should generate a struct declaration for a fragment with a concrete type condition 1`] = ` "public struct DroidDetails: GraphQLFragment { public static let fragmentString = - \\"fragment DroidDetails on Droid {\\\\n name\\\\n primaryFunction\\\\n}\\" + "fragment DroidDetails on Droid {\\n name\\n primaryFunction\\n}" - public static let possibleTypes = [\\"Droid\\"] + public static let possibleTypes = ["Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"primaryFunction\\", type: .scalar(String.self)), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("primaryFunction", type: .scalar(String.self)), ] public var snapshot: Snapshot @@ -1157,26 +1157,26 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a } public init(name: String, primaryFunction: String? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name, \\"primaryFunction\\": primaryFunction]) + self.init(snapshot: ["__typename": "Droid", "name": name, "primaryFunction": primaryFunction]) } /// What others call this droid public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } /// This droid's primary function public var primaryFunction: String? { get { - return snapshot[\\"primaryFunction\\"] as? String + return snapshot["primaryFunction"] as? String } set { - snapshot.updateValue(newValue, forKey: \\"primaryFunction\\") + snapshot.updateValue(newValue, forKey: "primaryFunction") } } }" @@ -1185,13 +1185,13 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a exports[`Swift code generation #structDeclarationForFragment() should generate a struct declaration for a fragment with a subselection 1`] = ` "public struct HeroDetails: GraphQLFragment { public static let fragmentString = - \\"fragment HeroDetails on Character {\\\\n name\\\\n friends {\\\\n name\\\\n }\\\\n}\\" + "fragment HeroDetails on Character {\\n name\\n friends {\\n name\\n }\\n}" - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"friends\\", type: .list(.object(Friend.selections))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("friends", type: .list(.object(Friend.selections))), ] public var snapshot: Snapshot @@ -1201,38 +1201,38 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a } public static func makeHuman(name: String, friends: [Friend?]? = nil) -> HeroDetails { - return HeroDetails(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name, \\"friends\\": friends.flatMap { $0.map { $0.flatMap { $0.snapshot } } }]) + return HeroDetails(snapshot: ["__typename": "Human", "name": name, "friends": friends.flatMap { $0.map { $0.flatMap { $0.snapshot } } }]) } public static func makeDroid(name: String, friends: [Friend?]? = nil) -> HeroDetails { - return HeroDetails(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name, \\"friends\\": friends.flatMap { $0.map { $0.flatMap { $0.snapshot } } }]) + return HeroDetails(snapshot: ["__typename": "Droid", "name": name, "friends": friends.flatMap { $0.map { $0.flatMap { $0.snapshot } } }]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } /// The friends of the character, or an empty list if they have none public var friends: [Friend?]? { get { - return (snapshot[\\"friends\\"] as? [Snapshot?]).flatMap { $0.map { $0.flatMap { Friend(snapshot: $0) } } } + return (snapshot["friends"] as? [Snapshot?]).flatMap { $0.map { $0.flatMap { Friend(snapshot: $0) } } } } set { - snapshot.updateValue(newValue.flatMap { $0.map { $0.flatMap { $0.snapshot } } }, forKey: \\"friends\\") + snapshot.updateValue(newValue.flatMap { $0.map { $0.flatMap { $0.snapshot } } }, forKey: "friends") } } public struct Friend: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -1242,20 +1242,20 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a } public static func makeHuman(name: String) -> Friend { - return Friend(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Friend(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String) -> Friend { - return Friend(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Friend(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } } @@ -1265,13 +1265,13 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a exports[`Swift code generation #structDeclarationForFragment() should generate a struct declaration for a fragment with an abstract type condition 1`] = ` "public struct HeroDetails: GraphQLFragment { public static let fragmentString = - \\"fragment HeroDetails on Character {\\\\n name\\\\n appearsIn\\\\n}\\" + "fragment HeroDetails on Character {\\n name\\n appearsIn\\n}" - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"appearsIn\\", type: .nonNull(.list(.scalar(Episode.self)))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("appearsIn", type: .nonNull(.list(.scalar(Episode.self)))), ] public var snapshot: Snapshot @@ -1281,30 +1281,30 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a } public static func makeHuman(name: String, appearsIn: [Episode?]) -> HeroDetails { - return HeroDetails(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name, \\"appearsIn\\": appearsIn]) + return HeroDetails(snapshot: ["__typename": "Human", "name": name, "appearsIn": appearsIn]) } public static func makeDroid(name: String, appearsIn: [Episode?]) -> HeroDetails { - return HeroDetails(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name, \\"appearsIn\\": appearsIn]) + return HeroDetails(snapshot: ["__typename": "Droid", "name": name, "appearsIn": appearsIn]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } /// The movies this character appears in public var appearsIn: [Episode?] { get { - return snapshot[\\"appearsIn\\"]! as! [Episode?] + return snapshot["appearsIn"]! as! [Episode?] } set { - snapshot.updateValue(newValue, forKey: \\"appearsIn\\") + snapshot.updateValue(newValue, forKey: "appearsIn") } } }" @@ -1312,10 +1312,10 @@ exports[`Swift code generation #structDeclarationForFragment() should generate a exports[`Swift code generation #structDeclarationForSelectionSet() should escape reserved keywords in a struct declaration for a selection set 1`] = ` "public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", alias: \\"private\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", alias: "private", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -1325,20 +1325,20 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should escape } public static func makeHuman(\`private\`: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"private\\": \`private\`]) + return Hero(snapshot: ["__typename": "Human", "private": \`private\`]) } public static func makeDroid(\`private\`: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"private\\": \`private\`]) + return Hero(snapshot: ["__typename": "Droid", "private": \`private\`]) } /// The name of the character public var \`private\`: String { get { - return snapshot[\\"private\\"]! as! String + return snapshot["private"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"private\\") + snapshot.updateValue(newValue, forKey: "private") } } }" @@ -1346,10 +1346,10 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should escape exports[`Swift code generation #structDeclarationForSelectionSet() should generate a nested struct declaration for a selection set with subselections 1`] = ` "public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"friends\\", type: .list(.object(Friend.selections))), + GraphQLField("friends", type: .list(.object(Friend.selections))), ] public var snapshot: Snapshot @@ -1359,28 +1359,28 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public static func makeHuman(friends: [Friend?]? = nil) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"friends\\": friends.flatMap { $0.map { $0.flatMap { $0.snapshot } } }]) + return Hero(snapshot: ["__typename": "Human", "friends": friends.flatMap { $0.map { $0.flatMap { $0.snapshot } } }]) } public static func makeDroid(friends: [Friend?]? = nil) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"friends\\": friends.flatMap { $0.map { $0.flatMap { $0.snapshot } } }]) + return Hero(snapshot: ["__typename": "Droid", "friends": friends.flatMap { $0.map { $0.flatMap { $0.snapshot } } }]) } /// The friends of the character, or an empty list if they have none public var friends: [Friend?]? { get { - return (snapshot[\\"friends\\"] as? [Snapshot?]).flatMap { $0.map { $0.flatMap { Friend(snapshot: $0) } } } + return (snapshot["friends"] as? [Snapshot?]).flatMap { $0.map { $0.flatMap { Friend(snapshot: $0) } } } } set { - snapshot.updateValue(newValue.flatMap { $0.map { $0.flatMap { $0.snapshot } } }, forKey: \\"friends\\") + snapshot.updateValue(newValue.flatMap { $0.map { $0.flatMap { $0.snapshot } } }, forKey: "friends") } } public struct Friend: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -1390,20 +1390,20 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public static func makeHuman(name: String) -> Friend { - return Friend(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Friend(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String) -> Friend { - return Friend(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Friend(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } } @@ -1412,13 +1412,13 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera exports[`Swift code generation #structDeclarationForSelectionSet() should generate a struct declaration for a fragment spread nested in an inline fragment 1`] = ` "public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ GraphQLTypeCase( - variants: [\\"Droid\\": AsDroid.selections], + variants: ["Droid": AsDroid.selections], default: [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] ) ] @@ -1430,20 +1430,20 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public static func makeHuman(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } @@ -1459,11 +1459,11 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public struct AsDroid: GraphQLSelectionSet { - public static let possibleTypes = [\\"Droid\\"] + public static let possibleTypes = ["Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -1473,16 +1473,16 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public init(name: String) { - self.init(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + self.init(snapshot: ["__typename": "Droid", "name": name]) } /// What others call this droid public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } @@ -1513,10 +1513,10 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera exports[`Swift code generation #structDeclarationForSelectionSet() should generate a struct declaration for a selection set 1`] = ` "public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -1526,20 +1526,20 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public static func makeHuman(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } }" @@ -1547,11 +1547,11 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera exports[`Swift code generation #structDeclarationForSelectionSet() should generate a struct declaration for a selection set with a conditional field 1`] = ` "public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLBooleanCondition(variableName: \\"includeName\\", inverted: false, selections: [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLBooleanCondition(variableName: "includeName", inverted: false, selections: [ + GraphQLField("name", type: .nonNull(.scalar(String.self))), ]), ] @@ -1562,20 +1562,20 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public static func makeHuman(name: String? = nil) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String? = nil) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String? { get { - return snapshot[\\"name\\"] as? String + return snapshot["name"] as? String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } }" @@ -1583,11 +1583,11 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera exports[`Swift code generation #structDeclarationForSelectionSet() should generate a struct declaration for a selection set with a fragment spread that matches the parent type 1`] = ` "public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -1597,20 +1597,20 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public static func makeHuman(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } @@ -1640,13 +1640,13 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera exports[`Swift code generation #structDeclarationForSelectionSet() should generate a struct declaration for a selection set with a fragment spread with a more specific type condition 1`] = ` "public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ GraphQLTypeCase( - variants: [\\"Droid\\": AsDroid.selections], + variants: ["Droid": AsDroid.selections], default: [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] ) ] @@ -1658,20 +1658,20 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public static func makeHuman(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Droid", "name": name]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } @@ -1689,7 +1689,7 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera public var droidDetails: DroidDetails? { get { - if !DroidDetails.possibleTypes.contains(snapshot[\\"__typename\\"]! as! String) { return nil } + if !DroidDetails.possibleTypes.contains(snapshot["__typename"]! as! String) { return nil } return DroidDetails(snapshot: snapshot) } set { @@ -1711,11 +1711,11 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public struct AsDroid: GraphQLSelectionSet { - public static let possibleTypes = [\\"Droid\\"] + public static let possibleTypes = ["Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -1725,16 +1725,16 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public init(name: String) { - self.init(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name]) + self.init(snapshot: ["__typename": "Droid", "name": name]) } /// What others call this droid public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } @@ -1765,13 +1765,13 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera exports[`Swift code generation #structDeclarationForSelectionSet() should generate a struct declaration for a selection set with an inline fragment 1`] = ` "public struct Hero: GraphQLSelectionSet { - public static let possibleTypes = [\\"Human\\", \\"Droid\\"] + public static let possibleTypes = ["Human", "Droid"] public static let selections: [GraphQLSelection] = [ GraphQLTypeCase( - variants: [\\"Droid\\": AsDroid.selections], + variants: ["Droid": AsDroid.selections], default: [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), ] ) ] @@ -1783,20 +1783,20 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public static func makeHuman(name: String) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Human\\", \\"name\\": name]) + return Hero(snapshot: ["__typename": "Human", "name": name]) } public static func makeDroid(name: String, primaryFunction: String? = nil) -> Hero { - return Hero(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name, \\"primaryFunction\\": primaryFunction]) + return Hero(snapshot: ["__typename": "Droid", "name": name, "primaryFunction": primaryFunction]) } /// The name of the character public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } @@ -1812,11 +1812,11 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public struct AsDroid: GraphQLSelectionSet { - public static let possibleTypes = [\\"Droid\\"] + public static let possibleTypes = ["Droid"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"primaryFunction\\", type: .scalar(String.self)), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("primaryFunction", type: .scalar(String.self)), ] public var snapshot: Snapshot @@ -1826,26 +1826,26 @@ exports[`Swift code generation #structDeclarationForSelectionSet() should genera } public init(name: String, primaryFunction: String? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Droid\\", \\"name\\": name, \\"primaryFunction\\": primaryFunction]) + self.init(snapshot: ["__typename": "Droid", "name": name, "primaryFunction": primaryFunction]) } /// What others call this droid public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } /// This droid's primary function public var primaryFunction: String? { get { - return snapshot[\\"primaryFunction\\"] as? String + return snapshot["primaryFunction"] as? String } set { - snapshot.updateValue(newValue, forKey: \\"primaryFunction\\") + snapshot.updateValue(newValue, forKey: "primaryFunction") } } } @@ -1862,16 +1862,16 @@ exports[`Swift code generation #typeDeclarationForGraphQLType() should escape id public init?(rawValue: RawValue) { switch rawValue { - case \\"PUBLIC\\": self = .public - case \\"PRIVATE\\": self = .private + case "PUBLIC": self = .public + case "PRIVATE": self = .private default: self = .unknown(rawValue) } } public var rawValue: RawValue { switch self { - case .public: return \\"PUBLIC\\" - case .private: return \\"PRIVATE\\" + case .public: return "PUBLIC" + case .private: return "PRIVATE" case .unknown(let value): return value } } @@ -1893,36 +1893,36 @@ public struct ReviewInput: GraphQLMapConvertible { public var graphQLMap: GraphQLMap public init(stars: Int, commentary: String? = nil, favoriteColor: ColorInput? = nil) { - graphQLMap = [\\"stars\\": stars, \\"commentary\\": commentary, \\"favorite_color\\": favoriteColor] + graphQLMap = ["stars": stars, "commentary": commentary, "favorite_color": favoriteColor] } /// 0-5 stars public var stars: Int { get { - return graphQLMap[\\"stars\\"] as! Int + return graphQLMap["stars"] as! Int } set { - graphQLMap.updateValue(newValue, forKey: \\"stars\\") + graphQLMap.updateValue(newValue, forKey: "stars") } } /// Comment about the movie, optional public var commentary: String? { get { - return graphQLMap[\\"commentary\\"] as! String? + return graphQLMap["commentary"] as! String? } set { - graphQLMap.updateValue(newValue, forKey: \\"commentary\\") + graphQLMap.updateValue(newValue, forKey: "commentary") } } /// Favorite color, optional public var favoriteColor: ColorInput? { get { - return graphQLMap[\\"favorite_color\\"] as! ColorInput? + return graphQLMap["favorite_color"] as! ColorInput? } set { - graphQLMap.updateValue(newValue, forKey: \\"favorite_color\\") + graphQLMap.updateValue(newValue, forKey: "favorite_color") } } }" @@ -1943,18 +1943,18 @@ public enum Episode: RawRepresentable, Equatable, JSONDecodable, JSONEncodable { public init?(rawValue: RawValue) { switch rawValue { - case \\"NEWHOPE\\": self = .newhope - case \\"EMPIRE\\": self = .empire - case \\"JEDI\\": self = .jedi + case "NEWHOPE": self = .newhope + case "EMPIRE": self = .empire + case "JEDI": self = .jedi default: self = .unknown(rawValue) } } public var rawValue: RawValue { switch self { - case .newhope: return \\"NEWHOPE\\" - case .empire: return \\"EMPIRE\\" - case .jedi: return \\"JEDI\\" + case .newhope: return "NEWHOPE" + case .empire: return "EMPIRE" + case .jedi: return "JEDI" case .unknown(let value): return value } } diff --git a/packages/graphql-types-generator/test/typescript/__snapshots__/codeGeneration.js.snap b/packages/graphql-types-generator/test/typescript/__snapshots__/codeGeneration.js.snap index 97d14062e..0a4cd8aa1 100644 --- a/packages/graphql-types-generator/test/typescript/__snapshots__/codeGeneration.js.snap +++ b/packages/graphql-types-generator/test/typescript/__snapshots__/codeGeneration.js.snap @@ -7,14 +7,14 @@ exports[`TypeScript code generation #generateSource() should generate correct li // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Character = { - __typename: \\"Character\\", + __typename: "Character", // The ID of the character id: string, // The name of the character @@ -28,7 +28,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves @@ -50,7 +50,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\", + __typename: "FriendsConnection", // The total number of friends totalCount?: number | null, // The edges for each of the character's friends. @@ -62,7 +62,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\", + __typename: "FriendsEdge", // A cursor used for pagination cursor: string, // The character represented by this friendship edge @@ -70,14 +70,14 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\", + __typename: "PageInfo", startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, }; export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -88,7 +88,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\", + __typename: "Droid", // The ID of the droid id: string, // What others call this droid @@ -109,31 +109,31 @@ export type HeroAndFriendsNamesQueryVariables = { export type HeroAndFriendsNamesQuery = { hero: ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: Array<( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ) | null > | null, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: Array<( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -143,11 +143,11 @@ export type HeroAndFriendsNamesQuery = { }; export type FriendFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -161,7 +161,7 @@ exports[`TypeScript code generation #generateSource() should generate fragmented // This file was automatically generated and should not be edited. export type Character = { - __typename: \\"Character\\", + __typename: "Character", // The ID of the character id: string, // The name of the character @@ -175,7 +175,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves @@ -197,7 +197,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\", + __typename: "FriendsConnection", // The total number of friends totalCount?: number | null, // The edges for each of the character's friends. @@ -209,7 +209,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\", + __typename: "FriendsEdge", // A cursor used for pagination cursor: string, // The character represented by this friendship edge @@ -217,7 +217,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\", + __typename: "PageInfo", startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, @@ -225,14 +225,14 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -243,7 +243,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\", + __typename: "Droid", // The ID of the droid id: string, // What others call this droid @@ -263,31 +263,31 @@ export type HeroAndFriendsNamesQueryVariables = { export type HeroAndFriendsNamesQuery = { hero: ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: Array<( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ) | null > | null, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: Array<( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -297,27 +297,27 @@ export type HeroAndFriendsNamesQuery = { }; export type heroFriendsFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // The friends of the character, or an empty list if they have none friends: Array<( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ) | null > | null, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The friends of the character, or an empty list if they have none friends: Array<( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -334,9 +334,9 @@ exports[`TypeScript code generation #generateSource() should generate mutation o // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } @@ -356,7 +356,7 @@ export type ColorInput = { }; export type Review = { - __typename: \\"Review\\", + __typename: "Review", // The number of stars this review gave, 1-5 stars: number, // Comment about the movie @@ -370,7 +370,7 @@ export type ReviewMovieMutationVariables = { export type ReviewMovieMutation = { createReview?: { - __typename: \\"Review\\", + __typename: "Review", // The number of stars this review gave, 1-5 stars: number, // Comment about the movie @@ -386,7 +386,7 @@ exports[`TypeScript code generation #generateSource() should generate query oper // This file was automatically generated and should not be edited. export type Character = { - __typename: \\"Character\\", + __typename: "Character", // The ID of the character id: string, // The name of the character @@ -400,7 +400,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves @@ -422,7 +422,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\", + __typename: "FriendsConnection", // The total number of friends totalCount?: number | null, // The edges for each of the character's friends. @@ -434,7 +434,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\", + __typename: "FriendsEdge", // A cursor used for pagination cursor: string, // The character represented by this friendship edge @@ -442,7 +442,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\", + __typename: "PageInfo", startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, @@ -450,14 +450,14 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -468,7 +468,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\", + __typename: "Droid", // The ID of the droid id: string, // What others call this droid @@ -488,13 +488,13 @@ export type HeroAndDetailsQueryVariables = { export type HeroAndDetailsQuery = { hero: ( { - __typename: \\"Human\\", + __typename: "Human", // What this human calls themselves name: string, // Height in the preferred unit, default is meters height?: number | null, } | { - __typename: \\"Droid\\", + __typename: "Droid", // What others call this droid name: string, // This droid's primary function @@ -504,11 +504,11 @@ export type HeroAndDetailsQuery = { }; export type HeroDetailsFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // Height in the preferred unit, default is meters height?: number | null, } | { - __typename: \\"Droid\\", + __typename: "Droid", // This droid's primary function primaryFunction?: string | null, } @@ -523,14 +523,14 @@ exports[`TypeScript code generation #generateSource() should generate simple nes // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Character = { - __typename: \\"Character\\", + __typename: "Character", // The ID of the character id: string, // The name of the character @@ -544,7 +544,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves @@ -566,7 +566,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\", + __typename: "FriendsConnection", // The total number of friends totalCount?: number | null, // The edges for each of the character's friends. @@ -578,7 +578,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\", + __typename: "FriendsEdge", // A cursor used for pagination cursor: string, // The character represented by this friendship edge @@ -586,14 +586,14 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\", + __typename: "PageInfo", startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, }; export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -604,7 +604,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\", + __typename: "Droid", // The ID of the droid id: string, // What others call this droid @@ -625,31 +625,31 @@ export type HeroAndFriendsNamesQueryVariables = { export type HeroAndFriendsNamesQuery = { hero: ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: Array<( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } ) | null > | null, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, // The friends of the character, or an empty list if they have none friends: Array<( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -666,7 +666,7 @@ exports[`TypeScript code generation #generateSource() should generate simple nes // This file was automatically generated and should not be edited. export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -681,7 +681,7 @@ export type StarshipCoordsQueryVariables = { export type StarshipCoordsQuery = { starship?: { - __typename: \\"Starship\\", + __typename: "Starship", coordinates?: Array< Array< number > > | null, } | null, }; @@ -694,7 +694,7 @@ exports[`TypeScript code generation #generateSource() should generate simple que // This file was automatically generated and should not be edited. export type Character = { - __typename: \\"Character\\", + __typename: "Character", // The ID of the character id: string, // The name of the character @@ -708,7 +708,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves @@ -730,7 +730,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\", + __typename: "FriendsConnection", // The total number of friends totalCount?: number | null, // The edges for each of the character's friends. @@ -742,7 +742,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\", + __typename: "FriendsEdge", // A cursor used for pagination cursor: string, // The character represented by this friendship edge @@ -750,7 +750,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\", + __typename: "PageInfo", startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, @@ -758,14 +758,14 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -776,7 +776,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\", + __typename: "Droid", // The ID of the droid id: string, // What others call this droid @@ -796,11 +796,11 @@ export type HeroNameQueryVariables = { export type HeroNameQuery = { hero: ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -816,14 +816,14 @@ exports[`TypeScript code generation #generateSource() should generate simple que // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Character = { - __typename: \\"Character\\", + __typename: "Character", // The ID of the character id: string, // The name of the character @@ -837,7 +837,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves @@ -859,7 +859,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\", + __typename: "FriendsConnection", // The total number of friends totalCount?: number | null, // The edges for each of the character's friends. @@ -871,7 +871,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\", + __typename: "FriendsEdge", // A cursor used for pagination cursor: string, // The character represented by this friendship edge @@ -879,14 +879,14 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\", + __typename: "PageInfo", startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, }; export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -897,7 +897,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\", + __typename: "Droid", // The ID of the droid id: string, // What others call this droid @@ -918,11 +918,11 @@ export type HeroNameQueryVariables = { export type HeroNameQuery = { hero: ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -937,7 +937,7 @@ exports[`TypeScript code generation #generateSource() should handle comments in // This file was automatically generated and should not be edited. export type CommentTest = { - __typename: \\"CommentTest\\", + __typename: "CommentTest", // This is a single-line comment singleLine?: string | null, // This is a multi-line @@ -947,10 +947,10 @@ export type CommentTest = { }; export enum EnumCommentTestCase { - first = \\"first\\", // This is a single-line comment + first = "first", // This is a single-line comment // This is a multi-line // comment. - second = \\"second\\", + second = "second", } @@ -959,7 +959,7 @@ export type CustomScalarQueryVariables = { export type CustomScalarQuery = { commentTest?: { - __typename: \\"CommentTest\\", + __typename: "CommentTest", enumCommentTest?: EnumCommentTestCase | null, } | null, }; @@ -972,18 +972,18 @@ exports[`TypeScript code generation #generateSource() should handle interfaces a // This file was automatically generated and should not be edited. export type InterfaceTestCase = { - __typename: \\"InterfaceTestCase\\", + __typename: "InterfaceTestCase", prop: string, }; export type ImplA = { - __typename: \\"ImplA\\", + __typename: "ImplA", prop: string, propA: string, }; export type ImplB = { - __typename: \\"ImplB\\", + __typename: "ImplB", prop: string, propB?: number | null, }; @@ -993,11 +993,11 @@ export type CustomScalarQueryVariables = { export type CustomScalarQuery = { interfaceTest: ( { - __typename: \\"ImplA\\", + __typename: "ImplA", prop: string, propA: string, } | { - __typename: \\"ImplB\\", + __typename: "ImplB", prop: string, propB?: number | null, } @@ -1012,7 +1012,7 @@ exports[`TypeScript code generation #generateSource() should handle multi-line c // This file was automatically generated and should not be edited. export type CommentTest = { - __typename: \\"CommentTest\\", + __typename: "CommentTest", // This is a single-line comment singleLine?: string | null, // This is a multi-line @@ -1022,10 +1022,10 @@ export type CommentTest = { }; export enum EnumCommentTestCase { - first = \\"first\\", // This is a single-line comment + first = "first", // This is a single-line comment // This is a multi-line // comment. - second = \\"second\\", + second = "second", } @@ -1034,7 +1034,7 @@ export type CustomScalarQueryVariables = { export type CustomScalarQuery = { commentTest?: { - __typename: \\"CommentTest\\", + __typename: "CommentTest", // This is a multi-line // comment. multiLine?: string | null, @@ -1049,7 +1049,7 @@ exports[`TypeScript code generation #generateSource() should handle single line // This file was automatically generated and should not be edited. export type CommentTest = { - __typename: \\"CommentTest\\", + __typename: "CommentTest", // This is a single-line comment singleLine?: string | null, // This is a multi-line @@ -1059,10 +1059,10 @@ export type CommentTest = { }; export enum EnumCommentTestCase { - first = \\"first\\", // This is a single-line comment + first = "first", // This is a single-line comment // This is a multi-line // comment. - second = \\"second\\", + second = "second", } @@ -1071,7 +1071,7 @@ export type CustomScalarQueryVariables = { export type CustomScalarQuery = { commentTest?: { - __typename: \\"CommentTest\\", + __typename: "CommentTest", // This is a single-line comment singleLine?: string | null, } | null, @@ -1088,12 +1088,12 @@ export type UnionTestCase = PartialA | PartialB export type PartialA = { - __typename: \\"PartialA\\", + __typename: "PartialA", prop: string, }; export type PartialB = { - __typename: \\"PartialB\\", + __typename: "PartialB", prop: string, }; @@ -1102,10 +1102,10 @@ export type CustomScalarQueryVariables = { export type CustomScalarQuery = { unionTest: ( { - __typename: \\"PartialA\\", + __typename: "PartialA", prop: string, } | { - __typename: \\"PartialB\\", + __typename: "PartialB", prop: string, } ) | null, @@ -1119,7 +1119,7 @@ exports[`TypeScript code generation #generateSource() should have __typename val // This file was automatically generated and should not be edited. export type Character = { - __typename: \\"Character\\", + __typename: "Character", // The ID of the character id: string, // The name of the character @@ -1133,7 +1133,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves @@ -1155,7 +1155,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\", + __typename: "FriendsConnection", // The total number of friends totalCount?: number | null, // The edges for each of the character's friends. @@ -1167,7 +1167,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\", + __typename: "FriendsEdge", // A cursor used for pagination cursor: string, // The character represented by this friendship edge @@ -1175,7 +1175,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\", + __typename: "PageInfo", startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, @@ -1183,14 +1183,14 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -1201,7 +1201,7 @@ export type Starship = { }; export type Droid = { - __typename: \\"Droid\\", + __typename: "Droid", // The ID of the droid id: string, // What others call this droid @@ -1221,11 +1221,11 @@ export type HeroNameQueryVariables = { export type HeroNameQuery = { hero: ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -1233,11 +1233,11 @@ export type HeroNameQuery = { }; export type HeroWithNameFragment = ( { - __typename: \\"Human\\", + __typename: "Human", // The name of the character name: string, } | { - __typename: \\"Droid\\", + __typename: "Droid", // The name of the character name: string, } @@ -1251,7 +1251,7 @@ exports[`TypeScript code generation #generateSource() should have __typename val // This file was automatically generated and should not be edited. export type Droid = { - __typename: \\"Droid\\", + __typename: "Droid", // The ID of the droid id: string, // What others call this droid @@ -1267,7 +1267,7 @@ export type Droid = { }; export type Character = { - __typename: \\"Character\\", + __typename: "Character", // The ID of the character id: string, // The name of the character @@ -1281,7 +1281,7 @@ export type Character = { }; export type Human = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves @@ -1303,7 +1303,7 @@ export type Human = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\", + __typename: "FriendsConnection", // The total number of friends totalCount?: number | null, // The edges for each of the character's friends. @@ -1315,7 +1315,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\", + __typename: "FriendsEdge", // A cursor used for pagination cursor: string, // The character represented by this friendship edge @@ -1323,7 +1323,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\", + __typename: "PageInfo", startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, @@ -1331,14 +1331,14 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -1353,14 +1353,14 @@ export type DroidNameQueryVariables = { export type DroidNameQuery = { droid?: { - __typename: \\"Droid\\", + __typename: "Droid", // What others call this droid name: string, } | null, }; export type DroidWithNameFragment = { - __typename: \\"Droid\\", + __typename: "Droid", // What others call this droid name: string, }; @@ -1373,7 +1373,7 @@ exports[`TypeScript code generation #generateSource() should have the correct __ // This file was automatically generated and should not be edited. export type Human = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves @@ -1395,7 +1395,7 @@ export type Human = { }; export type Character = { - __typename: \\"Character\\", + __typename: "Character", // The ID of the character id: string, // The name of the character @@ -1409,7 +1409,7 @@ export type Character = { }; export type Droid = { - __typename: \\"Droid\\", + __typename: "Droid", // The ID of the droid id: string, // What others call this droid @@ -1425,7 +1425,7 @@ export type Droid = { }; export type FriendsConnection = { - __typename: \\"FriendsConnection\\", + __typename: "FriendsConnection", // The total number of friends totalCount?: number | null, // The edges for each of the character's friends. @@ -1437,7 +1437,7 @@ export type FriendsConnection = { }; export type FriendsEdge = { - __typename: \\"FriendsEdge\\", + __typename: "FriendsEdge", // A cursor used for pagination cursor: string, // The character represented by this friendship edge @@ -1445,7 +1445,7 @@ export type FriendsEdge = { }; export type PageInfo = { - __typename: \\"PageInfo\\", + __typename: "PageInfo", startCursor?: string | null, endCursor?: string | null, hasNextPage: boolean, @@ -1453,14 +1453,14 @@ export type PageInfo = { // The episodes in the Star Wars trilogy export enum Episode { - NEWHOPE = \\"NEWHOPE\\", // Star Wars Episode IV: A New Hope, released in 1977. - EMPIRE = \\"EMPIRE\\", // Star Wars Episode V: The Empire Strikes Back, released in 1980. - JEDI = \\"JEDI\\", // Star Wars Episode VI: Return of the Jedi, released in 1983. + NEWHOPE = "NEWHOPE", // Star Wars Episode IV: A New Hope, released in 1977. + EMPIRE = "EMPIRE", // Star Wars Episode V: The Empire Strikes Back, released in 1980. + JEDI = "JEDI", // Star Wars Episode VI: Return of the Jedi, released in 1983. } export type Starship = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -1476,14 +1476,14 @@ export type FindHumanQueryVariables = { export type FindHumanQuery = { human?: { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves name: string, // A list of starships this person has piloted, or an empty list if none starships?: Array< { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -1493,14 +1493,14 @@ export type FindHumanQuery = { }; export type humanDetailsFragment = { - __typename: \\"Human\\", + __typename: "Human", // The ID of the human id: string, // What this human calls themselves name: string, // A list of starships this person has piloted, or an empty list if none starships?: Array< { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship @@ -1509,7 +1509,7 @@ export type humanDetailsFragment = { }; export type starshipDetailsFragment = { - __typename: \\"Starship\\", + __typename: "Starship", // The ID of the starship id: string, // The name of the starship diff --git a/yarn.lock b/yarn.lock index b2254708f..d349fa2b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5599,12 +5599,47 @@ "@babel/highlight" "^7.23.4" chalk "^2.4.2" +"@babel/code-frame@^7.28.6", "@babel/code-frame@^7.29.0": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.29.0.tgz#7cd7a59f15b3cc0dcd803038f7792712a7d0b15c" + integrity sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw== + dependencies: + "@babel/helper-validator-identifier" "^7.28.5" + js-tokens "^4.0.0" + picocolors "^1.1.1" + "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.9": version "7.23.5" resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== -"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.14.0", "@babel/core@^7.7.2", "@babel/core@^7.8.0": +"@babel/compat-data@^7.28.6": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.29.0.tgz#00d03e8c0ac24dd9be942c5370990cbe1f17d88d" + integrity sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg== + +"@babel/core@^7.11.6", "@babel/core@^7.23.9": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.29.0.tgz#5286ad785df7f79d656e88ce86e650d16ca5f322" + integrity sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA== + dependencies: + "@babel/code-frame" "^7.29.0" + "@babel/generator" "^7.29.0" + "@babel/helper-compilation-targets" "^7.28.6" + "@babel/helper-module-transforms" "^7.28.6" + "@babel/helpers" "^7.28.6" + "@babel/parser" "^7.29.0" + "@babel/template" "^7.28.6" + "@babel/traverse" "^7.29.0" + "@babel/types" "^7.29.0" + "@jridgewell/remapping" "^2.3.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/core@^7.12.3", "@babel/core@^7.14.0": version "7.23.5" resolved "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz#6e23f2acbcb77ad283c5ed141f824fd9f70101c7" integrity sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g== @@ -5646,6 +5681,17 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.29.0": + version "7.29.1" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.29.1.tgz#d09876290111abbb00ef962a7b83a5307fba0d50" + integrity sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw== + dependencies: + "@babel/parser" "^7.29.0" + "@babel/types" "^7.29.0" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" + jsesc "^3.0.2" + "@babel/helper-annotate-as-pure@^7.22.5": version "7.22.5" resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" @@ -5664,6 +5710,17 @@ lru-cache "^5.1.1" semver "^6.3.1" +"@babel/helper-compilation-targets@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz#32c4a3f41f12ed1532179b108a4d746e105c2b25" + integrity sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA== + dependencies: + "@babel/compat-data" "^7.28.6" + "@babel/helper-validator-option" "^7.27.1" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + "@babel/helper-create-class-features-plugin@^7.18.6": version "7.23.5" resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.5.tgz#2a8792357008ae9ce8c0f2b78b9f646ac96b314b" @@ -5692,6 +5749,11 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.23.0" +"@babel/helper-globals@^7.28.0": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" + integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== + "@babel/helper-hoist-variables@^7.22.5": version "7.22.5" resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" @@ -5713,6 +5775,14 @@ dependencies: "@babel/types" "^7.22.15" +"@babel/helper-module-imports@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz#60632cbd6ffb70b22823187201116762a03e2d5c" + integrity sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw== + dependencies: + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" + "@babel/helper-module-transforms@^7.23.3": version "7.23.3" resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" @@ -5724,6 +5794,15 @@ "@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-validator-identifier" "^7.22.20" +"@babel/helper-module-transforms@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz#9312d9d9e56edc35aeb6e95c25d4106b50b9eb1e" + integrity sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA== + dependencies: + "@babel/helper-module-imports" "^7.28.6" + "@babel/helper-validator-identifier" "^7.28.5" + "@babel/traverse" "^7.28.6" + "@babel/helper-optimise-call-expression@^7.22.5": version "7.22.5" resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e" @@ -5736,6 +5815,11 @@ resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== +"@babel/helper-plugin-utils@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8" + integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug== + "@babel/helper-replace-supers@^7.22.20": version "7.22.20" resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz#e37d367123ca98fe455a9887734ed2e16eb7a793" @@ -5771,6 +5855,11 @@ resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== +"@babel/helper-string-parser@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" + integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== + "@babel/helper-validator-identifier@^7.22.20": version "7.22.20" resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" @@ -5781,11 +5870,21 @@ resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== +"@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== + "@babel/helper-validator-option@^7.22.15": version "7.23.5" resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== +"@babel/helper-validator-option@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== + "@babel/helpers@^7.23.5": version "7.23.5" resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz#52f522840df8f1a848d06ea6a79b79eefa72401e" @@ -5795,6 +5894,14 @@ "@babel/traverse" "^7.23.5" "@babel/types" "^7.23.5" +"@babel/helpers@^7.28.6": + version "7.29.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.29.2.tgz#9cfbccb02b8e229892c0b07038052cc1a8709c49" + integrity sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw== + dependencies: + "@babel/template" "^7.28.6" + "@babel/types" "^7.29.0" + "@babel/highlight@^7.10.4": version "7.25.9" resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz#8141ce68fc73757946f983b343f1231f4691acc6" @@ -5819,6 +5926,13 @@ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz#37dee97c4752af148e1d38c34b856b2507660563" integrity sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ== +"@babel/parser@^7.23.9", "@babel/parser@^7.28.6", "@babel/parser@^7.29.0": + version "7.29.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.29.2.tgz#58bd50b9a7951d134988a1ae177a35ef9a703ba1" + integrity sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA== + dependencies: + "@babel/types" "^7.29.0" + "@babel/plugin-proposal-class-properties@^7.0.0": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" @@ -5887,6 +6001,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-syntax-jsx@^7.7.2": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz#f8ca28bbd84883b5fea0e447c635b81ba73997ee" + integrity sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w== + dependencies: + "@babel/helper-plugin-utils" "^7.28.6" + "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -6124,7 +6245,16 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" -"@babel/traverse@^7.14.0", "@babel/traverse@^7.23.5", "@babel/traverse@^7.7.2": +"@babel/template@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.28.6.tgz#0e7e56ecedb78aeef66ce7972b082fce76a23e57" + integrity sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + +"@babel/traverse@^7.14.0", "@babel/traverse@^7.23.5": version "7.23.5" resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz#f546bf9aba9ef2b042c0e00d245990c15508e7ec" integrity sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w== @@ -6140,6 +6270,19 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.28.6", "@babel/traverse@^7.29.0": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.29.0.tgz#f323d05001440253eead3c9c858adbe00b90310a" + integrity sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA== + dependencies: + "@babel/code-frame" "^7.29.0" + "@babel/generator" "^7.29.0" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.29.0" + "@babel/template" "^7.28.6" + "@babel/types" "^7.29.0" + debug "^4.3.1" + "@babel/types@7.0.0-beta.4": version "7.0.0-beta.4" resolved "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.4.tgz#988cc7683c448d7710e7d80bd88558183a102349" @@ -6158,6 +6301,14 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@babel/types@^7.28.6", "@babel/types@^7.29.0": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.29.0.tgz#9f5b1e838c446e72cf3cd4b918152b8c605e37c7" + integrity sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A== + dependencies: + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" + "@balena/dockerignore@^1.0.2": version "1.0.2" resolved "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" @@ -6422,6 +6573,18 @@ dependencies: eslint-visitor-keys "^3.3.0" +"@eslint-community/eslint-utils@^4.4.0": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz#4e90af67bc51ddee6cdef5284edf572ec376b595" + integrity sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ== + dependencies: + eslint-visitor-keys "^3.4.3" + +"@eslint-community/regexpp@^4.5.1": + version "4.12.2" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" + integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -6719,211 +6882,201 @@ js-yaml "^3.13.1" resolve-from "^5.0.0" -"@istanbuljs/schema@^0.1.2": +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": version "0.1.3" resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz#260fe7239602fe5130a94f1aa386eff54b014bba" - integrity sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg== +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^29.7.0" + jest-util "^29.7.0" slash "^3.0.0" -"@jest/core@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz#267ac5f704e09dc52de2922cbf3af9edcd64b626" - integrity sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ== +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== dependencies: - "@jest/console" "^27.5.1" - "@jest/reporters" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - emittery "^0.8.1" + ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^27.5.1" - jest-config "^27.5.1" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-resolve-dependencies "^27.5.1" - jest-runner "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - jest-watcher "^27.5.1" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" micromatch "^4.0.4" - rimraf "^3.0.0" + pretty-format "^29.7.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^26.6.2": - version "26.6.2" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" - integrity sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA== +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== dependencies: - "@jest/fake-timers" "^26.6.2" - "@jest/types" "^26.6.2" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-mock "^26.6.2" + jest-mock "^29.7.0" -"@jest/environment@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" - integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== dependencies: - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" + jest-get-type "^29.6.3" -"@jest/fake-timers@^26.6.2": - version "26.6.2" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz#459c329bcf70cee4af4d7e3f3e67848123535aad" - integrity sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA== +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== dependencies: - "@jest/types" "^26.6.2" - "@sinonjs/fake-timers" "^6.0.1" - "@types/node" "*" - jest-message-util "^26.6.2" - jest-mock "^26.6.2" - jest-util "^26.6.2" + expect "^29.7.0" + jest-snapshot "^29.7.0" -"@jest/fake-timers@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" - integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== dependencies: - "@jest/types" "^27.5.1" - "@sinonjs/fake-timers" "^8.0.1" + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" "@types/node" "*" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" -"@jest/globals@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" - integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== dependencies: - "@jest/environment" "^27.5.1" - "@jest/types" "^27.5.1" - expect "^27.5.1" + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" -"@jest/reporters@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz#ceda7be96170b03c923c37987b64015812ffec04" - integrity sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw== +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" - glob "^7.1.2" + glob "^7.1.3" graceful-fs "^4.2.9" istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" + istanbul-lib-instrument "^6.0.0" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-haste-map "^27.5.1" - jest-resolve "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" slash "^3.0.0" - source-map "^0.6.0" string-length "^4.0.1" - terminal-link "^2.0.0" - v8-to-istanbul "^8.1.0" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" -"@jest/source-map@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" - integrity sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg== +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== dependencies: + "@jridgewell/trace-mapping" "^0.3.18" callsites "^3.0.0" graceful-fs "^4.2.9" - source-map "^0.6.0" -"@jest/test-result@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz#56a6585fa80f7cdab72b8c5fc2e871d03832f5bb" - integrity sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag== +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== dependencies: - "@jest/console" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz#4057e0e9cea4439e544c6353c6affe58d095745b" - integrity sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ== +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== dependencies: - "@jest/test-result" "^27.5.1" + "@jest/test-result" "^29.7.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-runtime "^27.5.1" + jest-haste-map "^29.7.0" + slash "^3.0.0" -"@jest/transform@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz#6c3501dcc00c4c08915f292a600ece5ecfe1f409" - integrity sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw== +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.5.1" + "@babel/core" "^7.11.6" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-regex-util "^27.5.1" - jest-util "^27.5.1" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" + write-file-atomic "^4.0.2" -"@jest/types@^26.6.2": - version "26.6.2" - resolved "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" - integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== dependencies: + "@jest/schemas" "^29.6.3" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" + "@types/yargs" "^17.0.8" chalk "^4.0.0" "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": @@ -6935,6 +7088,22 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" @@ -6950,6 +7119,11 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -6958,6 +7132,14 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28": + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": version "0.3.20" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" @@ -8130,26 +8312,24 @@ colors "~1.2.1" string-argv "~0.3.1" -"@sinonjs/commons@^1.7.0": - version "1.8.6" - resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" - integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ== +"@sinclair/typebox@^0.27.8": + version "0.27.10" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.10.tgz#beefe675f1853f73676aecc915b2bd2ac98c4fc6" + integrity sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA== + +"@sinonjs/commons@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^6.0.1": - version "6.0.1" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40" - integrity sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== dependencies: - "@sinonjs/commons" "^1.7.0" - -"@sinonjs/fake-timers@^8.0.1": - version "8.1.0" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" - integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg== - dependencies: - "@sinonjs/commons" "^1.7.0" + "@sinonjs/commons" "^3.0.0" "@smithy/abort-controller@^2.0.1", "@smithy/abort-controller@^2.0.15": version "2.0.15" @@ -9687,7 +9867,7 @@ resolved "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.15.tgz#11fb1ab5a4f984d00d1c80a768f6fb8d59f96966" integrity sha512-JUgfZHUOMbtjopxiOQaaF+Uovk5wpDqpXR+XLWiOivCWSy1FccO30lvNNpCt8geFwq8VmGT2y9OMkOpA0g5O5g== -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": +"@types/babel__core@^7.1.14": version "7.20.5" resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== @@ -9713,7 +9893,7 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": version "7.20.4" resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz#ec2c06fed6549df8bc0eb4615b683749a4a92e1b" integrity sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA== @@ -9760,9 +9940,9 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/graceful-fs@^4.1.2": +"@types/graceful-fs@^4.1.3": version "4.1.9" - resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== dependencies: "@types/node" "*" @@ -9796,20 +9976,25 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^27.0.0": - version "27.5.2" - resolved "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c" - integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== +"@types/jest@^29.5.12": + version "29.5.14" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.14.tgz#2b910912fa1d6856cadcd0c1f95af7df1d6049e5" + integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ== dependencies: - jest-matcher-utils "^27.0.0" - pretty-format "^27.0.0" + expect "^29.0.0" + pretty-format "^29.0.0" "@types/js-yaml@^4.0.0": version "4.0.9" resolved "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2" integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== -"@types/json-schema@^7.0.7", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.12": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/json-schema@^7.0.9": version "7.0.13" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== @@ -9896,11 +10081,6 @@ resolved "https://registry.npmjs.org/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== -"@types/prettier@^2.1.5": - version "2.7.3" - resolved "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" - integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== - "@types/rimraf@^3.0.0": version "3.0.2" resolved "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz#a63d175b331748e5220ad48c901d7bbf1f44eef8" @@ -9914,6 +10094,11 @@ resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== +"@types/semver@^7.5.0": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.7.1.tgz#3ce3af1a5524ef327d2da9e4fd8b6d95c8d70528" + integrity sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA== + "@types/stack-utils@^2.0.0": version "2.0.3" resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" @@ -9929,17 +10114,17 @@ resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== -"@types/yargs@^15.0.0", "@types/yargs@^15.0.1": +"@types/yargs@^15.0.1": version "15.0.19" resolved "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz#328fb89e46109ecbdb70c295d96ff2f46dfd01b9" integrity sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA== dependencies: "@types/yargs-parser" "*" -"@types/yargs@^16.0.0": - version "16.0.9" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.9.tgz#ba506215e45f7707e6cbcaf386981155b7ab956e" - integrity sha512-tHhzvkFXZQeTECenFoRljLBYPZJ7jAVxqqtEI0qTLOmuultnFp4I9yKE17vTuhf7BkhCu7I4XuemPgikDVuYqA== +"@types/yargs@^17.0.8": + version "17.0.35" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.35.tgz#07013e46aa4d7d7d50a49e15604c1c5340d4eb24" + integrity sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg== dependencies: "@types/yargs-parser" "*" @@ -9953,49 +10138,33 @@ resolved "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.7.tgz#114e2ffc8d5be4915fdd5bc90668fc0ceaadb760" integrity sha512-LKzNTjj+2j09wAo/vvVjzgw5qckJJzhdGgWHW7j69QIGdq/KnZrMAMIHQiWGl3Ccflh5/CudBAntTPYdprPltA== -"@typescript-eslint/eslint-plugin@^4.0.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" - integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== - dependencies: - "@typescript-eslint/experimental-utils" "4.33.0" - "@typescript-eslint/scope-manager" "4.33.0" - debug "^4.3.1" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.1.0" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/experimental-utils@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" - integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== - dependencies: - "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" - -"@typescript-eslint/parser@^4.0.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899" - integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== +"@typescript-eslint/eslint-plugin@^6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" + integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== dependencies: - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - debug "^4.3.1" + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/type-utils" "6.21.0" + "@typescript-eslint/utils" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" -"@typescript-eslint/scope-manager@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" - integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== +"@typescript-eslint/parser@^6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" + integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": version "5.62.0" @@ -10005,28 +10174,33 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/types@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" - integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== +"@typescript-eslint/scope-manager@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" + integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== + dependencies: + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + +"@typescript-eslint/type-utils@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" + integrity sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag== + dependencies: + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/utils" "6.21.0" + debug "^4.3.4" + ts-api-utils "^1.0.1" "@typescript-eslint/types@5.62.0": version "5.62.0" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/typescript-estree@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" - integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" - tsutils "^3.21.0" +"@typescript-eslint/types@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" + integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -10041,6 +10215,33 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" + integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== + dependencies: + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" + integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + semver "^7.5.4" + "@typescript-eslint/utils@^5.10.0": version "5.62.0" resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" @@ -10055,14 +10256,6 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/visitor-keys@4.33.0": - version "4.33.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" - integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== - dependencies: - "@typescript-eslint/types" "4.33.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" @@ -10071,6 +10264,14 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47" + integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== + dependencies: + "@typescript-eslint/types" "6.21.0" + eslint-visitor-keys "^3.4.1" + "@whatwg-node/events@^0.1.0": version "0.1.1" resolved "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz#0ca718508249419587e130da26d40e29d99b5356" @@ -10137,45 +10338,27 @@ JSONStream@^1.0.4, JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.3, abab@^2.0.5: - version "2.0.6" - resolved "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" - integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== - abbrev@1, abbrev@^1.0.0: version "1.1.1" resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -acorn-globals@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" - integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - acorn-jsx@^5.3.1: version "5.3.2" resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^7.1.1: - version "7.2.0" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - acorn-walk@^8.1.1: version "8.3.1" resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz#2f10f5b69329d90ae18c58bf1fa8fccd8b959a43" integrity sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw== -acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.4.0: version "7.4.1" resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.2.4, acorn@^8.4.1: +acorn@^8.4.1: version "8.11.2" resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== @@ -10273,12 +10456,7 @@ ansi-escapes@^4.2.1: dependencies: type-fest "^0.21.3" -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - -ansi-regex@^5.0.0, ansi-regex@^5.0.1: +ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -10748,16 +10926,15 @@ babel-generator@^6.26.1: source-map "^0.5.7" trim-right "^1.0.1" -babel-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" - integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== +babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== dependencies: - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/transform" "^29.7.0" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^27.5.1" + babel-preset-jest "^29.6.3" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -10780,14 +10957,14 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz#9be98ecf28c331eb9f5df9c72d6f89deb8181c2e" - integrity sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ== +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" + "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: @@ -10846,12 +11023,12 @@ babel-preset-fbjs@^3.4.0: "@babel/plugin-transform-template-literals" "^7.0.0" babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" -babel-preset-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz#91f10f58034cb7989cb4f962b69fa6eef6a6bc81" - integrity sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag== +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== dependencies: - babel-plugin-jest-hoist "^27.5.1" + babel-plugin-jest-hoist "^29.6.3" babel-preset-current-node-syntax "^1.0.0" babel-runtime@^6.22.0, babel-runtime@^6.26.0: @@ -10887,6 +11064,11 @@ base64-js@^1.0.2, base64-js@^1.3.1: resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +baseline-browser-mapping@^2.10.12: + version "2.10.16" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.16.tgz#ef80cf218a53f165689a6e32ffffdca1f35d979c" + integrity sha512-Lyf3aK28zpsD1yQMiiHD4RvVb6UdMoo8xzG2XzFIfR9luPzOpcBlAsT/qfB1XWS1bxWT+UtE4WmQgsp297FYOA== + basic-ftp@^5.0.2: version "5.2.0" resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.2.0.tgz#7c2dff63c918bde60e6bad1f2ff93dcf5137a40a" @@ -10938,11 +11120,6 @@ braces@^3.0.3: dependencies: fill-range "^7.1.1" -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - browserslist@^4.21.9: version "4.22.2" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b" @@ -10953,9 +11130,20 @@ browserslist@^4.21.9: node-releases "^2.0.14" update-browserslist-db "^1.0.13" -bs-logger@0.x: +browserslist@^4.24.0: + version "4.28.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.2.tgz#f50b65362ef48974ca9f50b3680566d786b811d2" + integrity sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg== + dependencies: + baseline-browser-mapping "^2.10.12" + caniuse-lite "^1.0.30001782" + electron-to-chromium "^1.5.328" + node-releases "^2.0.36" + update-browserslist-db "^1.2.3" + +bs-logger@^0.2.6: version "0.2.6" - resolved "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== dependencies: fast-json-stable-stringify "2.x" @@ -11125,6 +11313,11 @@ caniuse-lite@^1.0.30001565: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz#61a8e17caf3752e3e426d4239c549ebbb37fef0d" integrity sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA== +caniuse-lite@^1.0.30001782: + version "1.0.30001786" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001786.tgz#586120fc73f3c7ee82152f76acd0c37e04acefbb" + integrity sha512-4oxTZEvqmLLrERwxO76yfKM7acZo310U+v4kqexI2TL1DkkUEMT8UijrxxcnVdxR3qkVf5awGRX+4Z6aPHVKrA== + capital-case@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" @@ -11668,11 +11861,6 @@ conventional-recommended-bump@^6.1.0: meow "^8.0.0" q "^1.5.1" -convert-source-map@^1.4.0, convert-source-map@^1.6.0: - version "1.9.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - convert-source-map@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" @@ -11744,6 +11932,19 @@ cosmiconfig@^8.0.0, cosmiconfig@^8.3.6: parse-json "^5.2.0" path-type "^4.0.0" +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + create-require@^1.1.0: version "1.1.1" resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -11785,23 +11986,6 @@ crypt@0.0.2, crypt@^0.0.2: resolved "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== -cssom@^0.4.4: - version "0.4.4" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" - integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== - dependencies: - cssom "~0.3.6" - cz-conventional-changelog@3.3.0, cz-conventional-changelog@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz#9246947c90404149b3fe2cf7ee91acad3b7d22d2" @@ -11831,15 +12015,6 @@ data-uri-to-buffer@^6.0.0: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz#540bd4c8753a25ee129035aebdedf63b078703c7" integrity sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg== -data-urls@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" - integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== - dependencies: - abab "^2.0.3" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - dateformat@^3.0.0: version "3.0.3" resolved "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -11884,16 +12059,16 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -decimal.js@^10.2.1: - version "10.4.3" - resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" - integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== - dedent@0.7.0, dedent@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +dedent@^1.0.0: + version "1.7.2" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.2.tgz#34e2264ab538301e27cf7b07bf2369c19baa8dd9" + integrity sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA== + deep-diff@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/deep-diff/-/deep-diff-1.0.2.tgz#afd3d1f749115be965e89c63edc7abb1506b9c26" @@ -12013,10 +12188,10 @@ dezalgo@^1.0.0: asap "^2.0.0" wrappy "1" -diff-sequences@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" - integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== diff@^4.0.1: version "4.0.2" @@ -12044,13 +12219,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -domexception@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" - integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== - dependencies: - webidl-conversions "^5.0.0" - dot-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" @@ -12114,10 +12282,15 @@ electron-to-chromium@^1.4.601: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.608.tgz#ff567c51dde4892ae330860c7d9f19571e9e1d69" integrity sha512-J2f/3iIIm3Mo0npneITZ2UPe4B1bg8fTNrFjD8715F/k1BvbviRuqYGkET1PgprrczXYTHFvotbBOmUp6KE0uA== -emittery@^0.8.1: - version "0.8.1" - resolved "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" - integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== +electron-to-chromium@^1.5.328: + version "1.5.332" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.332.tgz#72e3a3e2ce4447ebea8ae2b38b59895f571f59a2" + integrity sha512-7OOtytmh/rINMLwaFTbcMVvYXO3AUm029X0LcyfYk0B557RlPkdpTpnH9+htMlfu5dKwOmT0+Zs2Aw+lnn6TeQ== + +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== emoji-regex@^8.0.0: version "8.0.0" @@ -12312,6 +12485,11 @@ escalade@^3.1.1: resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -12327,7 +12505,7 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escodegen@^2.0.0, escodegen@^2.1.0: +escodegen@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== @@ -12503,13 +12681,6 @@ eslint-utils@^2.1.0: dependencies: eslint-visitor-keys "^1.1.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" @@ -12520,9 +12691,9 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.3.0: +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^7.0.0: @@ -12686,15 +12857,16 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" - integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== +expect@^29.0.0, expect@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== dependencies: - "@jest/types" "^27.5.1" - jest-get-type "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" exponential-backoff@^3.1.1: version "3.1.1" @@ -12752,7 +12924,7 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -13246,7 +13418,7 @@ glob@7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.2.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@^7.2.0: +glob@7.2.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@^7.2.0: version "7.2.3" resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -13346,11 +13518,16 @@ gopd@^1.2.0: resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + graphql-config@^2.2.1: version "2.2.2" resolved "https://registry.npmjs.org/graphql-config/-/graphql-config-2.2.2.tgz#a4b577826bba9b83e7b0f6cd617be43ca67da045" @@ -13461,6 +13638,18 @@ handlebars@^4.7.7: optionalDependencies: uglify-js "^3.1.4" +handlebars@^4.7.9: + version "4.7.9" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.9.tgz#6f139082ab58dc4e5a0e51efe7db5ae890d56a0f" + integrity sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.2" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" @@ -13582,13 +13771,6 @@ hosted-git-info@^5.0.0: dependencies: lru-cache "^7.5.1" -html-encoding-sniffer@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" - integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== - dependencies: - whatwg-encoding "^1.0.5" - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -13599,7 +13781,7 @@ http-cache-semantics@^4.1.0: resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== -http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1, http-proxy-agent@^5.0.0, http-proxy-agent@^7.0.0: +http-proxy-agent@^4.0.0, http-proxy-agent@^5.0.0, http-proxy-agent@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz#e9096c5afd071a3fce56e6252bb321583c124673" integrity sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ== @@ -13666,7 +13848,7 @@ husky@^4.0.0: slash "^3.0.0" which-pm-runs "^1.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.24: +iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -13709,12 +13891,12 @@ ignore@^4.0.6: resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.4, ignore@^5.1.8, ignore@^5.2.0: +ignore@^5.0.4, ignore@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== -ignore@^5.3.0, ignore@^5.3.2: +ignore@^5.2.4, ignore@^5.3.0, ignore@^5.3.2: version "5.3.2" resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== @@ -14039,7 +14221,7 @@ is-generator-function@^1.0.10: dependencies: has-tostringtag "^1.0.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: +is-glob@^4.0.0, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -14107,11 +14289,6 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -14283,7 +14460,7 @@ istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: +istanbul-lib-instrument@^5.0.4: version "5.2.1" resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== @@ -14294,6 +14471,17 @@ istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: istanbul-lib-coverage "^3.2.0" semver "^6.3.0" +istanbul-lib-instrument@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== + dependencies: + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + istanbul-lib-report@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" @@ -14348,467 +14536,373 @@ java-ast@^0.3.0: dependencies: antlr4ts "^0.5.0-alpha.3" -jest-changed-files@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5" - integrity sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw== +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== dependencies: - "@jest/types" "^27.5.1" execa "^5.0.0" - throat "^6.0.1" - -jest-circus@^27.0.0, jest-circus@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz#37a5a4459b7bf4406e53d637b49d22c65d125ecc" - integrity sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + jest-util "^29.7.0" + p-limit "^3.1.0" + +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - dedent "^0.7.0" - expect "^27.5.1" + dedent "^1.0.0" is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + pretty-format "^29.7.0" + pure-rand "^6.0.0" slash "^3.0.0" stack-utils "^2.0.3" - throat "^6.0.1" -jest-cli@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz#278794a6e6458ea8029547e6c6cbf673bd30b145" - integrity sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw== +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== dependencies: - "@jest/core" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" chalk "^4.0.0" + create-jest "^29.7.0" exit "^0.1.2" - graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - prompts "^2.0.1" - yargs "^16.2.0" - -jest-config@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41" - integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA== - dependencies: - "@babel/core" "^7.8.0" - "@jest/test-sequencer" "^27.5.1" - "@jest/types" "^27.5.1" - babel-jest "^27.5.1" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + yargs "^17.3.1" + +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== + dependencies: + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" - glob "^7.1.1" + glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-get-type "^27.5.1" - jest-jasmine2 "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runner "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^27.5.1" + pretty-format "^29.7.0" slash "^3.0.0" strip-json-comments "^3.1.1" -jest-diff@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" - integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== dependencies: chalk "^4.0.0" - diff-sequences "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-docblock@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0" - integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== dependencies: detect-newline "^3.0.0" -jest-each@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz#5bc87016f45ed9507fed6e4702a5b468a5b2c44e" - integrity sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ== +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" chalk "^4.0.0" - jest-get-type "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - -jest-environment-jsdom@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" - integrity sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - jsdom "^16.6.0" - -jest-environment-node@^26.6.2: - version "26.6.2" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz#824e4c7fb4944646356f11ac75b229b0035f2b0c" - integrity sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag== - dependencies: - "@jest/environment" "^26.6.2" - "@jest/fake-timers" "^26.6.2" - "@jest/types" "^26.6.2" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-mock "^26.6.2" - jest-util "^26.6.2" + jest-mock "^29.7.0" + jest-util "^29.7.0" -jest-environment-node@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz#dedc2cfe52fab6b8f5714b4808aefa85357a365e" - integrity sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - -jest-get-type@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" - integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== -jest-haste-map@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz#9fd8bd7e7b4fa502d9c6164c5640512b4e811e7f" - integrity sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng== +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== dependencies: - "@jest/types" "^27.5.1" - "@types/graceful-fs" "^4.1.2" + "@jest/types" "^29.6.3" + "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^27.5.1" - jest-serializer "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" micromatch "^4.0.4" - walker "^1.0.7" + walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4" - integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.5.1" - is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - throat "^6.0.1" - -jest-junit@^12.0.0: - version "12.3.0" - resolved "https://registry.npmjs.org/jest-junit/-/jest-junit-12.3.0.tgz#ee41a74e439eecdc8965f163f83035cce5998d6d" - integrity sha512-+NmE5ogsEjFppEl90GChrk7xgz8xzvF0f+ZT5AnhW6suJC93gvQtmQjfyjDnE0Z2nXJqEkxF0WXlvjG/J+wn/g== +jest-junit@^16.0.0: + version "16.0.0" + resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-16.0.0.tgz#d838e8c561cf9fdd7eb54f63020777eee4136785" + integrity sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ== dependencies: mkdirp "^1.0.4" - strip-ansi "^5.2.0" + strip-ansi "^6.0.1" uuid "^8.3.2" xml "^1.0.1" -jest-leak-detector@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz#6ec9d54c3579dd6e3e66d70e3498adf80fde3fb8" - integrity sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ== - dependencies: - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" - integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== dependencies: - chalk "^4.0.0" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-message-util@^26.6.2: - version "26.6.2" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07" - integrity sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA== +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.6.2" - "@types/stack-utils" "^2.0.0" chalk "^4.0.0" - graceful-fs "^4.2.4" - micromatch "^4.0.2" - pretty-format "^26.6.2" - slash "^3.0.0" - stack-utils "^2.0.2" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-message-util@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz#bdda72806da10d9ed6425e12afff38cd1458b6cf" - integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^27.5.1" + pretty-format "^29.7.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^26.6.2: - version "26.6.2" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302" - integrity sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew== +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== dependencies: - "@jest/types" "^26.6.2" - "@types/node" "*" - -jest-mock@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" - integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== - dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/node" "*" + jest-util "^29.7.0" jest-pnp-resolver@^1.2.2: version "1.2.3" resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== -jest-regex-util@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== -jest-resolve-dependencies@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz#d811ecc8305e731cc86dd79741ee98fed06f1da8" - integrity sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg== +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== dependencies: - "@jest/types" "^27.5.1" - jest-regex-util "^27.5.1" - jest-snapshot "^27.5.1" + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" -jest-resolve@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz#a2f1c5a0796ec18fe9eb1536ac3814c23617b384" - integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== dependencies: - "@jest/types" "^27.5.1" chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" + jest-haste-map "^29.7.0" jest-pnp-resolver "^1.2.2" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-util "^29.7.0" + jest-validate "^29.7.0" resolve "^1.20.0" - resolve.exports "^1.1.0" + resolve.exports "^2.0.0" slash "^3.0.0" -jest-runner@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz#071b27c1fa30d90540805c5645a0ec167c7b62e5" - integrity sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ== +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== dependencies: - "@jest/console" "^27.5.1" - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" - emittery "^0.8.1" + emittery "^0.13.1" graceful-fs "^4.2.9" - jest-docblock "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-haste-map "^27.5.1" - jest-leak-detector "^27.5.1" - jest-message-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runtime "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - source-map-support "^0.5.6" - throat "^6.0.1" - -jest-runtime@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz#4896003d7a334f7e8e4a53ba93fb9bcd3db0a1af" - integrity sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/globals" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" - execa "^5.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" slash "^3.0.0" strip-bom "^4.0.0" -jest-serializer@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz#81438410a30ea66fd57ff730835123dea1fb1f64" - integrity sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w== +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== dependencies: - "@types/node" "*" - graceful-fs "^4.2.9" - -jest-snapshot@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz#b668d50d23d38054a51b42c4039cab59ae6eb6a1" - integrity sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA== - dependencies: - "@babel/core" "^7.7.2" + "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.5.1" + expect "^29.7.0" graceful-fs "^4.2.9" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - jest-haste-map "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" natural-compare "^1.4.0" - pretty-format "^27.5.1" - semver "^7.3.2" - -jest-util@^26.6.2: - version "26.6.2" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" - integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== - dependencies: - "@jest/types" "^26.6.2" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - is-ci "^2.0.0" - micromatch "^4.0.2" + pretty-format "^29.7.0" + semver "^7.5.3" -jest-util@^27.0.0, jest-util@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== +jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067" - integrity sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^27.5.1" + jest-get-type "^29.6.3" leven "^3.1.0" - pretty-format "^27.5.1" + pretty-format "^29.7.0" -jest-watcher@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz#71bd85fb9bde3a2c2ec4dc353437971c43c642a2" - integrity sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw== +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== dependencies: - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.5.1" + emittery "^0.13.1" + jest-util "^29.7.0" string-length "^4.0.1" -jest-worker@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== dependencies: "@types/node" "*" + jest-util "^29.7.0" merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^27.0.0: - version "27.5.1" - resolved "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" - integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== +jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== dependencies: - "@jest/core" "^27.5.1" + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" import-local "^3.0.2" - jest-cli "^27.5.1" + jest-cli "^29.7.0" jiti@^1.19.1: version "1.21.0" @@ -14845,39 +14939,6 @@ js-yaml@4.1.0, js-yaml@^3.10.0, js-yaml@^4.0.0, js-yaml@^4.1.0, js-yaml@^4.1.1: dependencies: argparse "^2.0.1" -jsdom@^16.6.0: - version "16.7.0" - resolved "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" - integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== - dependencies: - abab "^2.0.5" - acorn "^8.2.4" - acorn-globals "^6.0.0" - cssom "^0.4.4" - cssstyle "^2.3.0" - data-urls "^2.0.0" - decimal.js "^10.2.1" - domexception "^2.0.1" - escodegen "^2.0.0" - form-data "^3.0.0" - html-encoding-sniffer "^2.0.1" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.0" - parse5 "6.0.1" - saxes "^5.0.1" - symbol-tree "^3.2.4" - tough-cookie "^4.0.0" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.1.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.5.0" - ws "^7.4.6" - xml-name-validator "^3.0.0" - jsesc@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" @@ -14888,6 +14949,11 @@ jsesc@^2.5.1: resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== + json-buffer@3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" @@ -14928,11 +14994,6 @@ json-stringify-safe@^5.0.1: resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@2.x, json5@^2.2.0, json5@^2.2.2, json5@^2.2.3: - version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - json5@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" @@ -14940,6 +15001,11 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" +json5@^2.2.0, json5@^2.2.2, json5@^2.2.3: + version "2.2.3" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + jsonc-parser@3.2.0, jsonc-parser@^3.0.0: version "3.2.0" resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" @@ -15205,9 +15271,9 @@ lodash.map@^4.5.1: resolved "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" integrity sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q== -lodash.memoize@4.x: +lodash.memoize@^4.1.2: version "4.1.2" - resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== lodash.merge@^4.6.2: @@ -15245,7 +15311,7 @@ lodash.upperfirst@^4.3.1: resolved "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== -lodash@4.17.21, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.7.0, lodash@~4.17.0, lodash@~4.17.15: +lodash@4.17.21, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@~4.17.0, lodash@~4.17.15: version "4.17.23" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.23.tgz#f113b0378386103be4f6893388c73d0bde7f2c5a" integrity sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w== @@ -15349,7 +15415,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@1.x, make-error@^1.1.1: +make-error@^1.1.1, make-error@^1.3.6: version "1.3.6" resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -15479,7 +15545,7 @@ min-indent@^1.0.0: resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@3.0.5, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2, minimatch@^3.1.3, minimatch@^5.0.1: +minimatch@3.0.5, minimatch@9.0.3, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2, minimatch@^3.1.3, minimatch@^5.0.1: version "3.1.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w== @@ -15747,6 +15813,11 @@ node-releases@^2.0.14: resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.36: + version "2.0.37" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.37.tgz#9bd4f10b77ba39c2b9402d4e8399c482a797f671" + integrity sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg== + noms@0.0.0: version "0.0.0" resolved "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859" @@ -15916,11 +15987,6 @@ nullthrows@^1.1.1: resolved "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== -nwsapi@^2.2.0: - version "2.2.7" - resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" - integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== - nx@15.9.7, "nx@>=14.8.1 < 16": version "15.9.7" resolved "https://registry.npmjs.org/nx/-/nx-15.9.7.tgz#f0e713cedb8637a517d9c4795c99afec4959a1b6" @@ -16171,7 +16237,7 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: +p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -16378,11 +16444,6 @@ parse-url@^8.1.0: dependencies: parse-path "^7.0.0" -parse5@6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - pascal-case@^3.1.1, pascal-case@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" @@ -16463,6 +16524,11 @@ picocolors@^1.0.0: resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -16541,24 +16607,14 @@ prettier@^1.19.1: resolved "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== -pretty-format@^26.6.2: - version "26.6.2" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" - integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== +pretty-format@^29.0.0, pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== dependencies: - "@jest/types" "^26.6.2" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^17.0.1" - -pretty-format@^27.0.0, pretty-format@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" - integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== - dependencies: - ansi-regex "^5.0.1" + "@jest/schemas" "^29.6.3" ansi-styles "^5.0.0" - react-is "^17.0.1" + react-is "^18.0.0" pretty-quick@^4.0.0: version "4.0.0" @@ -16676,11 +16732,6 @@ proxy-from-env@^1.1.0: resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -psl@^1.1.33: - version "1.9.0" - resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - pump@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -16704,6 +16755,11 @@ punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.1: resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== +pure-rand@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" + integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== + q@^1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -16721,11 +16777,6 @@ querystring@0.2.0: resolved "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -16741,10 +16792,10 @@ react-is@^16.13.1: resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^17.0.1: - version "17.0.2" - resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" - integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-is@^18.0.0: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== react-native-get-random-values@^1.4.0: version "1.10.0" @@ -16967,11 +17018,6 @@ require-main-filename@^2.0.0: resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -17004,10 +17050,10 @@ resolve-global@1.0.0, resolve-global@^1.0.0: dependencies: global-dirs "^0.1.1" -resolve.exports@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" - integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== +resolve.exports@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f" + integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.4, resolve@~1.22.1: version "1.22.8" @@ -17142,13 +17188,6 @@ sax@>=0.6.0: resolved "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz#a5dbe77db3be05c9d1ee7785dbd3ea9de51593d0" integrity sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA== -saxes@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" - integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== - dependencies: - xmlchars "^2.2.0" - semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -17164,7 +17203,7 @@ semver-regex@^3.1.2: resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@7.5.4, semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@~7.5.4: +semver@7.5.4, semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@~7.5.4: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -17186,6 +17225,11 @@ semver@^7.7.2, semver@^7.7.3: resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== +semver@^7.7.4: + version "7.7.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" + integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + sentence-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz#3645a7b8c117c787fde8702056225bb62a45131f" @@ -17386,7 +17430,15 @@ sort-keys@^4.0.0: dependencies: is-plain-obj "^2.0.0" -source-map-support@^0.5.16, source-map-support@^0.5.17, source-map-support@^0.5.6: +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.5.16: version "0.5.21" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -17404,11 +17456,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: - version "0.7.4" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - spdx-correct@^3.0.0: version "3.2.0" resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" @@ -17473,7 +17520,7 @@ stack-trace@0.0.x: resolved "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg== -stack-utils@^2.0.2, stack-utils@^2.0.3: +stack-utils@^2.0.3: version "2.0.6" resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== @@ -17583,13 +17630,6 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -17660,7 +17700,7 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^7.0.0, supports-color@^7.1.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== @@ -17674,14 +17714,6 @@ supports-color@^8.0.0: dependencies: has-flag "^4.0.0" -supports-hyperlinks@^2.0.0: - version "2.3.0" - resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -17699,11 +17731,6 @@ symbol-observable@^1.0.2, symbol-observable@^1.0.3: resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - table@^6.0.9: version "6.8.2" resolved "https://registry.npmjs.org/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" @@ -17764,14 +17791,6 @@ temp-dir@^1.0.0: resolved "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ== -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -17801,11 +17820,6 @@ throat@^5.0.0: resolved "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -throat@^6.0.1: - version "6.0.2" - resolved "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe" - integrity sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ== - through2@^2.0.0, through2@^2.0.1: version "2.0.5" resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -17860,23 +17874,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tough-cookie@^4.0.0: - version "4.1.3" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" - integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.2.0" - url-parse "^1.5.3" - -tr46@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" - integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== - dependencies: - punycode "^2.1.1" - tr46@~0.0.3: version "0.0.3" resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -17902,6 +17899,11 @@ triple-beam@^1.3.0: resolved "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== +ts-api-utils@^1.0.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064" + integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw== + ts-dedent@^1.1.0: version "1.2.0" resolved "https://registry.npmjs.org/ts-dedent/-/ts-dedent-1.2.0.tgz#6aa2229d837159bb6d635b6b233002423b91e0b0" @@ -17919,19 +17921,20 @@ ts-invariant@^0.4.0: dependencies: tslib "^1.9.3" -ts-jest@^27.0.0: - version "27.1.5" - resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297" - integrity sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA== +ts-jest@^29.1.2: + version "29.4.9" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.9.tgz#47dc33d0f5c36bddcedd16afefae285e0b049d2d" + integrity sha512-LTb9496gYPMCqjeDLdPrKuXtncudeV1yRZnF4Wo5l3SFi0RYEnYRNgMrFIdg+FHvfzjCyQk1cLncWVqiSX+EvQ== dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" - jest-util "^27.0.0" - json5 "2.x" - lodash.memoize "4.x" - make-error "1.x" - semver "7.x" - yargs-parser "20.x" + bs-logger "^0.2.6" + fast-json-stable-stringify "^2.1.0" + handlebars "^4.7.9" + json5 "^2.2.3" + lodash.memoize "^4.1.2" + make-error "^1.3.6" + semver "^7.7.4" + type-fest "^4.41.0" + yargs-parser "^21.1.1" ts-json-schema-generator@1.0.0: version "1.0.0" @@ -17964,15 +17967,23 @@ ts-node@^10.2.1, ts-node@^10.8.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -ts-node@^8.10.1: - version "8.10.2" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" - integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== +ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" arg "^4.1.0" + create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" - source-map-support "^0.5.17" + v8-compile-cache-lib "^3.0.1" yn "3.1.1" tsconfig-paths@^3.14.1, tsconfig-paths@^3.14.2: @@ -18083,6 +18094,11 @@ type-fest@^0.8.1: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-fest@^4.41.0: + version "4.41.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.41.0.tgz#6ae1c8e5731273c2bf1f58ad39cbae2c91a46c58" + integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA== + typed-array-buffer@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" @@ -18147,10 +18163,10 @@ typescript-json-schema@~0.52.0: typescript "~4.4.4" yargs "^17.1.1" -typescript@4.7.4: - version "4.7.4" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== +typescript@5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== "typescript@^3 || ^4": version "4.9.5" @@ -18249,11 +18265,6 @@ universalify@^0.1.0: resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -universalify@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" - integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== - universalify@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" @@ -18277,6 +18288,14 @@ update-browserslist-db@^1.0.13: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz#64d76db58713136acbeb4c49114366cc6cc2e80d" + integrity sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.1" + upper-case-first@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz#992c3273f882abd19d1e02894cc147117f844324" @@ -18298,14 +18317,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -url-parse@^1.5.3: - version "1.5.10" - resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - url@0.11.0: version "0.11.0" resolved "https://registry.npmjs.org/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -18374,14 +18385,14 @@ v8-compile-cache@^2.0.3: resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz#cdada8bec61e15865f05d097c5f4fd30e94dc128" integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw== -v8-to-istanbul@^8.1.0: - version "8.1.1" - resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz#77b752fd3975e31bbcef938f85e9bd1c7a8d60ed" - integrity sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w== +v8-to-istanbul@^9.0.1: + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== dependencies: + "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" + convert-source-map "^2.0.0" validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" @@ -18446,28 +18457,14 @@ vscode-uri@^2.1.2: resolved "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz#c8d40de93eb57af31f3c715dd650e2ca2c096f1c" integrity sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A== -w3c-hr-time@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" - integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== - dependencies: - browser-process-hrtime "^1.0.0" - -w3c-xmlserializer@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" - integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== - dependencies: - xml-name-validator "^3.0.0" - walk-up-path@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz#d4745e893dd5fd0dbb58dd0a4c6a33d9c9fec53e" integrity sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg== -walker@^1.0.7: +walker@^1.0.8: version "1.0.8" - resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== dependencies: makeerror "1.0.12" @@ -18489,28 +18486,11 @@ webidl-conversions@^5.0.0: resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" - integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== - -whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - whatwg-fetch@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== -whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - whatwg-url-without-unicode@8.0.0-3: version "8.0.0-3" resolved "https://registry.npmjs.org/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-3.tgz#ab6df4bf6caaa6c85a59f6e82c026151d4bb376b" @@ -18528,15 +18508,6 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.7.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" - integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== - dependencies: - lodash "^4.7.0" - tr46 "^2.1.0" - webidl-conversions "^6.1.0" - which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -18706,7 +18677,7 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -write-file-atomic@^4.0.0, write-file-atomic@^4.0.1: +write-file-atomic@^4.0.0, write-file-atomic@^4.0.1, write-file-atomic@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== @@ -18747,21 +18718,11 @@ write-pkg@^4.0.0: type-fest "^0.4.1" write-json-file "^3.2.0" -ws@^7.4.6: - version "7.5.10" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" - integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== - ws@^8.14.2: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - xml2js@0.5.0: version "0.5.0" resolved "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7" @@ -18780,11 +18741,6 @@ xmlbuilder@~11.0.0: resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - xtend@~4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -18830,11 +18786,6 @@ yargs-parser@20.2.4: resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== -yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - yargs-parser@21.1.1, yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" @@ -18848,6 +18799,11 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.2, yargs-parser@^20.2.3: + version "20.2.9" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + yargs@^15.1.0, yargs@^15.3.1: version "15.4.1" resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -18878,7 +18834,7 @@ yargs@^16.1.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.0.0, yargs@^17.1.1, yargs@^17.6.2: +yargs@^17.0.0, yargs@^17.1.1, yargs@^17.3.1, yargs@^17.6.2: version "17.7.2" resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From 732a9ebfdfb4814143759b515284e6ed51ae20ec Mon Sep 17 00:00:00 2001 From: Michael Giraldo Date: Tue, 7 Apr 2026 22:03:51 -0700 Subject: [PATCH 3/3] build: finish TypeScript 5.2 migration cleanup --- .eslintrc.js | 7 +- .../src/utils/nexpect.ts | 4 +- packages/amplify-codegen/package.json | 11 +- .../commands/__snapshots__/add.test.js.snap | 24 +- .../__snapshots__/models.test.js.snap | 26 +- .../tests/commands/models.test.js | 2 +- packages/graphql-generator/package.json | 19 +- .../__snapshots__/models.test.ts.snap | 2800 ++++++++--------- .../__snapshots__/statements.test.ts.snap | 10 +- .../__snapshots__/types.test.ts.snap | 938 +++--- .../GraphQLStatementsFormatter.test.ts.snap | 10 +- .../utils/__snapshots__/maps.test.ts.snap | 2 +- .../src/scala/codeGeneration.js | 29 +- .../src/utilities/CodeGenerator.ts | 8 +- .../graphql-types-generator/test/loading.ts | 12 +- 15 files changed, 1943 insertions(+), 1959 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index a3a35b713..d80967135 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -75,7 +75,6 @@ module.exports = { 'function-paren-newline': 'off', // https://eslint.org/docs/rules/function-paren-newline 'global-require': 'off', // https://eslint.org/docs/rules/global-require 'import/no-dynamic-require': 'off', // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md - 'no-empty-function': ['error', { allow: ['constructors', 'arrowFunctions'] }], 'no-inner-declarations': 'off', // https://eslint.org/docs/rules/no-inner-declarations // New rules @@ -103,7 +102,8 @@ module.exports = { 'object-shorthand': 'off', 'prefer-const': 'off', 'prefer-template': 'off', - '@typescript-eslint/no-empty-function': 'off', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': ['error', { allow: ['constructors'] }], '@typescript-eslint/no-this-alias': 'off', 'import/named': 'off', 'import/newline-after-import': 'off', @@ -227,7 +227,7 @@ module.exports = { overrides: [ { // edit rules here to modify test linting - files: ['__tests__/**', '*.test.ts', '*.test.js'], + files: ['**/__tests__/**', '**/test/**', '**/*.test.ts', '**/*.test.js'], plugins: ['jest'], extends: ['plugin:jest/recommended'], rules: { @@ -245,6 +245,7 @@ module.exports = { 'jest/no-identical-title': 'warn', 'no-useless-computed-key': 'warn', '@typescript-eslint/ban-ts-comment': 'warn', + '@typescript-eslint/no-empty-function': 'off', 'guard-for-in': 'warn', }, }, diff --git a/packages/amplify-codegen-e2e-core/src/utils/nexpect.ts b/packages/amplify-codegen-e2e-core/src/utils/nexpect.ts index a9d226fad..b1455b39d 100644 --- a/packages/amplify-codegen-e2e-core/src/utils/nexpect.ts +++ b/packages/amplify-codegen-e2e-core/src/utils/nexpect.ts @@ -156,11 +156,11 @@ function chain(context: Context): ExecutionContext { return chain(context); }, - wait: function (expectation: string | RegExp, callback = (data: string) => {}): ExecutionContext { + wait: function (expectation: string | RegExp, callback?: (data: string) => void): ExecutionContext { let _wait: ExecutionStep = { fn: (data) => { let val = testExpectation(data, expectation, context); - if (val === true && typeof callback === 'function') { + if (val === true && callback) { callback(data); } return val; diff --git a/packages/amplify-codegen/package.json b/packages/amplify-codegen/package.json index db830de06..aca1f8afd 100644 --- a/packages/amplify-codegen/package.json +++ b/packages/amplify-codegen/package.json @@ -16,7 +16,7 @@ "aws" ], "scripts": { - "test": "jest", + "test": "jest --coverage --coverageReporters=clover --coverageReporters=text", "test-watch": "jest --watch", "extract-api": "ts-node ../../scripts/extract-api.ts" }, @@ -44,7 +44,6 @@ "graphql-transformer-core": "^8.0.0" }, "jest": { - "collectCoverage": true, "coverageThreshold": { "global": { "branches": 54, @@ -52,11 +51,9 @@ "lines": 72 } }, - "coverageReporters": [ - "clover", - "text" - ], - "testURL": "http://localhost", + "testEnvironmentOptions": { + "url": "http://localhost" + }, "testRegex": "((\\.|/)(test|spec))\\.(jsx?|tsx?)$", "moduleFileExtensions": [ "js", diff --git a/packages/amplify-codegen/tests/commands/__snapshots__/add.test.js.snap b/packages/amplify-codegen/tests/commands/__snapshots__/add.test.js.snap index de3e1a98a..8cedfb47e 100644 --- a/packages/amplify-codegen/tests/commands/__snapshots__/add.test.js.snap +++ b/packages/amplify-codegen/tests/commands/__snapshots__/add.test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`command - add without init should download introspection schema when api id 1`] = ` -Object { - "amplifyExtension": Object { +{ + "amplifyExtension": { "apiId": "MOCK_API_ID", "codeGenTarget": "TYPE_SCRIPT_OR_FLOW_OR_ANY_OTHER_LANGUAGE", "docsFilePath": "MOCK_DOCS_FILE_PATH", @@ -11,7 +11,7 @@ Object { "generatedFileName": "API.TS", "region": "us-east-1", }, - "excludes": Array [ + "excludes": [ "MOCK_EXCLUDE", "API.TS", ], @@ -22,8 +22,8 @@ Object { `; exports[`command - add without init should read frontend and framework from options 1`] = ` -Object { - "amplifyExtension": Object { +{ + "amplifyExtension": { "apiId": "MOCK_API_ID", "codeGenTarget": "TYPE_SCRIPT_OR_FLOW_OR_ANY_OTHER_LANGUAGE", "docsFilePath": "MOCK_DOCS_FILE_PATH", @@ -32,7 +32,7 @@ Object { "generatedFileName": "API.TS", "region": "us-east-1", }, - "excludes": Array [ + "excludes": [ "MOCK_EXCLUDE", "API.TS", ], @@ -43,8 +43,8 @@ Object { `; exports[`command - add without init should use existing schema if no api id 1`] = ` -Object { - "amplifyExtension": Object { +{ + "amplifyExtension": { "apiId": null, "codeGenTarget": "TYPE_SCRIPT_OR_FLOW_OR_ANY_OTHER_LANGUAGE", "docsFilePath": "MOCK_DOCS_FILE_PATH", @@ -53,7 +53,7 @@ Object { "generatedFileName": "API.TS", "region": "us-east-1", }, - "excludes": Array [ + "excludes": [ "MOCK_EXCLUDE", "API.TS", ], @@ -64,8 +64,8 @@ Object { `; exports[`command - add without init should use region supplied when without init 1`] = ` -Object { - "amplifyExtension": Object { +{ + "amplifyExtension": { "apiId": "MOCK_API_ID", "codeGenTarget": "TYPE_SCRIPT_OR_FLOW_OR_ANY_OTHER_LANGUAGE", "docsFilePath": "MOCK_DOCS_FILE_PATH", @@ -74,7 +74,7 @@ Object { "generatedFileName": "API.TS", "region": "us-west-2", }, - "excludes": Array [ + "excludes": [ "MOCK_EXCLUDE", "API.TS", ], diff --git a/packages/amplify-codegen/tests/commands/__snapshots__/models.test.js.snap b/packages/amplify-codegen/tests/commands/__snapshots__/models.test.js.snap index fde125f2d..f0aa84afd 100644 --- a/packages/amplify-codegen/tests/commands/__snapshots__/models.test.js.snap +++ b/packages/amplify-codegen/tests/commands/__snapshots__/models.test.js.snap @@ -1,49 +1,49 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`command-models-generates models in expected output path android: Should generate for frontend when backend is not initialized locally, and logs no warnings or errors 1`] = ` -Array [ +[ "AmplifyModelProvider.java", "SimpleModel.java", ] `; exports[`command-models-generates models in expected output path android: Should generate models from a single schema file 1`] = ` -Array [ +[ "AmplifyModelProvider.java", "SimpleModel.java", ] `; exports[`command-models-generates models in expected output path android: Should generate models from any subdirectory in schema folder 1`] = ` -Array [ +[ "AmplifyModelProvider.java", "SimpleModel.java", ] `; exports[`command-models-generates models in expected output path flutter: Should generate for frontend when backend is not initialized locally, and logs no warnings or errors 1`] = ` -Array [ +[ "ModelProvider.dart", "SimpleModel.dart", ] `; exports[`command-models-generates models in expected output path flutter: Should generate models from a single schema file 1`] = ` -Array [ +[ "ModelProvider.dart", "SimpleModel.dart", ] `; exports[`command-models-generates models in expected output path flutter: Should generate models from any subdirectory in schema folder 1`] = ` -Array [ +[ "ModelProvider.dart", "SimpleModel.dart", ] `; exports[`command-models-generates models in expected output path ios: Should generate for frontend when backend is not initialized locally, and logs no warnings or errors 1`] = ` -Array [ +[ "AmplifyModels.swift", "SimpleModel+Schema.swift", "SimpleModel.swift", @@ -51,7 +51,7 @@ Array [ `; exports[`command-models-generates models in expected output path ios: Should generate models from a single schema file 1`] = ` -Array [ +[ "AmplifyModels.swift", "SimpleModel+Schema.swift", "SimpleModel.swift", @@ -59,7 +59,7 @@ Array [ `; exports[`command-models-generates models in expected output path ios: Should generate models from any subdirectory in schema folder 1`] = ` -Array [ +[ "AmplifyModels.swift", "SimpleModel+Schema.swift", "SimpleModel.swift", @@ -67,7 +67,7 @@ Array [ `; exports[`command-models-generates models in expected output path javascript: Should generate for frontend when backend is not initialized locally, and logs no warnings or errors 1`] = ` -Array [ +[ "index.d.ts", "index.js", "schema.d.ts", @@ -76,7 +76,7 @@ Array [ `; exports[`command-models-generates models in expected output path javascript: Should generate models from a single schema file 1`] = ` -Array [ +[ "index.d.ts", "index.js", "schema.d.ts", @@ -85,7 +85,7 @@ Array [ `; exports[`command-models-generates models in expected output path javascript: Should generate models from any subdirectory in schema folder 1`] = ` -Array [ +[ "index.d.ts", "index.js", "schema.d.ts", @@ -94,7 +94,7 @@ Array [ `; exports[`command-models-generates models in expected output path should use default directive definitions if getTransformerDirectives fails 1`] = ` -Array [ +[ "index.d.ts", "index.js", "schema.d.ts", diff --git a/packages/amplify-codegen/tests/commands/models.test.js b/packages/amplify-codegen/tests/commands/models.test.js index 935057f53..85db0b2d3 100644 --- a/packages/amplify-codegen/tests/commands/models.test.js +++ b/packages/amplify-codegen/tests/commands/models.test.js @@ -201,7 +201,7 @@ describe('command-models-generates models in expected output path', () => { await expect(() => generateModels(MOCK_CONTEXT, { overrideOutputDir })) .rejects - .toThrowErrorMatchingInlineSnapshot('"Unexpected --target value clojure provided, expected one of [\\"android\\",\\"ios\\",\\"flutter\\",\\"javascript\\",\\"typescript\\",\\"introspection\\"]"'); + .toThrowErrorMatchingInlineSnapshot('"Unexpected --target value clojure provided, expected one of ["android","ios","flutter","javascript","typescript","introspection"]"'); }); it('throws an understandable error on missing model-schema flag and uninitialized backend', async () => { diff --git a/packages/graphql-generator/package.json b/packages/graphql-generator/package.json index 346d2cdb7..768f5df32 100644 --- a/packages/graphql-generator/package.json +++ b/packages/graphql-generator/package.json @@ -19,7 +19,7 @@ "scripts": { "build": "tsc && yarn check-codegen-version", "watch": "tsc -w", - "test": "jest", + "test": "jest --coverage --coverageReporters=clover --coverageReporters=text", "test-watch": "jest --watch", "extract-api": "ts-node ../../scripts/extract-api.ts", "check-codegen-version": "bash ./scripts/check-codegen-version.sh" @@ -48,9 +48,13 @@ }, "jest": { "transform": { - "^.+\\.tsx?$": "ts-jest" + "^.+\\.tsx?$": [ + "ts-jest", + { + "diagnostics": false + } + ] }, - "collectCoverage": true, "collectCoverageFrom": [ "src/**/*.ts", "!src/__tests__/**/*.ts", @@ -63,16 +67,7 @@ "lines": 90 } }, - "coverageReporters": [ - "clover", - "text" - ], "testRegex": "(src/__tests__/.*.test.ts)$", - "globals": { - "ts-jest": { - "diagnostics": false - } - }, "moduleFileExtensions": [ "js", "ts" diff --git a/packages/graphql-generator/src/__tests__/__snapshots__/models.test.ts.snap b/packages/graphql-generator/src/__tests__/__snapshots__/models.test.ts.snap index 5f2346582..861ab9d1a 100644 --- a/packages/graphql-generator/src/__tests__/__snapshots__/models.test.ts.snap +++ b/packages/graphql-generator/src/__tests__/__snapshots__/models.test.ts.snap @@ -1,28 +1,28 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`generateModels with does not fail on custom directives 1`] = ` -Object { +{ "model-introspection.json": "{ - \\"version\\": 1, - \\"models\\": {}, - \\"enums\\": {}, - \\"nonModels\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "version": 1, + "models": {}, + "enums": {}, + "nonModels": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] } } } @@ -32,28 +32,28 @@ Object { `; exports[`generateModels with does not fail on custom directives 2`] = ` -Object { +{ "model-introspection.json": "{ - \\"version\\": 1, - \\"models\\": {}, - \\"enums\\": {}, - \\"nonModels\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "version": 1, + "models": {}, + "enums": {}, + "nonModels": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] } } } @@ -63,7 +63,7 @@ Object { `; exports[`generateModels with improve pluralization swift 1`] = ` -Object { +{ "AmplifyModels.swift": "// swiftlint:disable all import Amplify import Foundation @@ -71,7 +71,7 @@ import Foundation // Contains the set of classes that conforms to the \`Model\` protocol. final public class AmplifyModels: AmplifyModelRegistration { - public let version: String = \\"165944a36979cd395e3b22145bbfeff0\\" + public let version: String = "165944a36979cd395e3b22145bbfeff0" public func registerModels(registry: ModelRegistry.Type) { ModelRegistry.register(modelType: Blog.self) @@ -99,8 +99,8 @@ extension Blog { public static let schema = defineSchema { model in let blog = Blog.keys - model.listPluralName = \\"Blogs\\" - model.syncPluralName = \\"Blogs\\" + model.listPluralName = "Blogs" + model.syncPluralName = "Blogs" model.attributes( .primaryKey(fields: [blog.id]) @@ -125,19 +125,19 @@ extension Blog: ModelIdentifiable { } extension ModelPath where ModelType == Blog { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var posts: ModelPath { - Post.Path(name: \\"posts\\", isCollection: true, parent: self) + Post.Path(name: "posts", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Blog.swift": "// swiftlint:disable all @@ -192,8 +192,8 @@ extension Comment { public static let schema = defineSchema { model in let comment = Comment.keys - model.listPluralName = \\"Comments\\" - model.syncPluralName = \\"Comments\\" + model.listPluralName = "Comments" + model.syncPluralName = "Comments" model.attributes( .primaryKey(fields: [comment.id]) @@ -201,7 +201,7 @@ extension Comment { model.fields( .field(comment.id, is: .required, ofType: .string), - .belongsTo(comment.post, is: .optional, ofType: Post.self, targetNames: [\\"postCommentsId\\"]), + .belongsTo(comment.post, is: .optional, ofType: Post.self, targetNames: ["postCommentsId"]), .field(comment.content, is: .required, ofType: .string), .field(comment.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(comment.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -218,19 +218,19 @@ extension Comment: ModelIdentifiable { } extension ModelPath where ModelType == Comment { public var id: FieldPath { - string(\\"id\\") + string("id") } public var post: ModelPath { - Post.Path(name: \\"post\\", parent: self) + Post.Path(name: "post", parent: self) } public var content: FieldPath { - string(\\"content\\") + string("content") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Comment.swift": "// swiftlint:disable all @@ -310,8 +310,8 @@ extension Post { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.attributes( .primaryKey(fields: [post.id]) @@ -320,7 +320,7 @@ extension Post { model.fields( .field(post.id, is: .required, ofType: .string), .field(post.title, is: .required, ofType: .string), - .belongsTo(post.blog, is: .optional, ofType: Blog.self, targetNames: [\\"blogPostsId\\"]), + .belongsTo(post.blog, is: .optional, ofType: Blog.self, targetNames: ["blogPostsId"]), .hasMany(post.comments, is: .optional, ofType: Comment.self, associatedWith: Comment.keys.post), .field(post.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(post.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -337,22 +337,22 @@ extension Post: ModelIdentifiable { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var blog: ModelPath { - Blog.Path(name: \\"blog\\", parent: self) + Blog.Path(name: "blog", parent: self) } public var comments: ModelPath { - Comment.Path(name: \\"comments\\", isCollection: true, parent: self) + Comment.Path(name: "comments", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Post.swift": "// swiftlint:disable all @@ -422,7 +422,7 @@ public struct Post: Model { `; exports[`generateModels with improve pluralization swift 2`] = ` -Object { +{ "AmplifyModels.swift": "// swiftlint:disable all import Amplify import Foundation @@ -430,7 +430,7 @@ import Foundation // Contains the set of classes that conforms to the \`Model\` protocol. final public class AmplifyModels: AmplifyModelRegistration { - public let version: String = \\"165944a36979cd395e3b22145bbfeff0\\" + public let version: String = "165944a36979cd395e3b22145bbfeff0" public func registerModels(registry: ModelRegistry.Type) { ModelRegistry.register(modelType: Blog.self) @@ -458,8 +458,8 @@ extension Blog { public static let schema = defineSchema { model in let blog = Blog.keys - model.listPluralName = \\"Blogs\\" - model.syncPluralName = \\"Blogs\\" + model.listPluralName = "Blogs" + model.syncPluralName = "Blogs" model.attributes( .primaryKey(fields: [blog.id]) @@ -484,19 +484,19 @@ extension Blog: ModelIdentifiable { } extension ModelPath where ModelType == Blog { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var posts: ModelPath { - Post.Path(name: \\"posts\\", isCollection: true, parent: self) + Post.Path(name: "posts", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Blog.swift": "// swiftlint:disable all @@ -551,8 +551,8 @@ extension Comment { public static let schema = defineSchema { model in let comment = Comment.keys - model.listPluralName = \\"Comments\\" - model.syncPluralName = \\"Comments\\" + model.listPluralName = "Comments" + model.syncPluralName = "Comments" model.attributes( .primaryKey(fields: [comment.id]) @@ -560,7 +560,7 @@ extension Comment { model.fields( .field(comment.id, is: .required, ofType: .string), - .belongsTo(comment.post, is: .optional, ofType: Post.self, targetNames: [\\"postCommentsId\\"]), + .belongsTo(comment.post, is: .optional, ofType: Post.self, targetNames: ["postCommentsId"]), .field(comment.content, is: .required, ofType: .string), .field(comment.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(comment.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -577,19 +577,19 @@ extension Comment: ModelIdentifiable { } extension ModelPath where ModelType == Comment { public var id: FieldPath { - string(\\"id\\") + string("id") } public var post: ModelPath { - Post.Path(name: \\"post\\", parent: self) + Post.Path(name: "post", parent: self) } public var content: FieldPath { - string(\\"content\\") + string("content") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Comment.swift": "// swiftlint:disable all @@ -669,8 +669,8 @@ extension Post { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.attributes( .primaryKey(fields: [post.id]) @@ -679,7 +679,7 @@ extension Post { model.fields( .field(post.id, is: .required, ofType: .string), .field(post.title, is: .required, ofType: .string), - .belongsTo(post.blog, is: .optional, ofType: Blog.self, targetNames: [\\"blogPostsId\\"]), + .belongsTo(post.blog, is: .optional, ofType: Blog.self, targetNames: ["blogPostsId"]), .hasMany(post.comments, is: .optional, ofType: Comment.self, associatedWith: Comment.keys.post), .field(post.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(post.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -696,22 +696,22 @@ extension Post: ModelIdentifiable { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var blog: ModelPath { - Blog.Path(name: \\"blog\\", parent: self) + Blog.Path(name: "blog", parent: self) } public var comments: ModelPath { - Comment.Path(name: \\"comments\\", isCollection: true, parent: self) + Comment.Path(name: "comments", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Post.swift": "// swiftlint:disable all @@ -781,7 +781,7 @@ public struct Post: Model { `; exports[`generateModels with targets basic 1`] = ` -Object { +{ "com/amplifyframework/datastore/generated/model/AmplifyModelProvider.java": "package com.amplifyframework.datastore.generated.model; import com.amplifyframework.util.Immutable; @@ -797,7 +797,7 @@ import java.util.Set; */ public final class AmplifyModelProvider implements ModelProvider { - private static final String AMPLIFY_MODEL_VERSION = \\"165944a36979cd395e3b22145bbfeff0\\"; + private static final String AMPLIFY_MODEL_VERSION = "165944a36979cd395e3b22145bbfeff0"; private static AmplifyModelProvider amplifyGeneratedModelInstance; private AmplifyModelProvider() { @@ -858,17 +858,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Blog type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Blogs\\", type = Model.Type.USER, version = 1, hasLazySupport = true) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Blogs", type = Model.Type.USER, version = 1, hasLazySupport = true) public final class Blog implements Model { - public static final BlogPath rootPath = new BlogPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Blog\\", \\"id\\"); - public static final QueryField NAME = field(\\"Blog\\", \\"name\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Post\\") @HasMany(associatedWith = \\"blog\\", type = Post.class) ModelList posts = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final BlogPath rootPath = new BlogPath("root", false, null); + public static final QueryField ID = field("Blog", "id"); + public static final QueryField NAME = field("Blog", "name"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Post") @HasMany(associatedWith = "blog", type = Post.class) ModelList posts = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -929,12 +929,12 @@ public final class Blog implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Blog {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Blog {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1050,7 +1050,7 @@ public final class BlogPath extends ModelPath { public synchronized PostPath getPosts() { if (posts == null) { - posts = new PostPath(\\"posts\\", true, this); + posts = new PostPath("posts", true, this); } return posts; } @@ -1079,18 +1079,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Comment type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comments\\", type = Model.Type.USER, version = 1, hasLazySupport = true) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comments", type = Model.Type.USER, version = 1, hasLazySupport = true) public final class Comment implements Model { - public static final CommentPath rootPath = new CommentPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Comment\\", \\"id\\"); - public static final QueryField POST = field(\\"Comment\\", \\"postCommentsId\\"); - public static final QueryField CONTENT = field(\\"Comment\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"Post\\") @BelongsTo(targetName = \\"postCommentsId\\", targetNames = {\\"postCommentsId\\"}, type = Post.class) ModelReference post; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final CommentPath rootPath = new CommentPath("root", false, null); + public static final QueryField ID = field("Comment", "id"); + public static final QueryField POST = field("Comment", "postCommentsId"); + public static final QueryField CONTENT = field("Comment", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="Post") @BelongsTo(targetName = "postCommentsId", targetNames = {"postCommentsId"}, type = Post.class) ModelReference post; + private final @ModelField(targetType="String", isRequired = true) String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -1154,13 +1154,13 @@ public final class Comment implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"post=\\" + String.valueOf(getPost()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Comment {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("post=" + String.valueOf(getPost()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1293,7 +1293,7 @@ public final class CommentPath extends ModelPath { public synchronized PostPath getPost() { if (post == null) { - post = new PostPath(\\"post\\", false, this); + post = new PostPath("post", false, this); } return post; } @@ -1324,19 +1324,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\", type = Model.Type.USER, version = 1, hasLazySupport = true) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts", type = Model.Type.USER, version = 1, hasLazySupport = true) public final class Post implements Model { - public static final PostPath rootPath = new PostPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Post\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - public static final QueryField BLOG = field(\\"Post\\", \\"blogPostsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Blog\\") @BelongsTo(targetName = \\"blogPostsId\\", targetNames = {\\"blogPostsId\\"}, type = Blog.class) ModelReference blog; - private final @ModelField(targetType=\\"Comment\\") @HasMany(associatedWith = \\"post\\", type = Comment.class) ModelList comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final PostPath rootPath = new PostPath("root", false, null); + public static final QueryField ID = field("Post", "id"); + public static final QueryField TITLE = field("Post", "title"); + public static final QueryField BLOG = field("Post", "blogPostsId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Blog") @BelongsTo(targetName = "blogPostsId", targetNames = {"blogPostsId"}, type = Blog.class) ModelReference blog; + private final @ModelField(targetType="Comment") @HasMany(associatedWith = "post", type = Comment.class) ModelList comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -1404,13 +1404,13 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"blog=\\" + String.valueOf(getBlog()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("blog=" + String.valueOf(getBlog()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -1544,14 +1544,14 @@ public final class PostPath extends ModelPath { public synchronized BlogPath getBlog() { if (blog == null) { - blog = new BlogPath(\\"blog\\", false, this); + blog = new BlogPath("blog", false, this); } return blog; } public synchronized CommentPath getComments() { if (comments == null) { - comments = new CommentPath(\\"comments\\", true, this); + comments = new CommentPath("comments", true, this); } return comments; } @@ -1561,7 +1561,7 @@ public final class PostPath extends ModelPath { `; exports[`generateModels with targets basic 2`] = ` -Object { +{ "AmplifyModels.swift": "// swiftlint:disable all import Amplify import Foundation @@ -1569,7 +1569,7 @@ import Foundation // Contains the set of classes that conforms to the \`Model\` protocol. final public class AmplifyModels: AmplifyModelRegistration { - public let version: String = \\"165944a36979cd395e3b22145bbfeff0\\" + public let version: String = "165944a36979cd395e3b22145bbfeff0" public func registerModels(registry: ModelRegistry.Type) { ModelRegistry.register(modelType: Blog.self) @@ -1597,8 +1597,8 @@ extension Blog { public static let schema = defineSchema { model in let blog = Blog.keys - model.listPluralName = \\"Blogs\\" - model.syncPluralName = \\"Blogs\\" + model.listPluralName = "Blogs" + model.syncPluralName = "Blogs" model.attributes( .primaryKey(fields: [blog.id]) @@ -1623,19 +1623,19 @@ extension Blog: ModelIdentifiable { } extension ModelPath where ModelType == Blog { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var posts: ModelPath { - Post.Path(name: \\"posts\\", isCollection: true, parent: self) + Post.Path(name: "posts", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Blog.swift": "// swiftlint:disable all @@ -1690,8 +1690,8 @@ extension Comment { public static let schema = defineSchema { model in let comment = Comment.keys - model.listPluralName = \\"Comments\\" - model.syncPluralName = \\"Comments\\" + model.listPluralName = "Comments" + model.syncPluralName = "Comments" model.attributes( .primaryKey(fields: [comment.id]) @@ -1699,7 +1699,7 @@ extension Comment { model.fields( .field(comment.id, is: .required, ofType: .string), - .belongsTo(comment.post, is: .optional, ofType: Post.self, targetNames: [\\"postCommentsId\\"]), + .belongsTo(comment.post, is: .optional, ofType: Post.self, targetNames: ["postCommentsId"]), .field(comment.content, is: .required, ofType: .string), .field(comment.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(comment.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -1716,19 +1716,19 @@ extension Comment: ModelIdentifiable { } extension ModelPath where ModelType == Comment { public var id: FieldPath { - string(\\"id\\") + string("id") } public var post: ModelPath { - Post.Path(name: \\"post\\", parent: self) + Post.Path(name: "post", parent: self) } public var content: FieldPath { - string(\\"content\\") + string("content") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Comment.swift": "// swiftlint:disable all @@ -1808,8 +1808,8 @@ extension Post { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.attributes( .primaryKey(fields: [post.id]) @@ -1818,7 +1818,7 @@ extension Post { model.fields( .field(post.id, is: .required, ofType: .string), .field(post.title, is: .required, ofType: .string), - .belongsTo(post.blog, is: .optional, ofType: Blog.self, targetNames: [\\"blogPostsId\\"]), + .belongsTo(post.blog, is: .optional, ofType: Blog.self, targetNames: ["blogPostsId"]), .hasMany(post.comments, is: .optional, ofType: Comment.self, associatedWith: Comment.keys.post), .field(post.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(post.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -1835,22 +1835,22 @@ extension Post: ModelIdentifiable { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var blog: ModelPath { - Blog.Path(name: \\"blog\\", parent: self) + Blog.Path(name: "blog", parent: self) } public var comments: ModelPath { - Comment.Path(name: \\"comments\\", isCollection: true, parent: self) + Comment.Path(name: "comments", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Post.swift": "// swiftlint:disable all @@ -1920,10 +1920,10 @@ public struct Post: Model { `; exports[`generateModels with targets basic 3`] = ` -Object { - "index.d.ts": "import { ModelInit, MutableModel, __modelMeta__, ManagedIdentifier } from \\"@aws-amplify/datastore\\"; +{ + "index.d.ts": "import { ModelInit, MutableModel, __modelMeta__, ManagedIdentifier } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from "@aws-amplify/datastore"; @@ -2041,227 +2041,227 @@ export { export declare const schema: Schema;", "schema.js": "export const schema = { - \\"models\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Post\\" + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "blogPostsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Blogs\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Blogs", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"blog\\": { - \\"name\\": \\"blog\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Blog\\" + "blog": { + "name": "blog", + "isArray": false, + "type": { + "model": "Blog" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "blogPostsId" ] } }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"blogPostsId\\": { - \\"name\\": \\"blogPostsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "blogPostsId": { + "name": "blogPostsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Comment": { + "name": "Comment", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCommentsId" ] } }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"postCommentsId\\": { - \\"name\\": \\"postCommentsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "postCommentsId": { + "name": "postCommentsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"920118e6cbedacf9fdf58bb983d59a94\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "920118e6cbedacf9fdf58bb983d59a94" };", } `; exports[`generateModels with targets basic 4`] = ` -Object { - "index.ts": "import { ModelInit, MutableModel, PersistentModelConstructor } from \\"@aws-amplify/datastore\\"; -import { initSchema } from \\"@aws-amplify/datastore\\"; +{ + "index.ts": "import { ModelInit, MutableModel, PersistentModelConstructor } from "@aws-amplify/datastore"; +import { initSchema } from "@aws-amplify/datastore"; -import { schema } from \\"./schema\\"; +import { schema } from "./schema"; @@ -2374,237 +2374,237 @@ export { Post, Comment };", - "schema.ts": "import { Schema } from \\"@aws-amplify/datastore\\"; + "schema.ts": "import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Post\\" + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "blogPostsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Blogs\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Blogs", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"blog\\": { - \\"name\\": \\"blog\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Blog\\" + "blog": { + "name": "blog", + "isArray": false, + "type": { + "model": "Blog" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "blogPostsId" ] } }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"blogPostsId\\": { - \\"name\\": \\"blogPostsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "blogPostsId": { + "name": "blogPostsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Comment": { + "name": "Comment", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCommentsId" ] } }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"postCommentsId\\": { - \\"name\\": \\"postCommentsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "postCommentsId": { + "name": "postCommentsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"920118e6cbedacf9fdf58bb983d59a94\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "920118e6cbedacf9fdf58bb983d59a94" };", } `; exports[`generateModels with targets basic 5`] = ` -Object { +{ "Blog.dart": "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2696,12 +2696,12 @@ class Blog extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Blog {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Blog {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -2756,14 +2756,14 @@ class Blog extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final POSTS = amplify_core.QueryField( - fieldName: \\"posts\\", + fieldName: "posts", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Blog\\"; - modelSchemaDefinition.pluralName = \\"Blogs\\"; + modelSchemaDefinition.name = "Blog"; + modelSchemaDefinition.pluralName = "Blogs"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -2855,14 +2855,14 @@ class BlogModelIdentifier implements amplify_core.ModelIdentifier { "Comment.dart": "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -2953,13 +2953,13 @@ class Comment extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"post=\\" + (_post != null ? _post!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Comment {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -3006,14 +3006,14 @@ class Comment extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final POST = amplify_core.QueryField( - fieldName: \\"post\\", + fieldName: "post", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment\\"; - modelSchemaDefinition.pluralName = \\"Comments\\"; + modelSchemaDefinition.name = "Comment"; + modelSchemaDefinition.pluralName = "Comments"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3105,14 +3105,14 @@ class CommentModelIdentifier implements amplify_core.ModelIdentifier { "ModelProvider.dart": "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3134,7 +3134,7 @@ export 'Post.dart'; class ModelProvider implements amplify_core.ModelProviderInterface { @override - String version = \\"165944a36979cd395e3b22145bbfeff0\\"; + String version = "165944a36979cd395e3b22145bbfeff0"; @override List modelSchemas = [Blog.schema, Comment.schema, Post.schema]; @override @@ -3145,14 +3145,14 @@ class ModelProvider implements amplify_core.ModelProviderInterface { amplify_core.ModelType getModelTypeByModelName(String modelName) { switch(modelName) { - case \\"Blog\\": + case "Blog": return Blog.classType; - case \\"Comment\\": + case "Comment": return Comment.classType; - case \\"Post\\": + case "Post": return Post.classType; default: - throw Exception(\\"Failed to find model in model provider for model name: \\" + modelName); + throw Exception("Failed to find model in model provider for model name: " + modelName); } } } @@ -3167,14 +3167,14 @@ class ModelFieldValue { "Post.dart": "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -3273,13 +3273,13 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"blog=\\" + (_blog != null ? _blog!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("blog=" + (_blog != null ? _blog!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -3343,17 +3343,17 @@ class Post extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static final BLOG = amplify_core.QueryField( - fieldName: \\"blog\\", + fieldName: "blog", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Blog')); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -3453,239 +3453,239 @@ class PostModelIdentifier implements amplify_core.ModelIdentifier { `; exports[`generateModels with targets basic 6`] = ` -Object { +{ "model-introspection.json": "{ - \\"version\\": 1, - \\"models\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "version": 1, + "models": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Post\\" + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "blogPostsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Blogs\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Blogs", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"blog\\": { - \\"name\\": \\"blog\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Blog\\" + "blog": { + "name": "blog", + "isArray": false, + "type": { + "model": "Blog" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "blogPostsId" ] } }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"blogPostsId\\": { - \\"name\\": \\"blogPostsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "blogPostsId": { + "name": "blogPostsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Comment": { + "name": "Comment", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCommentsId" ] } }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"postCommentsId\\": { - \\"name\\": \\"postCommentsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "postCommentsId": { + "name": "postCommentsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }", } `; exports[`generateModels with targets basic 7`] = ` -Object { +{ "com/amplifyframework/datastore/generated/model/AmplifyModelProvider.java": "package com.amplifyframework.datastore.generated.model; import com.amplifyframework.util.Immutable; @@ -3701,7 +3701,7 @@ import java.util.Set; */ public final class AmplifyModelProvider implements ModelProvider { - private static final String AMPLIFY_MODEL_VERSION = \\"165944a36979cd395e3b22145bbfeff0\\"; + private static final String AMPLIFY_MODEL_VERSION = "165944a36979cd395e3b22145bbfeff0"; private static AmplifyModelProvider amplifyGeneratedModelInstance; private AmplifyModelProvider() { @@ -3762,17 +3762,17 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Blog type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Blogs\\", type = Model.Type.USER, version = 1, hasLazySupport = true) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Blogs", type = Model.Type.USER, version = 1, hasLazySupport = true) public final class Blog implements Model { - public static final BlogPath rootPath = new BlogPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Blog\\", \\"id\\"); - public static final QueryField NAME = field(\\"Blog\\", \\"name\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String name; - private final @ModelField(targetType=\\"Post\\") @HasMany(associatedWith = \\"blog\\", type = Post.class) ModelList posts = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final BlogPath rootPath = new BlogPath("root", false, null); + public static final QueryField ID = field("Blog", "id"); + public static final QueryField NAME = field("Blog", "name"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String name; + private final @ModelField(targetType="Post") @HasMany(associatedWith = "blog", type = Post.class) ModelList posts = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -3833,12 +3833,12 @@ public final class Blog implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Blog {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"name=\\" + String.valueOf(getName()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Blog {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("name=" + String.valueOf(getName()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -3954,7 +3954,7 @@ public final class BlogPath extends ModelPath { public synchronized PostPath getPosts() { if (posts == null) { - posts = new PostPath(\\"posts\\", true, this); + posts = new PostPath("posts", true, this); } return posts; } @@ -3983,18 +3983,18 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Comment type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Comments\\", type = Model.Type.USER, version = 1, hasLazySupport = true) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Comments", type = Model.Type.USER, version = 1, hasLazySupport = true) public final class Comment implements Model { - public static final CommentPath rootPath = new CommentPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Comment\\", \\"id\\"); - public static final QueryField POST = field(\\"Comment\\", \\"postCommentsId\\"); - public static final QueryField CONTENT = field(\\"Comment\\", \\"content\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"Post\\") @BelongsTo(targetName = \\"postCommentsId\\", targetNames = {\\"postCommentsId\\"}, type = Post.class) ModelReference post; - private final @ModelField(targetType=\\"String\\", isRequired = true) String content; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final CommentPath rootPath = new CommentPath("root", false, null); + public static final QueryField ID = field("Comment", "id"); + public static final QueryField POST = field("Comment", "postCommentsId"); + public static final QueryField CONTENT = field("Comment", "content"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="Post") @BelongsTo(targetName = "postCommentsId", targetNames = {"postCommentsId"}, type = Post.class) ModelReference post; + private final @ModelField(targetType="String", isRequired = true) String content; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -4058,13 +4058,13 @@ public final class Comment implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Comment {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"post=\\" + String.valueOf(getPost()) + \\", \\") - .append(\\"content=\\" + String.valueOf(getContent()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Comment {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("post=" + String.valueOf(getPost()) + ", ") + .append("content=" + String.valueOf(getContent()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4197,7 +4197,7 @@ public final class CommentPath extends ModelPath { public synchronized PostPath getPost() { if (post == null) { - post = new PostPath(\\"post\\", false, this); + post = new PostPath("post", false, this); } return post; } @@ -4228,19 +4228,19 @@ import com.amplifyframework.core.model.query.predicate.QueryField; import static com.amplifyframework.core.model.query.predicate.QueryField.field; /** This is an auto generated class representing the Post type in your schema. */ -@SuppressWarnings(\\"all\\") -@ModelConfig(pluralName = \\"Posts\\", type = Model.Type.USER, version = 1, hasLazySupport = true) +@SuppressWarnings("all") +@ModelConfig(pluralName = "Posts", type = Model.Type.USER, version = 1, hasLazySupport = true) public final class Post implements Model { - public static final PostPath rootPath = new PostPath(\\"root\\", false, null); - public static final QueryField ID = field(\\"Post\\", \\"id\\"); - public static final QueryField TITLE = field(\\"Post\\", \\"title\\"); - public static final QueryField BLOG = field(\\"Post\\", \\"blogPostsId\\"); - private final @ModelField(targetType=\\"ID\\", isRequired = true) String id; - private final @ModelField(targetType=\\"String\\", isRequired = true) String title; - private final @ModelField(targetType=\\"Blog\\") @BelongsTo(targetName = \\"blogPostsId\\", targetNames = {\\"blogPostsId\\"}, type = Blog.class) ModelReference blog; - private final @ModelField(targetType=\\"Comment\\") @HasMany(associatedWith = \\"post\\", type = Comment.class) ModelList comments = null; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime createdAt; - private @ModelField(targetType=\\"AWSDateTime\\", isReadOnly = true) Temporal.DateTime updatedAt; + public static final PostPath rootPath = new PostPath("root", false, null); + public static final QueryField ID = field("Post", "id"); + public static final QueryField TITLE = field("Post", "title"); + public static final QueryField BLOG = field("Post", "blogPostsId"); + private final @ModelField(targetType="ID", isRequired = true) String id; + private final @ModelField(targetType="String", isRequired = true) String title; + private final @ModelField(targetType="Blog") @BelongsTo(targetName = "blogPostsId", targetNames = {"blogPostsId"}, type = Blog.class) ModelReference blog; + private final @ModelField(targetType="Comment") @HasMany(associatedWith = "post", type = Comment.class) ModelList comments = null; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt; + private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt; /** @deprecated This API is internal to Amplify and should not be used. */ @Deprecated public String resolveIdentifier() { @@ -4308,13 +4308,13 @@ public final class Post implements Model { @Override public String toString() { return new StringBuilder() - .append(\\"Post {\\") - .append(\\"id=\\" + String.valueOf(getId()) + \\", \\") - .append(\\"title=\\" + String.valueOf(getTitle()) + \\", \\") - .append(\\"blog=\\" + String.valueOf(getBlog()) + \\", \\") - .append(\\"createdAt=\\" + String.valueOf(getCreatedAt()) + \\", \\") - .append(\\"updatedAt=\\" + String.valueOf(getUpdatedAt())) - .append(\\"}\\") + .append("Post {") + .append("id=" + String.valueOf(getId()) + ", ") + .append("title=" + String.valueOf(getTitle()) + ", ") + .append("blog=" + String.valueOf(getBlog()) + ", ") + .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ") + .append("updatedAt=" + String.valueOf(getUpdatedAt())) + .append("}") .toString(); } @@ -4448,14 +4448,14 @@ public final class PostPath extends ModelPath { public synchronized BlogPath getBlog() { if (blog == null) { - blog = new BlogPath(\\"blog\\", false, this); + blog = new BlogPath("blog", false, this); } return blog; } public synchronized CommentPath getComments() { if (comments == null) { - comments = new CommentPath(\\"comments\\", true, this); + comments = new CommentPath("comments", true, this); } return comments; } @@ -4465,7 +4465,7 @@ public final class PostPath extends ModelPath { `; exports[`generateModels with targets basic 8`] = ` -Object { +{ "AmplifyModels.swift": "// swiftlint:disable all import Amplify import Foundation @@ -4473,7 +4473,7 @@ import Foundation // Contains the set of classes that conforms to the \`Model\` protocol. final public class AmplifyModels: AmplifyModelRegistration { - public let version: String = \\"165944a36979cd395e3b22145bbfeff0\\" + public let version: String = "165944a36979cd395e3b22145bbfeff0" public func registerModels(registry: ModelRegistry.Type) { ModelRegistry.register(modelType: Blog.self) @@ -4501,8 +4501,8 @@ extension Blog { public static let schema = defineSchema { model in let blog = Blog.keys - model.listPluralName = \\"Blogs\\" - model.syncPluralName = \\"Blogs\\" + model.listPluralName = "Blogs" + model.syncPluralName = "Blogs" model.attributes( .primaryKey(fields: [blog.id]) @@ -4527,19 +4527,19 @@ extension Blog: ModelIdentifiable { } extension ModelPath where ModelType == Blog { public var id: FieldPath { - string(\\"id\\") + string("id") } public var name: FieldPath { - string(\\"name\\") + string("name") } public var posts: ModelPath { - Post.Path(name: \\"posts\\", isCollection: true, parent: self) + Post.Path(name: "posts", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Blog.swift": "// swiftlint:disable all @@ -4594,8 +4594,8 @@ extension Comment { public static let schema = defineSchema { model in let comment = Comment.keys - model.listPluralName = \\"Comments\\" - model.syncPluralName = \\"Comments\\" + model.listPluralName = "Comments" + model.syncPluralName = "Comments" model.attributes( .primaryKey(fields: [comment.id]) @@ -4603,7 +4603,7 @@ extension Comment { model.fields( .field(comment.id, is: .required, ofType: .string), - .belongsTo(comment.post, is: .optional, ofType: Post.self, targetNames: [\\"postCommentsId\\"]), + .belongsTo(comment.post, is: .optional, ofType: Post.self, targetNames: ["postCommentsId"]), .field(comment.content, is: .required, ofType: .string), .field(comment.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(comment.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -4620,19 +4620,19 @@ extension Comment: ModelIdentifiable { } extension ModelPath where ModelType == Comment { public var id: FieldPath { - string(\\"id\\") + string("id") } public var post: ModelPath { - Post.Path(name: \\"post\\", parent: self) + Post.Path(name: "post", parent: self) } public var content: FieldPath { - string(\\"content\\") + string("content") } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Comment.swift": "// swiftlint:disable all @@ -4712,8 +4712,8 @@ extension Post { public static let schema = defineSchema { model in let post = Post.keys - model.listPluralName = \\"Posts\\" - model.syncPluralName = \\"Posts\\" + model.listPluralName = "Posts" + model.syncPluralName = "Posts" model.attributes( .primaryKey(fields: [post.id]) @@ -4722,7 +4722,7 @@ extension Post { model.fields( .field(post.id, is: .required, ofType: .string), .field(post.title, is: .required, ofType: .string), - .belongsTo(post.blog, is: .optional, ofType: Blog.self, targetNames: [\\"blogPostsId\\"]), + .belongsTo(post.blog, is: .optional, ofType: Blog.self, targetNames: ["blogPostsId"]), .hasMany(post.comments, is: .optional, ofType: Comment.self, associatedWith: Comment.keys.post), .field(post.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), .field(post.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) @@ -4739,22 +4739,22 @@ extension Post: ModelIdentifiable { } extension ModelPath where ModelType == Post { public var id: FieldPath { - string(\\"id\\") + string("id") } public var title: FieldPath { - string(\\"title\\") + string("title") } public var blog: ModelPath { - Blog.Path(name: \\"blog\\", parent: self) + Blog.Path(name: "blog", parent: self) } public var comments: ModelPath { - Comment.Path(name: \\"comments\\", isCollection: true, parent: self) + Comment.Path(name: "comments", isCollection: true, parent: self) } public var createdAt: FieldPath { - datetime(\\"createdAt\\") + datetime("createdAt") } public var updatedAt: FieldPath { - datetime(\\"updatedAt\\") + datetime("updatedAt") } }", "Post.swift": "// swiftlint:disable all @@ -4824,10 +4824,10 @@ public struct Post: Model { `; exports[`generateModels with targets basic 9`] = ` -Object { - "index.d.ts": "import { ModelInit, MutableModel, __modelMeta__, ManagedIdentifier } from \\"@aws-amplify/datastore\\"; +{ + "index.d.ts": "import { ModelInit, MutableModel, __modelMeta__, ManagedIdentifier } from "@aws-amplify/datastore"; // @ts-ignore -import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from \\"@aws-amplify/datastore\\"; +import { LazyLoading, LazyLoadingDisabled, AsyncCollection, AsyncItem } from "@aws-amplify/datastore"; @@ -4945,227 +4945,227 @@ export { export declare const schema: Schema;", "schema.js": "export const schema = { - \\"models\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Post\\" + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "blogPostsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Blogs\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Blogs", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"blog\\": { - \\"name\\": \\"blog\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Blog\\" + "blog": { + "name": "blog", + "isArray": false, + "type": { + "model": "Blog" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "blogPostsId" ] } }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"blogPostsId\\": { - \\"name\\": \\"blogPostsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "blogPostsId": { + "name": "blogPostsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Comment": { + "name": "Comment", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCommentsId" ] } }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"postCommentsId\\": { - \\"name\\": \\"postCommentsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "postCommentsId": { + "name": "postCommentsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"920118e6cbedacf9fdf58bb983d59a94\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "920118e6cbedacf9fdf58bb983d59a94" };", } `; exports[`generateModels with targets basic 10`] = ` -Object { - "index.ts": "import { ModelInit, MutableModel, PersistentModelConstructor } from \\"@aws-amplify/datastore\\"; -import { initSchema } from \\"@aws-amplify/datastore\\"; +{ + "index.ts": "import { ModelInit, MutableModel, PersistentModelConstructor } from "@aws-amplify/datastore"; +import { initSchema } from "@aws-amplify/datastore"; -import { schema } from \\"./schema\\"; +import { schema } from "./schema"; @@ -5278,237 +5278,237 @@ export { Post, Comment };", - "schema.ts": "import { Schema } from \\"@aws-amplify/datastore\\"; + "schema.ts": "import { Schema } from "@aws-amplify/datastore"; export const schema: Schema = { - \\"models\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "models": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Post\\" + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "blogPostsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Blogs\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Blogs", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"blog\\": { - \\"name\\": \\"blog\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Blog\\" + "blog": { + "name": "blog", + "isArray": false, + "type": { + "model": "Blog" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "blogPostsId" ] } }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"blogPostsId\\": { - \\"name\\": \\"blogPostsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "blogPostsId": { + "name": "blogPostsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Comment": { + "name": "Comment", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCommentsId" ] } }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"postCommentsId\\": { - \\"name\\": \\"postCommentsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "postCommentsId": { + "name": "postCommentsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ] } }, - \\"enums\\": {}, - \\"nonModels\\": {}, - \\"codegenVersion\\": \\"3.4.4\\", - \\"version\\": \\"920118e6cbedacf9fdf58bb983d59a94\\" + "enums": {}, + "nonModels": {}, + "codegenVersion": "3.4.4", + "version": "920118e6cbedacf9fdf58bb983d59a94" };", } `; exports[`generateModels with targets basic 11`] = ` -Object { +{ "Blog.dart": "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -5600,12 +5600,12 @@ class Blog extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Blog {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"name=\\" + \\"$_name\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Blog {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("name=" + "$_name" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -5660,14 +5660,14 @@ class Blog extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final NAME = amplify_core.QueryField(fieldName: \\"name\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final NAME = amplify_core.QueryField(fieldName: "name"); static final POSTS = amplify_core.QueryField( - fieldName: \\"posts\\", + fieldName: "posts", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Blog\\"; - modelSchemaDefinition.pluralName = \\"Blogs\\"; + modelSchemaDefinition.name = "Blog"; + modelSchemaDefinition.pluralName = "Blogs"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -5759,14 +5759,14 @@ class BlogModelIdentifier implements amplify_core.ModelIdentifier { "Comment.dart": "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -5857,13 +5857,13 @@ class Comment extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Comment {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"post=\\" + (_post != null ? _post!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"content=\\" + \\"$_content\\" + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Comment {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", "); + buffer.write("content=" + "$_content" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -5910,14 +5910,14 @@ class Comment extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); static final POST = amplify_core.QueryField( - fieldName: \\"post\\", + fieldName: "post", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Post')); - static final CONTENT = amplify_core.QueryField(fieldName: \\"content\\"); + static final CONTENT = amplify_core.QueryField(fieldName: "content"); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Comment\\"; - modelSchemaDefinition.pluralName = \\"Comments\\"; + modelSchemaDefinition.name = "Comment"; + modelSchemaDefinition.pluralName = "Comments"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -6009,14 +6009,14 @@ class CommentModelIdentifier implements amplify_core.ModelIdentifier { "ModelProvider.dart": "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -6038,7 +6038,7 @@ export 'Post.dart'; class ModelProvider implements amplify_core.ModelProviderInterface { @override - String version = \\"165944a36979cd395e3b22145bbfeff0\\"; + String version = "165944a36979cd395e3b22145bbfeff0"; @override List modelSchemas = [Blog.schema, Comment.schema, Post.schema]; @override @@ -6049,14 +6049,14 @@ class ModelProvider implements amplify_core.ModelProviderInterface { amplify_core.ModelType getModelTypeByModelName(String modelName) { switch(modelName) { - case \\"Blog\\": + case "Blog": return Blog.classType; - case \\"Comment\\": + case "Comment": return Comment.classType; - case \\"Post\\": + case "Post": return Post.classType; default: - throw Exception(\\"Failed to find model in model provider for model name: \\" + modelName); + throw Exception("Failed to find model in model provider for model name: " + modelName); } } } @@ -6071,14 +6071,14 @@ class ModelFieldValue { "Post.dart": "/* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * -* Licensed under the Apache License, Version 2.0 (the \\"License\\"). +* Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * -* or in the \\"license\\" file accompanying this file. This file is distributed -* on an \\"AS IS\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ @@ -6177,13 +6177,13 @@ class Post extends amplify_core.Model { String toString() { var buffer = new StringBuffer(); - buffer.write(\\"Post {\\"); - buffer.write(\\"id=\\" + \\"$id\\" + \\", \\"); - buffer.write(\\"title=\\" + \\"$_title\\" + \\", \\"); - buffer.write(\\"blog=\\" + (_blog != null ? _blog!.toString() : \\"null\\") + \\", \\"); - buffer.write(\\"createdAt=\\" + (_createdAt != null ? _createdAt!.format() : \\"null\\") + \\", \\"); - buffer.write(\\"updatedAt=\\" + (_updatedAt != null ? _updatedAt!.format() : \\"null\\")); - buffer.write(\\"}\\"); + buffer.write("Post {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("blog=" + (_blog != null ? _blog!.toString() : "null") + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); return buffer.toString(); } @@ -6247,17 +6247,17 @@ class Post extends amplify_core.Model { }; static final amplify_core.QueryModelIdentifier MODEL_IDENTIFIER = amplify_core.QueryModelIdentifier(); - static final ID = amplify_core.QueryField(fieldName: \\"id\\"); - static final TITLE = amplify_core.QueryField(fieldName: \\"title\\"); + static final ID = amplify_core.QueryField(fieldName: "id"); + static final TITLE = amplify_core.QueryField(fieldName: "title"); static final BLOG = amplify_core.QueryField( - fieldName: \\"blog\\", + fieldName: "blog", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Blog')); static final COMMENTS = amplify_core.QueryField( - fieldName: \\"comments\\", + fieldName: "comments", fieldType: amplify_core.ModelFieldType(amplify_core.ModelFieldTypeEnum.model, ofModelName: 'Comment')); static var schema = amplify_core.Model.defineSchema(define: (amplify_core.ModelSchemaDefinition modelSchemaDefinition) { - modelSchemaDefinition.name = \\"Post\\"; - modelSchemaDefinition.pluralName = \\"Posts\\"; + modelSchemaDefinition.name = "Post"; + modelSchemaDefinition.pluralName = "Posts"; modelSchemaDefinition.addField(amplify_core.ModelFieldDefinition.id()); @@ -6357,233 +6357,233 @@ class PostModelIdentifier implements amplify_core.ModelIdentifier { `; exports[`generateModels with targets basic 12`] = ` -Object { +{ "model-introspection.json": "{ - \\"version\\": 1, - \\"models\\": { - \\"Blog\\": { - \\"name\\": \\"Blog\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "version": 1, + "models": { + "Blog": { + "name": "Blog", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"name\\": { - \\"name\\": \\"name\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "name": { + "name": "name", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"posts\\": { - \\"name\\": \\"posts\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Post\\" + "posts": { + "name": "posts", + "isArray": true, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "blogPostsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Blogs\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Blogs", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Post\\": { - \\"name\\": \\"Post\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Post": { + "name": "Post", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"title\\": { - \\"name\\": \\"title\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "title": { + "name": "title", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"blog\\": { - \\"name\\": \\"blog\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Blog\\" + "blog": { + "name": "blog", + "isArray": false, + "type": { + "model": "Blog" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"blogPostsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "blogPostsId" ] } }, - \\"comments\\": { - \\"name\\": \\"comments\\", - \\"isArray\\": true, - \\"type\\": { - \\"model\\": \\"Comment\\" + "comments": { + "name": "comments", + "isArray": true, + "type": { + "model": "Comment" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isArrayNullable\\": true, - \\"association\\": { - \\"connectionType\\": \\"HAS_MANY\\", - \\"associatedWith\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "isArrayNullable": true, + "association": { + "connectionType": "HAS_MANY", + "associatedWith": [ + "postCommentsId" ] } }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"blogPostsId\\": { - \\"name\\": \\"blogPostsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "blogPostsId": { + "name": "blogPostsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Posts\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Posts", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } }, - \\"Comment\\": { - \\"name\\": \\"Comment\\", - \\"fields\\": { - \\"id\\": { - \\"name\\": \\"id\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "Comment": { + "name": "Comment", + "fields": { + "id": { + "name": "id", + "isArray": false, + "type": "ID", + "isRequired": true, + "attributes": [] }, - \\"post\\": { - \\"name\\": \\"post\\", - \\"isArray\\": false, - \\"type\\": { - \\"model\\": \\"Post\\" + "post": { + "name": "post", + "isArray": false, + "type": { + "model": "Post" }, - \\"isRequired\\": false, - \\"attributes\\": [], - \\"association\\": { - \\"connectionType\\": \\"BELONGS_TO\\", - \\"targetNames\\": [ - \\"postCommentsId\\" + "isRequired": false, + "attributes": [], + "association": { + "connectionType": "BELONGS_TO", + "targetNames": [ + "postCommentsId" ] } }, - \\"content\\": { - \\"name\\": \\"content\\", - \\"isArray\\": false, - \\"type\\": \\"String\\", - \\"isRequired\\": true, - \\"attributes\\": [] + "content": { + "name": "content", + "isArray": false, + "type": "String", + "isRequired": true, + "attributes": [] }, - \\"createdAt\\": { - \\"name\\": \\"createdAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "createdAt": { + "name": "createdAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"updatedAt\\": { - \\"name\\": \\"updatedAt\\", - \\"isArray\\": false, - \\"type\\": \\"AWSDateTime\\", - \\"isRequired\\": false, - \\"attributes\\": [], - \\"isReadOnly\\": true + "updatedAt": { + "name": "updatedAt", + "isArray": false, + "type": "AWSDateTime", + "isRequired": false, + "attributes": [], + "isReadOnly": true }, - \\"postCommentsId\\": { - \\"name\\": \\"postCommentsId\\", - \\"isArray\\": false, - \\"type\\": \\"ID\\", - \\"isRequired\\": false, - \\"attributes\\": [] + "postCommentsId": { + "name": "postCommentsId", + "isArray": false, + "type": "ID", + "isRequired": false, + "attributes": [] } }, - \\"syncable\\": true, - \\"pluralName\\": \\"Comments\\", - \\"attributes\\": [ + "syncable": true, + "pluralName": "Comments", + "attributes": [ { - \\"type\\": \\"model\\", - \\"properties\\": {} + "type": "model", + "properties": {} } ], - \\"primaryKeyInfo\\": { - \\"isCustomPrimaryKey\\": false, - \\"primaryKeyFieldName\\": \\"id\\", - \\"sortKeyFieldNames\\": [] + "primaryKeyInfo": { + "isCustomPrimaryKey": false, + "primaryKeyFieldName": "id", + "sortKeyFieldNames": [] } } }, - \\"enums\\": {}, - \\"nonModels\\": {} + "enums": {}, + "nonModels": {} }", } `; diff --git a/packages/graphql-generator/src/__tests__/__snapshots__/statements.test.ts.snap b/packages/graphql-generator/src/__tests__/__snapshots__/statements.test.ts.snap index 5ff19b949..bfebc93bc 100644 --- a/packages/graphql-generator/src/__tests__/__snapshots__/statements.test.ts.snap +++ b/packages/graphql-generator/src/__tests__/__snapshots__/statements.test.ts.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`generateStatements targets basic angular 1`] = ` -Object { +{ "mutations.graphql": "# this is an auto generated file. This will be overwritten mutation CreateBlog( @@ -480,7 +480,7 @@ subscription OnDeleteComment($filter: ModelSubscriptionCommentFilterInput) { `; exports[`generateStatements targets basic flow 1`] = ` -Object { +{ "mutations.js": "// @flow // this is an auto generated file. This will be overwritten @@ -989,7 +989,7 @@ export const onDeleteComment = /* GraphQL */ \` `; exports[`generateStatements targets basic graphql 1`] = ` -Object { +{ "mutations.graphql": "# this is an auto generated file. This will be overwritten mutation CreateBlog( @@ -1468,7 +1468,7 @@ subscription OnDeleteComment($filter: ModelSubscriptionCommentFilterInput) { `; exports[`generateStatements targets basic javascript 1`] = ` -Object { +{ "mutations.js": "/* eslint-disable */ // this is an auto generated file. This will be overwritten @@ -1977,7 +1977,7 @@ export const onDeleteComment = /* GraphQL */ \` `; exports[`generateStatements targets basic typescript 1`] = ` -Object { +{ "mutations.ts": "/* tslint:disable */ /* eslint-disable */ // this is an auto generated file. This will be overwritten diff --git a/packages/graphql-generator/src/__tests__/__snapshots__/types.test.ts.snap b/packages/graphql-generator/src/__tests__/__snapshots__/types.test.ts.snap index 66fae8691..b9448fef8 100644 --- a/packages/graphql-generator/src/__tests__/__snapshots__/types.test.ts.snap +++ b/packages/graphql-generator/src/__tests__/__snapshots__/types.test.ts.snap @@ -1,20 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`generateTypes amplifyJsLibraryVersion generates angular types for v5 when value is 5 or undefined 1`] = ` -Object { +{ "api.service.ts": "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export interface SubscriptionResponse { value: GraphQLResult; } export type Blog = { - __typename: \\"Blog\\"; + __typename: "Blog"; id: string; name: string; posts?: ModelPostConnection | null; @@ -23,13 +23,13 @@ export type Blog = { }; export type ModelPostConnection = { - __typename: \\"ModelPostConnection\\"; + __typename: "ModelPostConnection"; items: Array; nextToken?: string | null; }; export type Post = { - __typename: \\"Post\\"; + __typename: "Post"; id: string; title: string; blog?: Blog | null; @@ -40,13 +40,13 @@ export type Post = { }; export type ModelCommentConnection = { - __typename: \\"ModelCommentConnection\\"; + __typename: "ModelCommentConnection"; items: Array; nextToken?: string | null; }; export type Comment = { - __typename: \\"Comment\\"; + __typename: "Comment"; id: string; post?: Post | null; content: string; @@ -56,11 +56,11 @@ export type Comment = { }; export type GetBlogQuery = { - __typename: \\"Blog\\"; + __typename: "Blog"; id: string; name: string; posts?: { - __typename: \\"ModelPostConnection\\"; + __typename: "ModelPostConnection"; nextToken?: string | null; } | null; createdAt: string; @@ -68,7 +68,7 @@ export type GetBlogQuery = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async GetBlog(id: string): Promise { @@ -99,16 +99,16 @@ export class APIService { `; exports[`generateTypes amplifyJsLibraryVersion generates angular types for v6 when value is 6 1`] = ` -Object { +{ "api.service.ts": "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import { Client, generateClient, GraphQLResult } from \\"aws-amplify/api\\"; -import { Observable } from \\"rxjs\\"; +import { Injectable } from "@angular/core"; +import { Client, generateClient, GraphQLResult } from "aws-amplify/api"; +import { Observable } from "rxjs"; export type Blog = { - __typename: \\"Blog\\"; + __typename: "Blog"; id: string; name: string; posts?: ModelPostConnection | null; @@ -117,13 +117,13 @@ export type Blog = { }; export type ModelPostConnection = { - __typename: \\"ModelPostConnection\\"; + __typename: "ModelPostConnection"; items: Array; nextToken?: string | null; }; export type Post = { - __typename: \\"Post\\"; + __typename: "Post"; id: string; title: string; blog?: Blog | null; @@ -134,13 +134,13 @@ export type Post = { }; export type ModelCommentConnection = { - __typename: \\"ModelCommentConnection\\"; + __typename: "ModelCommentConnection"; items: Array; nextToken?: string | null; }; export type Comment = { - __typename: \\"Comment\\"; + __typename: "Comment"; id: string; post?: Post | null; content: string; @@ -150,11 +150,11 @@ export type Comment = { }; export type GetBlogQuery = { - __typename: \\"Blog\\"; + __typename: "Blog"; id: string; name: string; posts?: { - __typename: \\"ModelPostConnection\\"; + __typename: "ModelPostConnection"; nextToken?: string | null; } | null; createdAt: string; @@ -162,7 +162,7 @@ export type GetBlogQuery = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { public client: Client; @@ -198,7 +198,7 @@ export class APIService { `; exports[`generateTypes multipleSwiftFiles generates multiple files 1`] = ` -Object { +{ "Types.graphql.swift": "// This file was automatically generated and should not be edited. #if canImport(AWSAPIPlugin) @@ -454,13 +454,13 @@ public enum JSONDecodingError: Error, LocalizedError { public var errorDescription: String? { switch self { case .missingValue: - return \\"Missing value\\" + return "Missing value" case .nullValue: - return \\"Unexpected null value\\" + return "Unexpected null value" case .wrongType: - return \\"Wrong type\\" + return "Wrong type" case .couldNotConvert(let value, let expectedType): - return \\"Could not convert \\\\\\"\\\\(value)\\\\\\" to \\\\(expectedType)\\" + return "Could not convert \\"\\(value)\\" to \\(expectedType)" } } } @@ -565,7 +565,7 @@ extension Optional: JSONEncodable { case .some(let wrapped as JSONEncodable): return wrapped.jsonValue default: - fatalError(\\"Optional is only JSONEncodable if Wrapped is\\") + fatalError("Optional is only JSONEncodable if Wrapped is") } } } @@ -581,7 +581,7 @@ extension Dictionary: JSONEncodable { if case let (key as String, value as JSONEncodable) = (key, value) { jsonObject[key] = value.jsonValue } else { - fatalError(\\"Dictionary is only JSONEncodable if Value is (and if Key is String)\\") + fatalError("Dictionary is only JSONEncodable if Value is (and if Key is String)") } } return jsonObject @@ -594,7 +594,7 @@ extension Array: JSONEncodable { if case let element as JSONEncodable = element { return element.jsonValue } else { - fatalError(\\"Array is only JSONEncodable if Element is\\") + fatalError("Array is only JSONEncodable if Element is") } } } @@ -877,13 +877,13 @@ public enum JSONDecodingError: Error, LocalizedError { public var errorDescription: String? { switch self { case .missingValue: - return \\"Missing value\\" + return "Missing value" case .nullValue: - return \\"Unexpected null value\\" + return "Unexpected null value" case .wrongType: - return \\"Wrong type\\" + return "Wrong type" case .couldNotConvert(let value, let expectedType): - return \\"Could not convert \\\\\\"\\\\(value)\\\\\\" to \\\\(expectedType)\\" + return "Could not convert \\"\\(value)\\" to \\(expectedType)" } } } @@ -988,7 +988,7 @@ extension Optional: JSONEncodable { case .some(let wrapped as JSONEncodable): return wrapped.jsonValue default: - fatalError(\\"Optional is only JSONEncodable if Wrapped is\\") + fatalError("Optional is only JSONEncodable if Wrapped is") } } } @@ -1004,7 +1004,7 @@ extension Dictionary: JSONEncodable { if case let (key as String, value as JSONEncodable) = (key, value) { jsonObject[key] = value.jsonValue } else { - fatalError(\\"Dictionary is only JSONEncodable if Value is (and if Key is String)\\") + fatalError("Dictionary is only JSONEncodable if Value is (and if Key is String)") } } return jsonObject @@ -1017,7 +1017,7 @@ extension Array: JSONEncodable { if case let element as JSONEncodable = element { return element.jsonValue } else { - fatalError(\\"Array is only JSONEncodable if Element is\\") + fatalError("Array is only JSONEncodable if Element is") } } } @@ -1048,7 +1048,7 @@ import AWSAppSync public final class GetBlogQuery: GraphQLQuery { public static let operationString = - \\"query GetBlog($id: ID!) {\\\\n getBlog(id: $id) {\\\\n __typename\\\\n id\\\\n name\\\\n posts {\\\\n __typename\\\\n nextToken\\\\n }\\\\n createdAt\\\\n updatedAt\\\\n }\\\\n}\\" + "query GetBlog($id: ID!) {\\n getBlog(id: $id) {\\n __typename\\n id\\n name\\n posts {\\n __typename\\n nextToken\\n }\\n createdAt\\n updatedAt\\n }\\n}" public var id: GraphQLID @@ -1057,14 +1057,14 @@ public final class GetBlogQuery: GraphQLQuery { } public var variables: GraphQLMap? { - return [\\"id\\": id] + return ["id": id] } public struct Data: GraphQLSelectionSet { - public static let possibleTypes = [\\"Query\\"] + public static let possibleTypes = ["Query"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"getBlog\\", arguments: [\\"id\\": GraphQLVariable(\\"id\\")], type: .object(GetBlog.selections)), + GraphQLField("getBlog", arguments: ["id": GraphQLVariable("id")], type: .object(GetBlog.selections)), ] public var snapshot: Snapshot @@ -1074,28 +1074,28 @@ public final class GetBlogQuery: GraphQLQuery { } public init(getBlog: GetBlog? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Query\\", \\"getBlog\\": getBlog.flatMap { $0.snapshot }]) + self.init(snapshot: ["__typename": "Query", "getBlog": getBlog.flatMap { $0.snapshot }]) } public var getBlog: GetBlog? { get { - return (snapshot[\\"getBlog\\"] as? Snapshot).flatMap { GetBlog(snapshot: $0) } + return (snapshot["getBlog"] as? Snapshot).flatMap { GetBlog(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"getBlog\\") + snapshot.updateValue(newValue?.snapshot, forKey: "getBlog") } } public struct GetBlog: GraphQLSelectionSet { - public static let possibleTypes = [\\"Blog\\"] + public static let possibleTypes = ["Blog"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"__typename\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"id\\", type: .nonNull(.scalar(GraphQLID.self))), - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"posts\\", type: .object(Post.selections)), - GraphQLField(\\"createdAt\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"updatedAt\\", type: .nonNull(.scalar(String.self))), + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("posts", type: .object(Post.selections)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -1105,69 +1105,69 @@ public final class GetBlogQuery: GraphQLQuery { } public init(id: GraphQLID, name: String, posts: Post? = nil, createdAt: String, updatedAt: String) { - self.init(snapshot: [\\"__typename\\": \\"Blog\\", \\"id\\": id, \\"name\\": name, \\"posts\\": posts.flatMap { $0.snapshot }, \\"createdAt\\": createdAt, \\"updatedAt\\": updatedAt]) + self.init(snapshot: ["__typename": "Blog", "id": id, "name": name, "posts": posts.flatMap { $0.snapshot }, "createdAt": createdAt, "updatedAt": updatedAt]) } public var __typename: String { get { - return snapshot[\\"__typename\\"]! as! String + return snapshot["__typename"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"__typename\\") + snapshot.updateValue(newValue, forKey: "__typename") } } public var id: GraphQLID { get { - return snapshot[\\"id\\"]! as! GraphQLID + return snapshot["id"]! as! GraphQLID } set { - snapshot.updateValue(newValue, forKey: \\"id\\") + snapshot.updateValue(newValue, forKey: "id") } } public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } public var posts: Post? { get { - return (snapshot[\\"posts\\"] as? Snapshot).flatMap { Post(snapshot: $0) } + return (snapshot["posts"] as? Snapshot).flatMap { Post(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"posts\\") + snapshot.updateValue(newValue?.snapshot, forKey: "posts") } } public var createdAt: String { get { - return snapshot[\\"createdAt\\"]! as! String + return snapshot["createdAt"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"createdAt\\") + snapshot.updateValue(newValue, forKey: "createdAt") } } public var updatedAt: String { get { - return snapshot[\\"updatedAt\\"]! as! String + return snapshot["updatedAt"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"updatedAt\\") + snapshot.updateValue(newValue, forKey: "updatedAt") } } public struct Post: GraphQLSelectionSet { - public static let possibleTypes = [\\"ModelPostConnection\\"] + public static let possibleTypes = ["ModelPostConnection"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"__typename\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"nextToken\\", type: .scalar(String.self)), + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("nextToken", type: .scalar(String.self)), ] public var snapshot: Snapshot @@ -1177,24 +1177,24 @@ public final class GetBlogQuery: GraphQLQuery { } public init(nextToken: String? = nil) { - self.init(snapshot: [\\"__typename\\": \\"ModelPostConnection\\", \\"nextToken\\": nextToken]) + self.init(snapshot: ["__typename": "ModelPostConnection", "nextToken": nextToken]) } public var __typename: String { get { - return snapshot[\\"__typename\\"]! as! String + return snapshot["__typename"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"__typename\\") + snapshot.updateValue(newValue, forKey: "__typename") } } public var nextToken: String? { get { - return snapshot[\\"nextToken\\"] as? String + return snapshot["nextToken"] as? String } set { - snapshot.updateValue(newValue, forKey: \\"nextToken\\") + snapshot.updateValue(newValue, forKey: "nextToken") } } } @@ -1205,20 +1205,20 @@ public final class GetBlogQuery: GraphQLQuery { `; exports[`generateTypes targets basic angular 1`] = ` -Object { +{ "api.service.ts": "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. -import { Injectable } from \\"@angular/core\\"; -import API, { graphqlOperation, GraphQLResult } from \\"@aws-amplify/api-graphql\\"; -import { Observable } from \\"zen-observable-ts\\"; +import { Injectable } from "@angular/core"; +import API, { graphqlOperation, GraphQLResult } from "@aws-amplify/api-graphql"; +import { Observable } from "zen-observable-ts"; export interface SubscriptionResponse { value: GraphQLResult; } export type Blog = { - __typename: \\"Blog\\"; + __typename: "Blog"; id: string; name: string; posts?: ModelPostConnection | null; @@ -1227,13 +1227,13 @@ export type Blog = { }; export type ModelPostConnection = { - __typename: \\"ModelPostConnection\\"; + __typename: "ModelPostConnection"; items: Array; nextToken?: string | null; }; export type Post = { - __typename: \\"Post\\"; + __typename: "Post"; id: string; title: string; blog?: Blog | null; @@ -1244,13 +1244,13 @@ export type Post = { }; export type ModelCommentConnection = { - __typename: \\"ModelCommentConnection\\"; + __typename: "ModelCommentConnection"; items: Array; nextToken?: string | null; }; export type Comment = { - __typename: \\"Comment\\"; + __typename: "Comment"; id: string; post?: Post | null; content: string; @@ -1260,11 +1260,11 @@ export type Comment = { }; export type GetBlogQuery = { - __typename: \\"Blog\\"; + __typename: "Blog"; id: string; name: string; posts?: { - __typename: \\"ModelPostConnection\\"; + __typename: "ModelPostConnection"; nextToken?: string | null; } | null; createdAt: string; @@ -1272,7 +1272,7 @@ export type GetBlogQuery = { }; @Injectable({ - providedIn: \\"root\\" + providedIn: "root" }) export class APIService { async GetBlog(id: string): Promise { @@ -1303,7 +1303,7 @@ export class APIService { `; exports[`generateTypes targets basic flow 1`] = ` -Object { +{ "API.js": "/* @flow */ /* eslint-disable */ // This file was automatically generated and should not be edited. @@ -1314,7 +1314,7 @@ export type GetBlogQueryVariables = {| export type GetBlogQuery = {| getBlog: ? {| - __typename: \\"Blog\\", + __typename: "Blog", id: string, name: string, posts: ? {| @@ -1329,7 +1329,7 @@ export type GetBlogQuery = {| `; exports[`generateTypes targets basic flow-modern 1`] = ` -Object { +{ "GetBlog.js": " /* @flow */ @@ -1340,12 +1340,12 @@ Object { // ==================================================== export type GetBlog_getBlog_posts = { - __typename: \\"ModelPostConnection\\", + __typename: "ModelPostConnection", nextToken: ?string, }; export type GetBlog_getBlog = { - __typename: \\"Blog\\", + __typename: "Blog", id: string, name: string, posts: ?GetBlog_getBlog_posts, @@ -1371,267 +1371,267 @@ export type GetBlog = { `; exports[`generateTypes targets basic json 1`] = ` -Object { +{ "API": "{ - \\"operations\\": [ + "operations": [ { - \\"filePath\\": \\"GraphQL request\\", - \\"operationName\\": \\"GetBlog\\", - \\"operationType\\": \\"query\\", - \\"rootType\\": \\"Query\\", - \\"variables\\": [ + "filePath": "GraphQL request", + "operationName": "GetBlog", + "operationType": "query", + "rootType": "Query", + "variables": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\" + "name": "id", + "type": "ID!" } ], - \\"source\\": \\"query GetBlog($id: ID!) {\\\\n getBlog(id: $id) {\\\\n __typename\\\\n id\\\\n name\\\\n posts {\\\\n __typename\\\\n nextToken\\\\n }\\\\n createdAt\\\\n updatedAt\\\\n }\\\\n}\\", - \\"fields\\": [ + "source": "query GetBlog($id: ID!) {\\n getBlog(id: $id) {\\n __typename\\n id\\n name\\n posts {\\n __typename\\n nextToken\\n }\\n createdAt\\n updatedAt\\n }\\n}", + "fields": [ { - \\"responseName\\": \\"getBlog\\", - \\"fieldName\\": \\"getBlog\\", - \\"type\\": \\"Blog\\", - \\"args\\": [ + "responseName": "getBlog", + "fieldName": "getBlog", + "type": "Blog", + "args": [ { - \\"name\\": \\"id\\", - \\"value\\": { - \\"kind\\": \\"Variable\\", - \\"variableName\\": \\"id\\" + "name": "id", + "value": { + "kind": "Variable", + "variableName": "id" }, - \\"type\\": \\"ID!\\" + "type": "ID!" } ], - \\"isConditional\\": false, - \\"isDeprecated\\": false, - \\"fields\\": [ + "isConditional": false, + "isDeprecated": false, + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"id\\", - \\"fieldName\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "id", + "fieldName": "id", + "type": "ID!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"name\\", - \\"fieldName\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "name", + "fieldName": "name", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"posts\\", - \\"fieldName\\": \\"posts\\", - \\"type\\": \\"ModelPostConnection\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false, - \\"fields\\": [ + "responseName": "posts", + "fieldName": "posts", + "type": "ModelPostConnection", + "isConditional": false, + "isDeprecated": false, + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"nextToken\\", - \\"fieldName\\": \\"nextToken\\", - \\"type\\": \\"String\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "nextToken", + "fieldName": "nextToken", + "type": "String", + "isConditional": false, + "isDeprecated": false } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [] + "fragmentSpreads": [], + "inlineFragments": [] }, { - \\"responseName\\": \\"createdAt\\", - \\"fieldName\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "createdAt", + "fieldName": "createdAt", + "type": "AWSDateTime!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"updatedAt\\", - \\"fieldName\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "updatedAt", + "fieldName": "updatedAt", + "type": "AWSDateTime!", + "isConditional": false, + "isDeprecated": false } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [] + "fragmentSpreads": [], + "inlineFragments": [] } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [], - \\"fragmentsReferenced\\": [], - \\"sourceWithFragments\\": \\"query GetBlog($id: ID!) {\\\\n getBlog(id: $id) {\\\\n __typename\\\\n id\\\\n name\\\\n posts {\\\\n __typename\\\\n nextToken\\\\n }\\\\n createdAt\\\\n updatedAt\\\\n }\\\\n}\\", - \\"operationId\\": \\"5c7cef64646454bdbe2408d4cc48a54ba8d1f8a6e8a38b074feaeaa717803d7f\\" + "fragmentSpreads": [], + "inlineFragments": [], + "fragmentsReferenced": [], + "sourceWithFragments": "query GetBlog($id: ID!) {\\n getBlog(id: $id) {\\n __typename\\n id\\n name\\n posts {\\n __typename\\n nextToken\\n }\\n createdAt\\n updatedAt\\n }\\n}", + "operationId": "5c7cef64646454bdbe2408d4cc48a54ba8d1f8a6e8a38b074feaeaa717803d7f" } ], - \\"fragments\\": [], - \\"typesUsed\\": [ + "fragments": [], + "typesUsed": [ { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Blog\\", - \\"description\\": null, - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Blog", + "description": null, + "ifaces": [], + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": null + "name": "id", + "type": "ID!", + "description": null }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"description\\": null + "name": "name", + "type": "String!", + "description": null }, { - \\"name\\": \\"posts\\", - \\"type\\": \\"ModelPostConnection\\", - \\"description\\": null + "name": "posts", + "type": "ModelPostConnection", + "description": null }, { - \\"name\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"description\\": null + "name": "createdAt", + "type": "AWSDateTime!", + "description": null }, { - \\"name\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"description\\": null + "name": "updatedAt", + "type": "AWSDateTime!", + "description": null } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"ModelPostConnection\\", - \\"description\\": null, - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "ModelPostConnection", + "description": null, + "ifaces": [], + "fields": [ { - \\"name\\": \\"items\\", - \\"type\\": \\"[Post]!\\", - \\"description\\": null + "name": "items", + "type": "[Post]!", + "description": null }, { - \\"name\\": \\"nextToken\\", - \\"type\\": \\"String\\", - \\"description\\": null + "name": "nextToken", + "type": "String", + "description": null } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Post\\", - \\"description\\": null, - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Post", + "description": null, + "ifaces": [], + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": null + "name": "id", + "type": "ID!", + "description": null }, { - \\"name\\": \\"title\\", - \\"type\\": \\"String!\\", - \\"description\\": null + "name": "title", + "type": "String!", + "description": null }, { - \\"name\\": \\"blog\\", - \\"type\\": \\"Blog\\", - \\"description\\": null + "name": "blog", + "type": "Blog", + "description": null }, { - \\"name\\": \\"comments\\", - \\"type\\": \\"ModelCommentConnection\\", - \\"description\\": null + "name": "comments", + "type": "ModelCommentConnection", + "description": null }, { - \\"name\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"description\\": null + "name": "createdAt", + "type": "AWSDateTime!", + "description": null }, { - \\"name\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"description\\": null + "name": "updatedAt", + "type": "AWSDateTime!", + "description": null }, { - \\"name\\": \\"blogPostsId\\", - \\"type\\": \\"ID\\", - \\"description\\": null + "name": "blogPostsId", + "type": "ID", + "description": null } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"ModelCommentConnection\\", - \\"description\\": null, - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "ModelCommentConnection", + "description": null, + "ifaces": [], + "fields": [ { - \\"name\\": \\"items\\", - \\"type\\": \\"[Comment]!\\", - \\"description\\": null + "name": "items", + "type": "[Comment]!", + "description": null }, { - \\"name\\": \\"nextToken\\", - \\"type\\": \\"String\\", - \\"description\\": null + "name": "nextToken", + "type": "String", + "description": null } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Comment\\", - \\"description\\": null, - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Comment", + "description": null, + "ifaces": [], + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"description\\": null + "name": "id", + "type": "ID!", + "description": null }, { - \\"name\\": \\"post\\", - \\"type\\": \\"Post\\", - \\"description\\": null + "name": "post", + "type": "Post", + "description": null }, { - \\"name\\": \\"content\\", - \\"type\\": \\"String!\\", - \\"description\\": null + "name": "content", + "type": "String!", + "description": null }, { - \\"name\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"description\\": null + "name": "createdAt", + "type": "AWSDateTime!", + "description": null }, { - \\"name\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"description\\": null + "name": "updatedAt", + "type": "AWSDateTime!", + "description": null }, { - \\"name\\": \\"postCommentsId\\", - \\"type\\": \\"ID\\", - \\"description\\": null + "name": "postCommentsId", + "type": "ID", + "description": null } ] }, { - \\"kind\\": \\"ScalarType\\", - \\"name\\": \\"AWSDateTime\\", - \\"description\\": \\"The \`AWSDateTime\` scalar type provided by AWS AppSync, represents a valid ***extended*** [ISO 8601 DateTime](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) string. In other words, this scalar type accepts datetime strings of the form \`YYYY-MM-DDThh:mm:ss.SSSZ\`. The scalar can also accept \\\\\\"negative years\\\\\\" of the form \`-YYYY\` which correspond to years before \`0000\`. For example, \\\\\\"**-2017-01-01T00:00Z**\\\\\\" and \\\\\\"**-9999-01-01T00:00Z**\\\\\\" are both valid datetime strings. The field after the two digit seconds field is a nanoseconds field. It can accept between 1 and 9 digits. So, for example, \\\\\\"**1970-01-01T12:00:00.2Z**\\\\\\", \\\\\\"**1970-01-01T12:00:00.277Z**\\\\\\" and \\\\\\"**1970-01-01T12:00:00.123456789Z**\\\\\\" are all valid datetime strings. The seconds and nanoseconds fields are optional (the seconds field must be specified if the nanoseconds field is to be used). The [time zone offset](https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators) is compulsory for this scalar. The time zone offset must either be \`Z\` (representing the UTC time zone) or be in the format \`±hh:mm:ss\`. The seconds field in the timezone offset will be considered valid even though it is not part of the ISO 8601 standard.\\" + "kind": "ScalarType", + "name": "AWSDateTime", + "description": "The \`AWSDateTime\` scalar type provided by AWS AppSync, represents a valid ***extended*** [ISO 8601 DateTime](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) string. In other words, this scalar type accepts datetime strings of the form \`YYYY-MM-DDThh:mm:ss.SSSZ\`. The scalar can also accept \\"negative years\\" of the form \`-YYYY\` which correspond to years before \`0000\`. For example, \\"**-2017-01-01T00:00Z**\\" and \\"**-9999-01-01T00:00Z**\\" are both valid datetime strings. The field after the two digit seconds field is a nanoseconds field. It can accept between 1 and 9 digits. So, for example, \\"**1970-01-01T12:00:00.2Z**\\", \\"**1970-01-01T12:00:00.277Z**\\" and \\"**1970-01-01T12:00:00.123456789Z**\\" are all valid datetime strings. The seconds and nanoseconds fields are optional (the seconds field must be specified if the nanoseconds field is to be used). The [time zone offset](https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators) is compulsory for this scalar. The time zone offset must either be \`Z\` (representing the UTC time zone) or be in the format \`±hh:mm:ss\`. The seconds field in the timezone offset will be considered valid even though it is not part of the ISO 8601 standard." } ] }", @@ -1639,239 +1639,239 @@ Object { `; exports[`generateTypes targets basic json 2`] = ` -Object { +{ "API": "{ - \\"operations\\": [ + "operations": [ { - \\"filePath\\": \\"GraphQL request\\", - \\"operationName\\": \\"GetBlog\\", - \\"operationType\\": \\"query\\", - \\"rootType\\": \\"Query\\", - \\"variables\\": [ + "filePath": "GraphQL request", + "operationName": "GetBlog", + "operationType": "query", + "rootType": "Query", + "variables": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\" + "name": "id", + "type": "ID!" } ], - \\"source\\": \\"query GetBlog($id: ID!) {\\\\n getBlog(id: $id) {\\\\n __typename\\\\n id\\\\n name\\\\n posts {\\\\n __typename\\\\n nextToken\\\\n }\\\\n createdAt\\\\n updatedAt\\\\n }\\\\n}\\", - \\"fields\\": [ + "source": "query GetBlog($id: ID!) {\\n getBlog(id: $id) {\\n __typename\\n id\\n name\\n posts {\\n __typename\\n nextToken\\n }\\n createdAt\\n updatedAt\\n }\\n}", + "fields": [ { - \\"responseName\\": \\"getBlog\\", - \\"fieldName\\": \\"getBlog\\", - \\"type\\": \\"Blog\\", - \\"args\\": [ + "responseName": "getBlog", + "fieldName": "getBlog", + "type": "Blog", + "args": [ { - \\"name\\": \\"id\\", - \\"value\\": { - \\"kind\\": \\"Variable\\", - \\"variableName\\": \\"id\\" + "name": "id", + "value": { + "kind": "Variable", + "variableName": "id" }, - \\"type\\": \\"ID!\\" + "type": "ID!" } ], - \\"isConditional\\": false, - \\"isDeprecated\\": false, - \\"fields\\": [ + "isConditional": false, + "isDeprecated": false, + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"id\\", - \\"fieldName\\": \\"id\\", - \\"type\\": \\"ID!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "id", + "fieldName": "id", + "type": "ID!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"name\\", - \\"fieldName\\": \\"name\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "name", + "fieldName": "name", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"posts\\", - \\"fieldName\\": \\"posts\\", - \\"type\\": \\"ModelPostConnection\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false, - \\"fields\\": [ + "responseName": "posts", + "fieldName": "posts", + "type": "ModelPostConnection", + "isConditional": false, + "isDeprecated": false, + "fields": [ { - \\"responseName\\": \\"__typename\\", - \\"fieldName\\": \\"__typename\\", - \\"type\\": \\"String!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "__typename", + "fieldName": "__typename", + "type": "String!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"nextToken\\", - \\"fieldName\\": \\"nextToken\\", - \\"type\\": \\"String\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "nextToken", + "fieldName": "nextToken", + "type": "String", + "isConditional": false, + "isDeprecated": false } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [] + "fragmentSpreads": [], + "inlineFragments": [] }, { - \\"responseName\\": \\"createdAt\\", - \\"fieldName\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "createdAt", + "fieldName": "createdAt", + "type": "AWSDateTime!", + "isConditional": false, + "isDeprecated": false }, { - \\"responseName\\": \\"updatedAt\\", - \\"fieldName\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime!\\", - \\"isConditional\\": false, - \\"isDeprecated\\": false + "responseName": "updatedAt", + "fieldName": "updatedAt", + "type": "AWSDateTime!", + "isConditional": false, + "isDeprecated": false } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [] + "fragmentSpreads": [], + "inlineFragments": [] } ], - \\"fragmentSpreads\\": [], - \\"inlineFragments\\": [], - \\"fragmentsReferenced\\": [], - \\"sourceWithFragments\\": \\"query GetBlog($id: ID!) {\\\\n getBlog(id: $id) {\\\\n __typename\\\\n id\\\\n name\\\\n posts {\\\\n __typename\\\\n nextToken\\\\n }\\\\n createdAt\\\\n updatedAt\\\\n }\\\\n}\\", - \\"operationId\\": \\"5c7cef64646454bdbe2408d4cc48a54ba8d1f8a6e8a38b074feaeaa717803d7f\\" + "fragmentSpreads": [], + "inlineFragments": [], + "fragmentsReferenced": [], + "sourceWithFragments": "query GetBlog($id: ID!) {\\n getBlog(id: $id) {\\n __typename\\n id\\n name\\n posts {\\n __typename\\n nextToken\\n }\\n createdAt\\n updatedAt\\n }\\n}", + "operationId": "5c7cef64646454bdbe2408d4cc48a54ba8d1f8a6e8a38b074feaeaa717803d7f" } ], - \\"fragments\\": [], - \\"typesUsed\\": [ + "fragments": [], + "typesUsed": [ { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Blog\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Blog", + "ifaces": [], + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\" + "name": "id", + "type": "ID!" }, { - \\"name\\": \\"name\\", - \\"type\\": \\"String!\\" + "name": "name", + "type": "String!" }, { - \\"name\\": \\"posts\\", - \\"type\\": \\"ModelPostConnection\\" + "name": "posts", + "type": "ModelPostConnection" }, { - \\"name\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime!\\" + "name": "createdAt", + "type": "AWSDateTime!" }, { - \\"name\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime!\\" + "name": "updatedAt", + "type": "AWSDateTime!" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"ModelPostConnection\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "ModelPostConnection", + "ifaces": [], + "fields": [ { - \\"name\\": \\"items\\", - \\"type\\": \\"[Post]!\\" + "name": "items", + "type": "[Post]!" }, { - \\"name\\": \\"nextToken\\", - \\"type\\": \\"String\\" + "name": "nextToken", + "type": "String" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Post\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Post", + "ifaces": [], + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\" + "name": "id", + "type": "ID!" }, { - \\"name\\": \\"title\\", - \\"type\\": \\"String!\\" + "name": "title", + "type": "String!" }, { - \\"name\\": \\"blog\\", - \\"type\\": \\"Blog\\" + "name": "blog", + "type": "Blog" }, { - \\"name\\": \\"comments\\", - \\"type\\": \\"ModelCommentConnection\\" + "name": "comments", + "type": "ModelCommentConnection" }, { - \\"name\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime!\\" + "name": "createdAt", + "type": "AWSDateTime!" }, { - \\"name\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime!\\" + "name": "updatedAt", + "type": "AWSDateTime!" }, { - \\"name\\": \\"blogPostsId\\", - \\"type\\": \\"ID\\" + "name": "blogPostsId", + "type": "ID" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"ModelCommentConnection\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "ModelCommentConnection", + "ifaces": [], + "fields": [ { - \\"name\\": \\"items\\", - \\"type\\": \\"[Comment]!\\" + "name": "items", + "type": "[Comment]!" }, { - \\"name\\": \\"nextToken\\", - \\"type\\": \\"String\\" + "name": "nextToken", + "type": "String" } ] }, { - \\"kind\\": \\"ObjectType\\", - \\"name\\": \\"Comment\\", - \\"ifaces\\": [], - \\"fields\\": [ + "kind": "ObjectType", + "name": "Comment", + "ifaces": [], + "fields": [ { - \\"name\\": \\"id\\", - \\"type\\": \\"ID!\\" + "name": "id", + "type": "ID!" }, { - \\"name\\": \\"post\\", - \\"type\\": \\"Post\\" + "name": "post", + "type": "Post" }, { - \\"name\\": \\"content\\", - \\"type\\": \\"String!\\" + "name": "content", + "type": "String!" }, { - \\"name\\": \\"createdAt\\", - \\"type\\": \\"AWSDateTime!\\" + "name": "createdAt", + "type": "AWSDateTime!" }, { - \\"name\\": \\"updatedAt\\", - \\"type\\": \\"AWSDateTime!\\" + "name": "updatedAt", + "type": "AWSDateTime!" }, { - \\"name\\": \\"postCommentsId\\", - \\"type\\": \\"ID\\" + "name": "postCommentsId", + "type": "ID" } ] }, { - \\"kind\\": \\"ScalarType\\", - \\"name\\": \\"AWSDateTime\\" + "kind": "ScalarType", + "name": "AWSDateTime" } ] }", @@ -1879,25 +1879,25 @@ Object { `; exports[`generateTypes targets basic scala 1`] = ` -Object { +{ "API": "// This file was automatically generated and should not be edited. object GetBlogQuery extends com.apollographql.scalajs.GraphQLQuery { val operationString = - \\"query GetBlog($id: ID!) {\\" + - \\" getBlog(id: $id) {\\" + - \\" __typename\\" + - \\" id\\" + - \\" name\\" + - \\" posts {\\" + - \\" __typename\\" + - \\" nextToken\\" + - \\" }\\" + - \\" createdAt\\" + - \\" updatedAt\\" + - \\" }\\" + - \\"}\\" + "query GetBlog($id: ID!) {" + + " getBlog(id: $id) {" + + " __typename" + + " id" + + " name" + + " posts {" + + " __typename" + + " nextToken" + + " }" + + " createdAt" + + " updatedAt" + + " }" + + "}" val operation = com.apollographql.scalajs.gql(operationString) @@ -1908,28 +1908,28 @@ object GetBlogQuery extends com.apollographql.scalajs.GraphQLQuery { } object Data { - val possibleTypes = scala.collection.Set(\\"Query\\") + val possibleTypes = scala.collection.Set("Query") } case class GetBlog(id: String, name: String, posts: Option[Post], createdAt: String, updatedAt: String) { } object GetBlog { - val possibleTypes = scala.collection.Set(\\"Blog\\") + val possibleTypes = scala.collection.Set("Blog") } case class Post(nextToken: Option[String]) { } object Post { - val possibleTypes = scala.collection.Set(\\"ModelPostConnection\\") + val possibleTypes = scala.collection.Set("ModelPostConnection") } }", } `; exports[`generateTypes targets basic swift 1`] = ` -Object { +{ "API.swift": "// This file was automatically generated and should not be edited. #if canImport(AWSAPIPlugin) @@ -2185,13 +2185,13 @@ public enum JSONDecodingError: Error, LocalizedError { public var errorDescription: String? { switch self { case .missingValue: - return \\"Missing value\\" + return "Missing value" case .nullValue: - return \\"Unexpected null value\\" + return "Unexpected null value" case .wrongType: - return \\"Wrong type\\" + return "Wrong type" case .couldNotConvert(let value, let expectedType): - return \\"Could not convert \\\\\\"\\\\(value)\\\\\\" to \\\\(expectedType)\\" + return "Could not convert \\"\\(value)\\" to \\(expectedType)" } } } @@ -2296,7 +2296,7 @@ extension Optional: JSONEncodable { case .some(let wrapped as JSONEncodable): return wrapped.jsonValue default: - fatalError(\\"Optional is only JSONEncodable if Wrapped is\\") + fatalError("Optional is only JSONEncodable if Wrapped is") } } } @@ -2312,7 +2312,7 @@ extension Dictionary: JSONEncodable { if case let (key as String, value as JSONEncodable) = (key, value) { jsonObject[key] = value.jsonValue } else { - fatalError(\\"Dictionary is only JSONEncodable if Value is (and if Key is String)\\") + fatalError("Dictionary is only JSONEncodable if Value is (and if Key is String)") } } return jsonObject @@ -2325,7 +2325,7 @@ extension Array: JSONEncodable { if case let element as JSONEncodable = element { return element.jsonValue } else { - fatalError(\\"Array is only JSONEncodable if Element is\\") + fatalError("Array is only JSONEncodable if Element is") } } } @@ -2356,7 +2356,7 @@ import AWSAppSync public final class GetBlogQuery: GraphQLQuery { public static let operationString = - \\"query GetBlog($id: ID!) {\\\\n getBlog(id: $id) {\\\\n __typename\\\\n id\\\\n name\\\\n posts {\\\\n __typename\\\\n nextToken\\\\n }\\\\n createdAt\\\\n updatedAt\\\\n }\\\\n}\\" + "query GetBlog($id: ID!) {\\n getBlog(id: $id) {\\n __typename\\n id\\n name\\n posts {\\n __typename\\n nextToken\\n }\\n createdAt\\n updatedAt\\n }\\n}" public var id: GraphQLID @@ -2365,14 +2365,14 @@ public final class GetBlogQuery: GraphQLQuery { } public var variables: GraphQLMap? { - return [\\"id\\": id] + return ["id": id] } public struct Data: GraphQLSelectionSet { - public static let possibleTypes = [\\"Query\\"] + public static let possibleTypes = ["Query"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"getBlog\\", arguments: [\\"id\\": GraphQLVariable(\\"id\\")], type: .object(GetBlog.selections)), + GraphQLField("getBlog", arguments: ["id": GraphQLVariable("id")], type: .object(GetBlog.selections)), ] public var snapshot: Snapshot @@ -2382,28 +2382,28 @@ public final class GetBlogQuery: GraphQLQuery { } public init(getBlog: GetBlog? = nil) { - self.init(snapshot: [\\"__typename\\": \\"Query\\", \\"getBlog\\": getBlog.flatMap { $0.snapshot }]) + self.init(snapshot: ["__typename": "Query", "getBlog": getBlog.flatMap { $0.snapshot }]) } public var getBlog: GetBlog? { get { - return (snapshot[\\"getBlog\\"] as? Snapshot).flatMap { GetBlog(snapshot: $0) } + return (snapshot["getBlog"] as? Snapshot).flatMap { GetBlog(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"getBlog\\") + snapshot.updateValue(newValue?.snapshot, forKey: "getBlog") } } public struct GetBlog: GraphQLSelectionSet { - public static let possibleTypes = [\\"Blog\\"] + public static let possibleTypes = ["Blog"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"__typename\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"id\\", type: .nonNull(.scalar(GraphQLID.self))), - GraphQLField(\\"name\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"posts\\", type: .object(Post.selections)), - GraphQLField(\\"createdAt\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"updatedAt\\", type: .nonNull(.scalar(String.self))), + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("posts", type: .object(Post.selections)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), ] public var snapshot: Snapshot @@ -2413,69 +2413,69 @@ public final class GetBlogQuery: GraphQLQuery { } public init(id: GraphQLID, name: String, posts: Post? = nil, createdAt: String, updatedAt: String) { - self.init(snapshot: [\\"__typename\\": \\"Blog\\", \\"id\\": id, \\"name\\": name, \\"posts\\": posts.flatMap { $0.snapshot }, \\"createdAt\\": createdAt, \\"updatedAt\\": updatedAt]) + self.init(snapshot: ["__typename": "Blog", "id": id, "name": name, "posts": posts.flatMap { $0.snapshot }, "createdAt": createdAt, "updatedAt": updatedAt]) } public var __typename: String { get { - return snapshot[\\"__typename\\"]! as! String + return snapshot["__typename"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"__typename\\") + snapshot.updateValue(newValue, forKey: "__typename") } } public var id: GraphQLID { get { - return snapshot[\\"id\\"]! as! GraphQLID + return snapshot["id"]! as! GraphQLID } set { - snapshot.updateValue(newValue, forKey: \\"id\\") + snapshot.updateValue(newValue, forKey: "id") } } public var name: String { get { - return snapshot[\\"name\\"]! as! String + return snapshot["name"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"name\\") + snapshot.updateValue(newValue, forKey: "name") } } public var posts: Post? { get { - return (snapshot[\\"posts\\"] as? Snapshot).flatMap { Post(snapshot: $0) } + return (snapshot["posts"] as? Snapshot).flatMap { Post(snapshot: $0) } } set { - snapshot.updateValue(newValue?.snapshot, forKey: \\"posts\\") + snapshot.updateValue(newValue?.snapshot, forKey: "posts") } } public var createdAt: String { get { - return snapshot[\\"createdAt\\"]! as! String + return snapshot["createdAt"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"createdAt\\") + snapshot.updateValue(newValue, forKey: "createdAt") } } public var updatedAt: String { get { - return snapshot[\\"updatedAt\\"]! as! String + return snapshot["updatedAt"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"updatedAt\\") + snapshot.updateValue(newValue, forKey: "updatedAt") } } public struct Post: GraphQLSelectionSet { - public static let possibleTypes = [\\"ModelPostConnection\\"] + public static let possibleTypes = ["ModelPostConnection"] public static let selections: [GraphQLSelection] = [ - GraphQLField(\\"__typename\\", type: .nonNull(.scalar(String.self))), - GraphQLField(\\"nextToken\\", type: .scalar(String.self)), + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("nextToken", type: .scalar(String.self)), ] public var snapshot: Snapshot @@ -2485,24 +2485,24 @@ public final class GetBlogQuery: GraphQLQuery { } public init(nextToken: String? = nil) { - self.init(snapshot: [\\"__typename\\": \\"ModelPostConnection\\", \\"nextToken\\": nextToken]) + self.init(snapshot: ["__typename": "ModelPostConnection", "nextToken": nextToken]) } public var __typename: String { get { - return snapshot[\\"__typename\\"]! as! String + return snapshot["__typename"]! as! String } set { - snapshot.updateValue(newValue, forKey: \\"__typename\\") + snapshot.updateValue(newValue, forKey: "__typename") } } public var nextToken: String? { get { - return snapshot[\\"nextToken\\"] as? String + return snapshot["nextToken"] as? String } set { - snapshot.updateValue(newValue, forKey: \\"nextToken\\") + snapshot.updateValue(newValue, forKey: "nextToken") } } } @@ -2513,13 +2513,13 @@ public final class GetBlogQuery: GraphQLQuery { `; exports[`generateTypes targets basic typescript 1`] = ` -Object { +{ "API.ts": "/* tslint:disable */ /* eslint-disable */ // This file was automatically generated and should not be edited. export type Blog = { - __typename: \\"Blog\\", + __typename: "Blog", id: string, name: string, posts?: ModelPostConnection | null, @@ -2528,13 +2528,13 @@ export type Blog = { }; export type ModelPostConnection = { - __typename: \\"ModelPostConnection\\", + __typename: "ModelPostConnection", items: Array, nextToken?: string | null, }; export type Post = { - __typename: \\"Post\\", + __typename: "Post", id: string, title: string, blog?: Blog | null, @@ -2545,13 +2545,13 @@ export type Post = { }; export type ModelCommentConnection = { - __typename: \\"ModelCommentConnection\\", + __typename: "ModelCommentConnection", items: Array, nextToken?: string | null, }; export type Comment = { - __typename: \\"Comment\\", + __typename: "Comment", id: string, post?: Post | null, content: string, @@ -2566,11 +2566,11 @@ export type GetBlogQueryVariables = { export type GetBlogQuery = { getBlog?: { - __typename: \\"Blog\\", + __typename: "Blog", id: string, name: string, posts?: { - __typename: \\"ModelPostConnection\\", + __typename: "ModelPostConnection", nextToken?: string | null, } | null, createdAt: string, diff --git a/packages/graphql-generator/src/__tests__/utils/__snapshots__/GraphQLStatementsFormatter.test.ts.snap b/packages/graphql-generator/src/__tests__/utils/__snapshots__/GraphQLStatementsFormatter.test.ts.snap index 871c73f3f..572cea25d 100644 --- a/packages/graphql-generator/src/__tests__/utils/__snapshots__/GraphQLStatementsFormatter.test.ts.snap +++ b/packages/graphql-generator/src/__tests__/utils/__snapshots__/GraphQLStatementsFormatter.test.ts.snap @@ -5,7 +5,7 @@ exports[`GraphQL statements Formatter Generates formatted output and only remove /* eslint-disable */ // this is an auto generated file. This will be overwritten -import * as APITypes from \\"../Components/Data/API\\"; +import * as APITypes from "../Components/Data/API"; type GeneratedQuery = string & { __generatedQueryInput: InputType; __generatedQueryOutput: OutputType; @@ -93,7 +93,7 @@ exports[`GraphQL statements Formatter Generates formatted output for TS frontend /* eslint-disable */ // this is an auto generated file. This will be overwritten -import * as APITypes from \\"../API\\"; +import * as APITypes from "../API"; type GeneratedQuery = string & { __generatedQueryInput: InputType; __generatedQueryOutput: OutputType; @@ -119,7 +119,7 @@ exports[`GraphQL statements Formatter Generates formatted output for TS frontend /* eslint-disable */ // this is an auto generated file. This will be overwritten -import * as APITypes from \\"./API\\"; +import * as APITypes from "./API"; type GeneratedQuery = string & { __generatedQueryInput: InputType; __generatedQueryOutput: OutputType; @@ -145,7 +145,7 @@ exports[`GraphQL statements Formatter Generates formatted output for TS frontend /* eslint-disable */ // this is an auto generated file. This will be overwritten -import * as APITypes from \\"../API\\"; +import * as APITypes from "../API"; type GeneratedQuery = string & { __generatedQueryInput: InputType; __generatedQueryOutput: OutputType; @@ -171,7 +171,7 @@ exports[`GraphQL statements Formatter Generates formatted output for TS frontend /* eslint-disable */ // this is an auto generated file. This will be overwritten -import * as APITypes from \\"./API\\"; +import * as APITypes from "./API"; type GeneratedQuery = string & { __generatedQueryInput: InputType; __generatedQueryOutput: OutputType; diff --git a/packages/graphql-generator/src/__tests__/utils/__snapshots__/maps.test.ts.snap b/packages/graphql-generator/src/__tests__/utils/__snapshots__/maps.test.ts.snap index 55bff0777..f305af0a9 100644 --- a/packages/graphql-generator/src/__tests__/utils/__snapshots__/maps.test.ts.snap +++ b/packages/graphql-generator/src/__tests__/utils/__snapshots__/maps.test.ts.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`maps statementsTargetToFileExtensionMap 1`] = ` -Object { +{ "angular": "graphql", "flow": "js", "graphql": "graphql", diff --git a/packages/graphql-types-generator/src/scala/codeGeneration.js b/packages/graphql-types-generator/src/scala/codeGeneration.js index dc135def3..da6bca67b 100644 --- a/packages/graphql-types-generator/src/scala/codeGeneration.js +++ b/packages/graphql-types-generator/src/scala/codeGeneration.js @@ -152,8 +152,7 @@ export function classDeclarationForOperation( type: p.typeName, }; }), - }, - () => {} + } ); } else { generator.printOnNewline('type Variables = Unit'); @@ -185,14 +184,15 @@ export function caseClassDeclarationForFragment( inlineFragments, fragmentSpreads, }, - () => {}, - () => { - if (source) { - generator.printOnNewline('val fragmentString ='); - generator.withIndent(() => { - multilineString(generator, source); - }); - } + { + objectClosure: () => { + if (source) { + generator.printOnNewline('val fragmentString ='); + generator.withIndent(() => { + multilineString(generator, source); + }); + } + }, } ); } @@ -200,8 +200,7 @@ export function caseClassDeclarationForFragment( export function caseClassDeclarationForSelectionSet( generator, { caseClassName, parentType, fields, inlineFragments, fragmentSpreads, viewableAs }, - beforeClosure, - objectClosure + { beforeClosure, objectClosure } = {} ) { const possibleTypes = parentType ? possibleTypesForType(generator.context, parentType) : null; @@ -220,8 +219,7 @@ export function caseClassDeclarationForSelectionSet( type: p.typeName, }; }), - }, - () => {} + } ); } else { generator.printNewlineIfNeeded(); @@ -384,7 +382,6 @@ function caseClassDeclarationForInputObjectType(generator, type) { type: p.typeName, }; }), - }, - () => {} + } ); } diff --git a/packages/graphql-types-generator/src/utilities/CodeGenerator.ts b/packages/graphql-types-generator/src/utilities/CodeGenerator.ts index 721f94269..7e240fc6e 100644 --- a/packages/graphql-types-generator/src/utilities/CodeGenerator.ts +++ b/packages/graphql-types-generator/src/utilities/CodeGenerator.ts @@ -64,7 +64,7 @@ export class GeneratedFile implements BasicGeneratedFile { this.output += indentation; } - withIndent(closure: Function) { + withIndent(closure?: Function) { if (!closure) return; this.indentLevel++; @@ -73,7 +73,7 @@ export class GeneratedFile implements BasicGeneratedFile { this.indentLevel--; } - withinBlock(closure: Function, open = ' {', close = '}') { + withinBlock(closure?: Function, open = ' {', close = '}') { this.print(open); this.withIndent(closure); this.printOnNewline(close); @@ -136,11 +136,11 @@ export class CodeGenerator { this.currentFile.printIndent(); } - withIndent(closure: Function) { + withIndent(closure?: Function) { this.currentFile.withIndent(closure); } - withinBlock(closure: Function, open = ' {', close = '}') { + withinBlock(closure?: Function, open = ' {', close = '}') { this.currentFile.withinBlock(closure, open, close); } } diff --git a/packages/graphql-types-generator/test/loading.ts b/packages/graphql-types-generator/test/loading.ts index ba63b4b5e..aa70c60e6 100644 --- a/packages/graphql-types-generator/test/loading.ts +++ b/packages/graphql-types-generator/test/loading.ts @@ -12,16 +12,10 @@ describe('Validation', () => { }); test(`should throw when a file has invalid gql snippets`, () => { const inputPaths = [path.join(__dirname, '.', 'fixtures', 'misc', 'invalid-gqlQueries.js')]; - let error: Error | undefined; + const expectedPath = path.relative(process.cwd(), inputPaths[0]); - try { + expect(() => { loadAndMergeQueryDocuments(inputPaths); - } catch (err) { - error = err as Error; - } - - expect(error).toBeDefined(); - expect(error?.message.replace(/\\/g, '/')).toContain('test/fixtures/misc/invalid-gqlQueries.js'); - expect(error?.message).toContain('Failed on : world and other words'); + }).toThrowError(`Could not parse graphql operations in ${expectedPath}\n Failed on : world and other words`); }); });