{"componentChunkName":"component---src-components-tutorial-layout-js","path":"/tutorial/introduction/","webpackCompilationHash":"","result":{"data":{"allFile":{"group":[{"fieldValue":"Resources","nodes":[{"childMdx":{"fields":{"slug":"tutorial/entity-flow/"},"frontmatter":{"title":"Entity Flow"},"headings":[]}},{"childMdx":{"fields":{"slug":"tutorial/faq/"},"frontmatter":{"title":"FAQ"},"headings":[{"value":"How do I handle endpoints that return arrays?","depth":3}]}}]},{"fieldValue":"Tutorials","nodes":[{"childMdx":{"fields":{"slug":"tutorial/api/"},"frontmatter":{"title":"Entity Api"},"headings":[{"value":"Declaring an API","depth":2},{"value":"Sharing","depth":2},{"value":"Non prescriptive","depth":2},{"value":"Api shimming","depth":2}]}},{"childMdx":{"fields":{"slug":"tutorial/examples/"},"frontmatter":{"title":"Examples"},"headings":[{"value":"Request on Load","depth":2},{"value":"Callbacks","depth":2},{"value":"Loading Hoc","depth":2},{"value":"Parallel Requests","depth":2},{"value":"Sequential Requests","depth":2},{"value":"Caching","depth":2},{"value":"Streaming Requests","depth":2},{"value":"Take Last Request","depth":2},{"value":"Hoc Chaining","depth":2},{"value":"Composite Entities","depth":2},{"value":"Normalizing To Filter","depth":2}]}},{"childMdx":{"fields":{"slug":"tutorial/getting-started/"},"frontmatter":{"title":"Getting Started"},"headings":[{"value":"Installation","depth":2},{"value":"Setup","depth":2},{"value":"1. Schema","depth":3},{"value":"2. API","depth":3},{"value":"3. Connect to react","depth":3},{"value":"4. Make a Request","depth":3}]}},{"childMdx":{"fields":{"slug":"tutorial/introduction/"},"frontmatter":{"title":"Introduction"},"headings":[{"value":"Purpose","depth":2}]}},{"childMdx":{"fields":{"slug":"tutorial/schemas/"},"frontmatter":{"title":"Schemas"},"headings":[{"value":"Structure","depth":2},{"value":"Relationships","depth":3},{"value":"Constructing","depth":3},{"value":"Merging","depth":3},{"value":"Entities","depth":2},{"value":"Changing the idAttribute","depth":3},{"value":"Why does an entity require a structure?","depth":3}]}}]}]},"mdx":{"id":"10e6fc10-e425-5fe7-8b17-ac183987b45f","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\": \"introduction\",\n  \"title\": \"Introduction\",\n  \"group\": \"Tutorials\"\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(\"p\", null, \"Enty is a framework for managing data requested from APIs. Instead of you manually storing data,\\nEnty uses schemas to describe relationships and stores the data as normalized entities. This has\\nsome nice benefits:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Data given to views is always up to date.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"There is practically no data handling code.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Data fetching is cleanly separated from views. \"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Everything is declarative. \"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Bad relationships in data become clear.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Pairs wonderfully with graphql.\")), mdx(\"h2\", null, \"Purpose\"), mdx(\"p\", null, \"Any webapp that involves both a back and a front end will create entities.  Unique pieces of data\\nthat are known by an id.  The back end might call them models, the front end might call them\\napplication state, let's call them entities.\"), mdx(\"p\", null, \"When the client side thinks of storing these entities in terms of endpoints and stores\\n(or even actions and reducers) it's another set of hands touching the data.\\nIt allows more places for shady hacks to creep in. It allows more places for code to become brittle.\\nIt allows more places for the code to break.\"), mdx(\"p\", null, \"This endpoints and stores technique also forces the front-end to recreate\\nrelationships between entities. Storing data by type in isolated stores logically makes sense,\\nbut when a view visually combines two entities you force the front end to know how best to reconstruct\\nthis relationships. This is not an insurmountable problem but as the code base grows so will\\nthe places where the front end has to know some specific detail and so will the places where things can go wrong.\"), mdx(\"p\", null, \"In reality the front end doesn't care where the data came from or how it is stored. It just wants\\nto be able to ask for a set of them and know when its safe to render them.\"), mdx(\"p\", null, \"Enty lets you describe the relationships of your entities through schemas. It is then able to store\\nthem in a normalized state. This means that they are not stored by request but by the unique id that\\nthey were given by the back-end.\"));\n}\n;\nMDXContent.isMDXComponent = true;","fields":{"slug":"tutorial/introduction/"},"headings":[{"depth":2,"value":"Purpose"}],"frontmatter":{"title":"Introduction"}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"id":"10e6fc10-e425-5fe7-8b17-ac183987b45f"}}}