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.

Relationships without data

See original GitHub issue

This throws Cannot read property 'id' of undefined

      "relationships": {
        "movie": {
          "links": {
            "self": "http://localhost:3000/api/v1/actor/1c9d234b-66c4-411e-b785-955d57db5536/relationships/movie",
            "related": "http://localhost:3000/api/v1/actor/1c9d234b-66c4-411e-b785-955d57db5536/movie"
          }
        }
      }

While this works.

      "relationships": {
        "movie": {
          "data": { "type": "movie", "id": "9" },
          "links": {
            "self": "http://localhost:3000/api/v1/actor/1c9d234b-66c4-411e-b785-955d57db5536/relationships/movie",
            "related": "http://localhost:3000/api/v1/actor/1c9d234b-66c4-411e-b785-955d57db5536/movie"
          }
        }
      }

It seems that a data object is assumed for each relationship even though the spec says it’s not required.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
eiktyrnercommented, Feb 3, 2017

Thanks for the quick help, that seems to solve my issue.

0reactions
yury-dymovcommented, Feb 3, 2017

Should be resolved via https://github.com/yury-dymov/json-api-normalizer/commit/9eba58b7cf7aad488fa67129fcd494a1043ee0a2, please check.

redux-object will not support lazy loading as for now. I need to think regarding a good API for such occasion.

Update: implementation details: https://github.com/yury-dymov/json-api-normalizer#lazy-loading

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a relationship between tables in Excel
Now that Excel has a built-in Data Model, VLOOKUP is obsolete. You can create a relationship between two tables of data, based on...
Read more >
How To Create Table Relationships
Find the Relationships button in the Data tab under the Data Tools section. Find the Relationships button in the Analyze tab under the...
Read more >
How to use Excel Data Model & Relationships
Relationship feature in Excel 2013 data ribbon tab · Now, go to data ribbon & click on relationships button. · Click New to...
Read more >
Data Extensions and Data Relationships without Enhanced ...
A data extension in Marketing Cloud Email Studio is a table within the application database that contains your data. You can import data...
Read more >
Questions about Relationships, the Data Model, and ...
The data is migrated without changes and you can continue to use the workbook as you did before. When you open a pre-2020.2...
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