question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'type' of undefined

See original GitHub issue

Hello,

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:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
SwaySwaycommented, Jul 14, 2020

Closing this issue as the PR for this has been merged and will be included in the next release (after v4.24.1)

0reactions
github-actions[bot]commented, May 26, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found