-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Labels
bugSomething isn't workingSomething isn't workingdatastoreIssues related to the DataStore categoryIssues related to the DataStore categoryfollow upRequires follow up from maintainersRequires follow up from maintainers
Description
Describe the bug
Codegen produces the following error even though both sides of the connection are actually non-optional:
"DataStore does not support 1 to 1 connection with both sides of connection as optional field"
To Reproduce
- Create the schema below
- Add api, push, then run
amplify codegen models - See error
Expected behavior
Generates the code
Environment:
- Amplify Framework Version: 4.21.0
- Dependency Manager: Cocoapods
- Swift Version : 5.0
Device Information:
- Device: Simulator
- iOS Version: iOS 13.5
Additional context
Schema:
type PhoneCall @model {
id: ID!
caller: Person! @connection(name: "PhoneCallCaller")
callee: Person! @connection(name: "PhoneCallCallee")
transcript: Transcript! @connection(name: "PhoneCallTranscript")
}
type Person @model {
id: ID!
name: String!
callerOf: [PhoneCall!] @connection(name: "PhoneCallCaller")
calleeOf: [PhoneCall!] @connection(name: "PhoneCallCallee")
}
type Transcript @model {
id: ID!
text: String!
language: String
phoneCall: PhoneCall! @connection(name: "PhoneCallTranscript")
}
gakinson, acusti and ShahiShohanur
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdatastoreIssues related to the DataStore categoryIssues related to the DataStore categoryfollow upRequires follow up from maintainersRequires follow up from maintainers