TypeError: Cannot read property 'type' of undefined
See original GitHub issueHello,
I have updated the schema.graphql file and I am trying to complie it but I am getting the following error:
TypeError: Cannot read property ‘type’ of undefined
I am trying to implement many-to-many using two 1-M @connections, an @key, and a joining @model as explained here:
Below is my schema:
type User @model {
email: String!
firstName: String!
lastName: String!
isJobSeeker: Boolean
age: Int
mobile: String
address: String
userJobList: [UserJobs] @connection(keyName: "byUserJobs", fields: ["email"] )
}
type UserJobs
@model(queries: null)
@key(name: "byUserJobs", fields:["emailID", "jobsID"])
@key(name: "byJob", fields:["jobsID", "emailID"]) {
id:ID!
emailID: String!
jobsID: String!
user: User! @connection(fields: ["emailID"])
job: Job! @connection(fields: ["jobsID"])
}
type Job @model {
jobID: String!
isVolunteerJob: Boolean!
orgName: String
jobType: String
startDate: String
endDate: String
noOfHours: Int
startTime: String
endTime: String
description: String
amount: Int
address: String
userList: [UserJobs] @connection(keyName: "byJob", fields: ["jobID"])
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property 'type' of undefined ...
Your clicking action returns a function and you are dispatching that function with this.props.dispatch(clicking(isClicking)); .
Read more >Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >TypeError: Cannot read property 'type' of undefined #2795
eslint-plugin-react v7.20.6 causes the following error: ESLint: 7.6.0 (or 7.9.0) TypeError: Cannot read property 'type' of undefined ...
Read more >How to Avoid the Infamous "Cannot read properties of ... - Bitovi
That error message is telling you the function is returning undefined implicitly, but its return type does not include undefined in it. Awesome!...
Read more >TypeError: Cannot read property 'type' of undefined is ...
It is also observed that a browser console error appears: on-Submit error 'TypeError: Cannot read property 'type' of undefined" for the administrator as ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing this issue as the PR for this has been merged and will be included in the next release (after v4.24.1)
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels for those types of questions.