{"expireTime":9007200821600203000,"key":"gatsby-plugin-mdx-entire-payload-129402d7d9a1c04304a7d2af49667aa3-","val":{"mdast":{"type":"root","children":[{"type":"list","ordered":true,"start":1,"spread":true,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"RequestHoc.onRequest triggered","position":{"start":{"line":2,"column":6,"offset":6},"end":{"line":2,"column":36,"offset":36},"indent":[]}}],"position":{"start":{"line":2,"column":4,"offset":4},"end":{"line":2,"column":38,"offset":38},"indent":[]}},{"type":"break","position":{"start":{"line":2,"column":38,"offset":38},"end":{"line":3,"column":1,"offset":41},"indent":[1]}},{"type":"text","value":"The Enty data flow begins when a RequestHoc's onRequest is called. This either happens automatically\nbased on ","position":{"start":{"line":3,"column":1,"offset":41},"end":{"line":4,"column":10,"offset":151},"indent":[1]}},{"type":"inlineCode","value":"config.auto","position":{"start":{"line":4,"column":10,"offset":151},"end":{"line":4,"column":23,"offset":164},"indent":[]}},{"type":"text","value":" or as the result of user interaction.","position":{"start":{"line":4,"column":23,"offset":164},"end":{"line":4,"column":61,"offset":202},"indent":[]}}],"position":{"start":{"line":2,"column":4,"offset":4},"end":{"line":4,"column":61,"offset":202},"indent":[1,1]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":5,"column":1,"offset":203},"indent":[1,1,1]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"Data Request","position":{"start":{"line":6,"column":6,"offset":209},"end":{"line":6,"column":18,"offset":221},"indent":[]}}],"position":{"start":{"line":6,"column":4,"offset":207},"end":{"line":6,"column":20,"offset":223},"indent":[]}},{"type":"break","position":{"start":{"line":6,"column":20,"offset":223},"end":{"line":7,"column":1,"offset":226},"indent":[1]}},{"type":"text","value":"The result of the payloadCreator is hashed to create a responseKey. This key is what identifies this\nparticular request in state. The API function is called and the view is re rendered with a Fetching \nor Refetching requestState in the ","position":{"start":{"line":7,"column":1,"offset":226},"end":{"line":9,"column":35,"offset":462},"indent":[1,1]}},{"type":"inlineCode","value":"Message","position":{"start":{"line":9,"column":35,"offset":462},"end":{"line":9,"column":44,"offset":471},"indent":[]}},{"type":"text","value":".","position":{"start":{"line":9,"column":44,"offset":471},"end":{"line":9,"column":45,"offset":472},"indent":[]}}],"position":{"start":{"line":6,"column":4,"offset":207},"end":{"line":9,"column":45,"offset":472},"indent":[1,1,1]}}],"position":{"start":{"line":6,"column":1,"offset":204},"end":{"line":9,"column":45,"offset":472},"indent":[1,1,1]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":9,"column":45,"offset":472},"indent":[1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"If the promise resolves Enty moves on to normalizing. If the promise rejects the view is rerendered\nwith an Error requestState.","position":{"start":{"line":11,"column":1,"offset":474},"end":{"line":12,"column":28,"offset":601},"indent":[1]}}],"position":{"start":{"line":11,"column":1,"offset":474},"end":{"line":12,"column":28,"offset":601},"indent":[1]}},{"type":"list","ordered":true,"start":3,"spread":true,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"Normalize","position":{"start":{"line":14,"column":6,"offset":608},"end":{"line":14,"column":15,"offset":617},"indent":[]}}],"position":{"start":{"line":14,"column":4,"offset":606},"end":{"line":14,"column":17,"offset":619},"indent":[]}},{"type":"break","position":{"start":{"line":14,"column":17,"offset":619},"end":{"line":15,"column":1,"offset":624},"indent":[1]}},{"type":"text","value":"The successful response is passed into schema.normalize, which will in turn call schema.normalize \nrecursively on its children as defined. Entities found are collected under their schema type and the \nresult of their idAttribute function. These entities are passed through their shape \nfunction and if that entity already exists in state, the existing and new entities are passed through \nthe shapes merge function.","position":{"start":{"line":15,"column":1,"offset":624},"end":{"line":19,"column":27,"offset":1039},"indent":[1,1,1,1]}}],"position":{"start":{"line":14,"column":4,"offset":606},"end":{"line":19,"column":27,"offset":1039},"indent":[1,1,1,1,1]}}],"position":{"start":{"line":14,"column":1,"offset":603},"end":{"line":20,"column":1,"offset":1040},"indent":[1,1,1,1,1,1]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"Results & Entities Stored","position":{"start":{"line":21,"column":6,"offset":1046},"end":{"line":21,"column":31,"offset":1071},"indent":[]}}],"position":{"start":{"line":21,"column":4,"offset":1044},"end":{"line":21,"column":33,"offset":1073},"indent":[]}},{"type":"break","position":{"start":{"line":21,"column":33,"offset":1073},"end":{"line":22,"column":1,"offset":1076},"indent":[1]}},{"type":"text","value":"The collected entities are merged into state and the normalized response is stored under its repsonseKey.","position":{"start":{"line":22,"column":1,"offset":1076},"end":{"line":22,"column":106,"offset":1181},"indent":[]}}],"position":{"start":{"line":21,"column":4,"offset":1044},"end":{"line":22,"column":106,"offset":1181},"indent":[1]}}],"position":{"start":{"line":21,"column":1,"offset":1041},"end":{"line":23,"column":1,"offset":1182},"indent":[1,1]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"Views Updated","position":{"start":{"line":24,"column":6,"offset":1188},"end":{"line":24,"column":19,"offset":1201},"indent":[]}}],"position":{"start":{"line":24,"column":4,"offset":1186},"end":{"line":24,"column":21,"offset":1203},"indent":[]}},{"type":"break","position":{"start":{"line":24,"column":21,"offset":1203},"end":{"line":25,"column":1,"offset":1206},"indent":[1]}},{"type":"text","value":"The RequestHoc now uses its responseKey to select the normalized response out of state and pass\nthat through the appliction schema's denormalize function. The view is re-rendered with a Success\nrequest state and the response is now the most up to date version of the entities requested \nthrough the api.","position":{"start":{"line":25,"column":1,"offset":1206},"end":{"line":28,"column":17,"offset":1509},"indent":[1,1,1]}}],"position":{"start":{"line":24,"column":4,"offset":1186},"end":{"line":28,"column":17,"offset":1509},"indent":[1,1,1,1]}}],"position":{"start":{"line":24,"column":1,"offset":1183},"end":{"line":28,"column":17,"offset":1509},"indent":[1,1,1,1]}}],"position":{"start":{"line":14,"column":1,"offset":603},"end":{"line":28,"column":17,"offset":1509},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"export","value":"export const _frontmatter = {\"id\":\"entity-flow\",\"title\":\"Entity Flow\",\"group\":\"Resources\"}","position":{"start":{"line":35,"column":1,"offset":1516},"end":{"line":35,"column":91,"offset":1606},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":35,"column":91,"offset":1606}}},"scopeImports":["import React from 'react'"],"scopeIdentifiers":["React"],"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"id\": \"entity-flow\",\n  \"title\": \"Entity Flow\",\n  \"group\": \"Resources\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"RequestHoc.onRequest triggered\"), mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"The Enty data flow begins when a RequestHoc's onRequest is called. This either happens automatically\\nbased on \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"config.auto\"), \" or as the result of user interaction.\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Data Request\"), mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"The result of the payloadCreator is hashed to create a responseKey. This key is what identifies this\\nparticular request in state. The API function is called and the view is re rendered with a Fetching\\nor Refetching requestState in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Message\"), \".\"))), mdx(\"p\", null, \"If the promise resolves Enty moves on to normalizing. If the promise rejects the view is rerendered\\nwith an Error requestState.\"), mdx(\"ol\", {\n    \"start\": 3\n  }, mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Normalize\"), mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"The successful response is passed into schema.normalize, which will in turn call schema.normalize\\nrecursively on its children as defined. Entities found are collected under their schema type and the\\nresult of their idAttribute function. These entities are passed through their shape\\nfunction and if that entity already exists in state, the existing and new entities are passed through\\nthe shapes merge function.\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Results & Entities Stored\"), mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"The collected entities are merged into state and the normalized response is stored under its repsonseKey.\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Views Updated\"), mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"The RequestHoc now uses its responseKey to select the normalized response out of state and pass\\nthat through the appliction schema's denormalize function. The view is re-rendered with a Success\\nrequest state and the response is now the most up to date version of the entities requested\\nthrough the api.\"))));\n}\n;\nMDXContent.isMDXComponent = true;","rawMDXOutput":"/* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nexport const _frontmatter = {\n  \"id\": \"entity-flow\",\n  \"title\": \"Entity Flow\",\n  \"group\": \"Resources\"\n};\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\")\n  return <div {...props}/>\n};\n\nconst layoutProps = {\n  _frontmatter\n};\nconst MDXLayout = \"wrapper\"\nexport default function MDXContent({\n  components,\n  ...props\n}) {\n  return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n    <ol>\n      <li parentName=\"ol\">\n        <p parentName=\"li\"><strong parentName=\"p\">{`RequestHoc.onRequest triggered`}</strong><br parentName=\"p\"></br>{`\n`}{`The Enty data flow begins when a RequestHoc's onRequest is called. This either happens automatically\nbased on `}<inlineCode parentName=\"p\">{`config.auto`}</inlineCode>{` or as the result of user interaction.`}</p>\n      </li>\n      <li parentName=\"ol\">\n        <p parentName=\"li\"><strong parentName=\"p\">{`Data Request`}</strong><br parentName=\"p\"></br>{`\n`}{`The result of the payloadCreator is hashed to create a responseKey. This key is what identifies this\nparticular request in state. The API function is called and the view is re rendered with a Fetching\nor Refetching requestState in the `}<inlineCode parentName=\"p\">{`Message`}</inlineCode>{`.`}</p>\n      </li>\n    </ol>\n    <p>{`If the promise resolves Enty moves on to normalizing. If the promise rejects the view is rerendered\nwith an Error requestState.`}</p>\n    <ol {...{\n      \"start\": 3\n    }}>\n      <li parentName=\"ol\">\n        <p parentName=\"li\"><strong parentName=\"p\">{`Normalize`}</strong><br parentName=\"p\"></br>{`\n`}{`The successful response is passed into schema.normalize, which will in turn call schema.normalize\nrecursively on its children as defined. Entities found are collected under their schema type and the\nresult of their idAttribute function. These entities are passed through their shape\nfunction and if that entity already exists in state, the existing and new entities are passed through\nthe shapes merge function.`}</p>\n      </li>\n      <li parentName=\"ol\">\n        <p parentName=\"li\"><strong parentName=\"p\">{`Results & Entities Stored`}</strong><br parentName=\"p\"></br>{`\n`}{`The collected entities are merged into state and the normalized response is stored under its repsonseKey.`}</p>\n      </li>\n      <li parentName=\"ol\">\n        <p parentName=\"li\"><strong parentName=\"p\">{`Views Updated`}</strong><br parentName=\"p\"></br>{`\n`}{`The RequestHoc now uses its responseKey to select the normalized response out of state and pass\nthat through the appliction schema's denormalize function. The view is re-rendered with a Success\nrequest state and the response is now the most up to date version of the entities requested\nthrough the api.`}</p>\n      </li>\n    </ol>\n\n    </MDXLayout>;\n}\n\n;\nMDXContent.isMDXComponent = true;"}}