Skip to content
This repository was archived by the owner on Mar 20, 2022. It is now read-only.

Latest commit

 

History

History

relationships

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Dealing with Relationships

Occasionally, it is useful to have all one-to-one, one-to-many, and many-to-many relationship data on entities. Normalizr does not handle this automatically, but this example shows a simple way of adding relationship handling on a special-case basis.

Running

# from the root directory:
yarn
# from this directory:
../../node_modules/.bin/babel-node ./index.js

Files

  • index.js: Pulls live data from the GitHub API for this project's issues and normalizes the JSON.
  • input.json: The raw JSON data before normalization.
  • output.json: The normalized output.
  • schema.js: The schema used to normalize the GitHub issues.