input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } type Blog @model { id: ID! name: String! posts: [Post] @hasMany(indexName: "byBlog", fields: ["id"]) } type Post @model { id: ID! title: String! rating: Int! created: AWSDateTime blogID: ID @index(name: "byBlog") blog: Blog @belongsTo(fields: ["blogID"]) comments: [Comment] @hasMany(indexName: "byPost", fields: ["id"]) tags: [Tag] @manyToMany(relationName: "PostTags") } type Comment @model { id: ID! postID: ID! @index(name: "byPost", sortKeyFields: ["content"]) post: Post @belongsTo(fields: ["postID"]) content: String! } type Tag @model { id: ID! label: String! posts: [Post] @manyToMany(relationName: "PostTags") } type ModelWithAppsyncScalarTypes @model { id: ID! stringValue: String altStringValue: String listOfStringValue: [String] intValue: Int altIntValue: Int listOfIntValue: [Int] floatValue: Float listOfFloatValue: [Float] booleanValue: Boolean listOfBooleanValue: [Boolean] awsDateValue: AWSDate listOfAWSDateValue: [AWSDate] awsTimeValue: AWSTime listOfAWSTimeValue: [AWSTime] awsDateTimeValue: AWSDateTime listOfAWSDateTimeValue: [AWSDateTime] awsTimestampValue: AWSTimestamp listOfAWSTimestampValue: [AWSTimestamp] awsEmailValue: AWSEmail listOfAWSEmailValue: [AWSEmail] awsJsonValue: AWSJSON listOfAWSJsonValue: [AWSJSON] awsPhoneValue: AWSPhone listOfAWSPhoneValue: [AWSPhone] awsURLValue: AWSURL listOfAWSURLValue: [AWSURL] awsIPAddressValue: AWSIPAddress listOfAWSIPAddressValue: [AWSIPAddress] } type ModelWithEnum @model { id: ID! enumField: EnumField listOfEnumField: [EnumField] } enum EnumField { yes no } type ModelWithCustomType @model { id: ID! customTypeValue: CustomTypeWithAppsyncScalarTypes listOfCustomTypeValue: [CustomTypeWithAppsyncScalarTypes] } type CustomTypeWithAppsyncScalarTypes { stringValue: String listOfStringValue: [String] intValue: Int listOfIntValue: [Int] floatValue: Float listOfFloatValue: [Float] booleanValue: Boolean listOfBooleanValue: [Boolean] awsDateValue: AWSDate listOfAWSDateValue: [AWSDate] awsDateTimeValue: AWSDateTime listOfAWSDateTimeValue: [AWSDateTime] awsTimeValue: AWSTime listOfAWSTimeValue: [AWSTime] awsTimestampValue: AWSTimestamp listOfAWSTimestampValue: [AWSTimestamp] awsEmailValue: AWSEmail listOfAWSEmailValue: [AWSEmail] awsJsonValue: AWSJSON listOfAWSJsonValue: [AWSJSON] awsPhoneValue: AWSPhone listOfAWSPhoneValue: [AWSPhone] awsURLValue: AWSURL listOfAWSURLValue: [AWSURL] awsIPAddressValue: AWSIPAddress listOfAWSIPAddressValue: [AWSIPAddress] enumValue: EnumField listOfEnumValue: [EnumField] customTypeValue: SimpleCustomType listOfCustomTypeValue: [SimpleCustomType] } type SimpleCustomType { foo: String! } type HasOneParent @model { id: ID! name: String implicitChild: HasOneChild @hasOne explicitChildID: ID explicitChild: HasOneChild @hasOne(fields: ["explicitChildID"]) } type HasOneChild @model { id: ID! name: String } type HasManyParent @model { id: ID! name: String implicitChildren: [HasManyChildImplicit] @hasMany explicitChildren: [HasManyChildExplicit] @hasMany(indexName: "byHasManyParent", fields: ["id"]) } type HasManyChildImplicit @model { id: ID! name: String } type HasManyChildExplicit @model { id: ID! name: String hasManyParentID: ID! @index(name: "byHasManyParent", sortKeyFields: ["name"]) } type HasManyParentBiDirectionalImplicit @model { id: ID! name: String biDirectionalImplicitChildren: [HasManyChildBiDirectionalImplicit] @hasMany } type HasManyChildBiDirectionalImplicit @model { id: ID! name: String hasManyParent: HasManyParentBiDirectionalImplicit @belongsTo } type HasManyParentBiDirectionalExplicit @model { id: ID! name: String biDirectionalExplicitChildren: [HasManyChildBiDirectionalExplicit] @hasMany(indexName: "byHasManyParent", fields: ["id"]) } type HasManyChildBiDirectionalExplicit @model { id: ID! name: String hasManyParentId: ID! @index(name: "byHasManyParent", sortKeyFields: ["name"]) hasManyParent: HasManyParentBiDirectionalExplicit @belongsTo(fields: ["hasManyParentId"]) } type BelongsToParent @model { id: ID! name: String implicitChild: BelongsToChildImplicit @hasOne explicitChild: BelongsToChildExplicit @hasOne } type BelongsToChildImplicit @model { id: ID! name: String belongsToParent: BelongsToParent @belongsTo } type BelongsToChildExplicit @model { id: ID! name: String belongsToParentID: ID belongsToParent: BelongsToParent @belongsTo(fields: ["belongsToParentID"]) } type MultiRelatedMeeting @model { id: ID! @primaryKey title: String! attendees: [MultiRelatedRegistration] @hasMany(indexName: "byMeeting", fields: ["id"]) } type MultiRelatedAttendee @model { id: ID! @primaryKey meetings: [MultiRelatedRegistration] @hasMany(indexName: "byAttendee", fields: ["id"]) } type MultiRelatedRegistration @model { id: ID! @primaryKey meetingId: ID @index(name: "byMeeting", sortKeyFields: ["attendeeId"]) meeting: MultiRelatedMeeting! @belongsTo(fields: ["meetingId"]) attendeeId: ID @index(name: "byAttendee", sortKeyFields: ["meetingId"]) attendee: MultiRelatedAttendee! @belongsTo(fields: ["attendeeId"]) } type CpkInventory @model { productId: ID! @primaryKey(sortKeyFields: ["productName", "warehouseId"]) productName: String! warehouseId: String! description: String } type CpkHasOneUnidirectionalParent @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! implicitChild: CpkHasOneUnidirectionalChild @hasOne explicitChildID: ID explicitChildName: String explicitChild: CpkHasOneUnidirectionalChild @hasOne(fields: ["explicitChildID", "explicitChildName"]) } type CpkHasOneUnidirectionalChild @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! } type CpkOneToOneBidirectionalParentCD @model { customId: ID! @primaryKey(sortKeyFields: ["name"]) name: String! implicitChild: CpkOneToOneBidirectionalChildImplicitCD @hasOne explicitChild: CpkOneToOneBidirectionalChildExplicitCD @hasOne } type CpkOneToOneBidirectionalChildImplicitCD @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! belongsToParent: CpkOneToOneBidirectionalParentCD @belongsTo } type CpkOneToOneBidirectionalChildExplicitCD @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! belongsToParentID: ID belongsToParentName: String belongsToParent: CpkOneToOneBidirectionalParentCD @belongsTo(fields: ["belongsToParentID", "belongsToParentName"]) } type CpkOneToOneBidirectionalParentID @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! implicitChild: CpkOneToOneBidirectionalChildImplicitID @hasOne explicitChild: CpkOneToOneBidirectionalChildExplicitID @hasOne } type CpkOneToOneBidirectionalChildImplicitID @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! belongsToParent: CpkOneToOneBidirectionalParentID @belongsTo } type CpkOneToOneBidirectionalChildExplicitID @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! belongsToParentID: ID belongsToParentName: String belongsToParent: CpkOneToOneBidirectionalParentID @belongsTo(fields: ["belongsToParentID", "belongsToParentName"]) } type CpkHasManyUnidirectionalParent @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! implicitChildren: [CpkHasManyUnidirectionalChildImplicit] @hasMany explicitChildren: [CpkHasManyUnidirectionalChildExplicit] @hasMany(indexName: "byHasManyParentCpk", fields: ["id", "name"]) } type CpkHasManyUnidirectionalChildImplicit @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! } type CpkHasManyUnidirectionalChildExplicit @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! hasManyParentID: ID! @index(name: "byHasManyParentCpk", sortKeyFields: ["hasManyParentName"]) hasManyParentName: String! } type CpkHasManyParentBidirectionalImplicit @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! bidirectionalImplicitChildren: [CpkHasManyChildBidirectionalImplicit] @hasMany } type CpkHasManyChildBidirectionalImplicit @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! hasManyParent: CpkHasManyParentBidirectionalImplicit @belongsTo } type CpkHasManyParentBidirectionalExplicit @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! bidirectionalExplicitChildren: [CpkHasManyChildBidirectionalExplicit] @hasMany(indexName: "byHasManyParent", fields: ["id", "name"]) } type CpkHasManyChildBidirectionalExplicit @model { id: ID! @primaryKey(sortKeyFields: ["name"]) name: String! hasManyParentID: ID! @index(name: "byHasManyParent", sortKeyFields: ["hasManyParentName"]) hasManyParentName: String! hasManyParent: CpkHasManyParentBidirectionalExplicit @belongsTo(fields: ["hasManyParentID", "hasManyParentName"]) } type CpkManyToManyPost @model { id: ID! title: String! tags: [CpkManyToManyTag] @manyToMany(relationName: "CpkPostTags") } type CpkManyToManyTag @model { id: ID! @primaryKey(sortKeyFields: ["label"]) label: String! posts: [CpkManyToManyPost] @manyToMany(relationName: "CpkPostTags") }