{"@attributes":{"version":"2.0"},"channel":{"title":"DEV Community: Adron Hall","description":"The latest articles on DEV Community by Adron Hall (@adron).","link":"https:\/\/dev.to\/adron","image":{"url":"https:\/\/media2.dev.to\/dynamic\/image\/width=90,height=90,fit=cover,gravity=auto,format=auto\/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F114785%2F8539a089-f012-44b3-a596-55b7c36bd1af.jpeg","title":"DEV Community: Adron Hall","link":"https:\/\/dev.to\/adron"},"language":"en","item":[{"title":"What Would be Useful in Your GraphQL Work?","pubDate":"Wed, 09 Mar 2022 21:26:57 +0000","link":"https:\/\/dev.to\/adron\/what-would-be-useful-in-your-graphql-work-2pjc","guid":"https:\/\/dev.to\/adron\/what-would-be-useful-in-your-graphql-work-2pjc","description":"<p>If you're working on learning about GraphQL or currently building resources with GraphQL, what references would you have wanted? Does anything pop into mind?<\/p>\n\n<p>I'm putting together a curated page focused on GraphQL reference material, organizations, and products here.<\/p>\n\n<p>Would love your input. Feel free to leave a comment there on the page, or here, about what you'd like to see added to this list so that it's more useful for us all.<\/p>\n\n<p><a href=\"https:\/\/compositecode.blog\/the-expanse-of-graphql\/\">https:\/\/compositecode.blog\/the-expanse-of-graphql\/<\/a><\/p>\n\n","category":["graphql","discuss","javascript","json"]},{"title":"An Updated (per January-2022) Vuejs v3 App on Amplify, AppSync, and Cognito","pubDate":"Thu, 13 Jan 2022 06:08:48 +0000","link":"https:\/\/dev.to\/adron\/an-updated-per-january-2022-vuejs-v3-app-on-amplify-appsync-and-cognito-4555","guid":"https:\/\/dev.to\/adron\/an-updated-per-january-2022-vuejs-v3-app-on-amplify-appsync-and-cognito-4555","description":"<p>Original Post: <a href=\"https:\/\/compositecode.blog\/2022\/01\/12\/a-shiny-new-vuejs-v3-web-app-using-deployed-to-amplify-appsync-cognito\/\">https:\/\/compositecode.blog\/2022\/01\/12\/a-shiny-new-vuejs-v3-web-app-using-deployed-to-amplify-appsync-cognito\/<\/a><\/p>\n\n<p>No cruft, let's just start.<\/p>\n\n<h2>\n  \n  \n  Prerequisites\n<\/h2>\n\n<p>These details plus yarn and a few other notes are available  and derived from the <a href=\"https:\/\/docs.amplify.aws\/start\/getting-started\/installation\/q\/integration\/vue\/\">Amplify Docs located here<\/a>. What I've done is take those docs and add some specific details and information for this happy path. It includes additional references for the steps I took, and specifically what I'm running this on for this particular tutorial. As noted below, there is a section where this deviates from those steps and I get into next steps beyond the initial setup of the app, Amplify, and AppSync. I'll note that part of this tutorial, or you can navigate directly to that part with this anchor thatPartiDeviate.<\/p>\n\n<p>You'll need the following for this specific tutorial. If you're acclimate to various OSes and their respective needs around this software, you can get this sorted yourself and it's mostly the same for each OS, but for this tutorial I'm rolling with MacOS Big Sur v11.6.2.<\/p>\n\n<ul>\n<li>Your OS, as stated mine is Big Sur for this tutorial.<\/li>\n<li>\n<a href=\"https:\/\/git-scm.com\">git<\/a>. Probably any version released in the last decade will work just fine.<\/li>\n<li>\n<a href=\"https:\/\/nodejs.org\/en\/\">Node.js<\/a>. Probably anything since v14 would work great but this tutorial is written against v16.11.1. As of this writing the LTS is 16.13.1 and current is 17.3.0.<\/li>\n<li>\n<a href=\"https:\/\/v3.vuejs.org\/\">Vue.js v3<\/a>. For this tutorial I'm on a version of the v3 Preview. For the CLI a quick <code>yarn global add @vue\/cli<\/code> does the job.<\/li>\n<li>\n<a href=\"https:\/\/docs.amplify.aws\/cli\/\">Amplify CLI<\/a>.  Version for this tutorial is 7.6.5. One can NPM install it with \ud83e\udd19\ud83c\udffb <code>npm install -g @aws-amplify\/cli<\/code> or get it via cURL \ud83d\udc4d\ud83c\udffb <code>curl -sL https:\/\/aws-amplify.github.io\/amplify-cli\/install | bash &amp;&amp; $SHELL<\/code> and of course, Windows has gotta be Windowsy with \ud83d\ude11 <code>curl -sL https:\/\/aws-amplify.github.io\/amplify-cli\/install-win -o install.cmd &amp;&amp; install.cmd<\/code>.<\/li>\n<\/ul>\n\n<p>A few first steps that only need done once. If you've already setup your <code>amplify<\/code> cli then this isn't needed a second time.<\/p>\n\n<p>First, get the Vue.js v3 base app skeleton running.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>vue create mywhateverproject\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Issuing this command will then provide prompts to select Vue.js v3 Preview (or likely just v3 when fully released, which will come along with other tooling as needed). Once this is done, following the standard steps of navigating into the directory <code>cd myWhateverProejct<\/code> , then executing the <code>yarn<\/code> command and finally <code>yarn serve --open<\/code> will open up the running web app in your default browser.<\/p>\n\n<p>Next initialize the Vue.js App as an Amplify Project and get some defaults set and accepted. Executing <code>amplify init<\/code> and accepting the defaults will get this done. As displayed when done the Vue.js v3 App will now have multiple defaults and respective items selected.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--drTk0kEk--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/sszimswr505tr0bliglz.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--drTk0kEk--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/sszimswr505tr0bliglz.png\" alt=\"Amplify Init\" width=\"880\" height=\"918\"><\/a><\/p>\n\n<p>With the core Amplify folder and settings set, adding the Amplify libraries for use in user interface components is next up.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>yarn add aws-amplify @aws-amplify\/ui-components\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Now navigate into the <code>src\/main.js<\/code>  file and add the Amplify and initial configure in the code, that will do the actual initialization execution when the app launches.<\/p>\n\n<p>This is replacing this code...<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">createApp<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">vue<\/span><span class=\"dl\">'<\/span>\n<span class=\"k\">import<\/span> <span class=\"nx\">App<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/App.vue<\/span><span class=\"dl\">'<\/span>\n\n<span class=\"nx\">createApp<\/span><span class=\"p\">(<\/span><span class=\"nx\">App<\/span><span class=\"p\">).<\/span><span class=\"nx\">mount<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">#app<\/span><span class=\"dl\">'<\/span><span class=\"p\">)<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>with this code.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">createApp<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">vue<\/span><span class=\"dl\">'<\/span>\n<span class=\"k\">import<\/span> <span class=\"nx\">App<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/App.vue<\/span><span class=\"dl\">'<\/span>\n<span class=\"k\">import<\/span> <span class=\"nx\">Amplify<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">aws-amplify<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"nx\">aws_exports<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/aws-exports<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">applyPolyfills<\/span><span class=\"p\">,<\/span>\n    <span class=\"nx\">defineCustomElements<\/span><span class=\"p\">,<\/span>\n<span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">@aws-amplify\/ui-components\/loader<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"nx\">Amplify<\/span><span class=\"p\">.<\/span><span class=\"nx\">configure<\/span><span class=\"p\">(<\/span><span class=\"nx\">aws_exports<\/span><span class=\"p\">);<\/span>\n<span class=\"nx\">applyPolyfills<\/span><span class=\"p\">().<\/span><span class=\"nx\">then<\/span><span class=\"p\">(()<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">defineCustomElements<\/span><span class=\"p\">(<\/span><span class=\"nb\">window<\/span><span class=\"p\">);<\/span>\n<span class=\"p\">});<\/span>\n<span class=\"nx\">createApp<\/span><span class=\"p\">(<\/span><span class=\"nx\">App<\/span><span class=\"p\">).<\/span><span class=\"nx\">mount<\/span><span class=\"p\">(<\/span><span class=\"dl\">'<\/span><span class=\"s1\">#app<\/span><span class=\"dl\">'<\/span><span class=\"p\">)<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>This completes the steps we need for a running application. To cover full stack lets cover the back end build out and schema construction. Then after that I'll delve into thatPartiDeviate. Next up is getting the Amplify elements added.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>npm <span class=\"nb\">install <\/span>aws-amplify @aws-amplify\/ui-components\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Before even launching I went ahead and added the back end and database, GraphQL API, and related collateral.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>amplify add api\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--yezvrnXn--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/bab40fenqy6aqjen19af.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--yezvrnXn--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/bab40fenqy6aqjen19af.png\" alt=\"amplify add api\" width=\"880\" height=\"453\"><\/a><\/p>\n\n<p>Notice in the screenshot, once I selected to edit the schema now, it simply opened the file in the editor of my choice, which is Visual Studio Code for this tutorial. Since I'm executing this from the terminal in Visual Studio Code it simply opened the file in the active editor that I'm in, win win! The file that is opened by default for the schema includes the following GraphQL schema code.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"err\">#<\/span> <span class=\"nx\">This<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">input<\/span><span class=\"dl\">\"<\/span> <span class=\"nx\">configures<\/span> <span class=\"nx\">a<\/span> <span class=\"nb\">global<\/span> <span class=\"nx\">authorization<\/span> <span class=\"nx\">rule<\/span> <span class=\"nx\">to<\/span> <span class=\"nx\">enable<\/span> <span class=\"kr\">public<\/span> <span class=\"nx\">access<\/span> <span class=\"nx\">to<\/span>\n<span class=\"err\">#<\/span> <span class=\"nx\">all<\/span> <span class=\"nx\">models<\/span> <span class=\"k\">in<\/span> <span class=\"k\">this<\/span> <span class=\"nx\">schema<\/span><span class=\"p\">.<\/span> <span class=\"nx\">Learn<\/span> <span class=\"nx\">more<\/span> <span class=\"nx\">about<\/span> <span class=\"nx\">authorization<\/span> <span class=\"nx\">rules<\/span> <span class=\"nx\">here<\/span><span class=\"p\">:<\/span> <span class=\"nx\">https<\/span><span class=\"p\">:<\/span><span class=\"c1\">\/\/docs.amplify.aws\/cli\/graphql\/authorization-rules<\/span>\n\n<span class=\"nx\">input<\/span> <span class=\"nx\">AMPLIFY<\/span> <span class=\"p\">{<\/span> <span class=\"nl\">globalAuthRule<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AuthRule<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span> <span class=\"na\">allow<\/span><span class=\"p\">:<\/span> <span class=\"kr\">public<\/span> <span class=\"p\">}<\/span> <span class=\"p\">}<\/span> <span class=\"err\">#<\/span> <span class=\"nx\">FOR<\/span> <span class=\"nx\">TESTING<\/span> <span class=\"nx\">ONLY<\/span><span class=\"o\">!<\/span>\n\n<span class=\"nx\">type<\/span> <span class=\"nx\">Todo<\/span> <span class=\"p\">@<\/span><span class=\"nd\">model<\/span> <span class=\"p\">{<\/span>\n    <span class=\"na\">id<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">description<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>For now, I'll just leave the comment, the input AMPLIFY and the Todo type just as it is. It's important to note that this schema.graphql file is located at <code>app\/amplify\/backend\/schema.graphql<\/code>. I'll come back to this later in thatPartiDeviate.<\/p>\n\n<p>Next I want to push the app, api, and backend to Amplify and AppSync.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>amplify push\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Notice in the screenshot, once I selected to edit the schema now, it simply opened the file in the editor of my choice, which is Visual Studio Code for this tutorial. Since I'm executing this from the terminal in Visual Studio Code it simply opened the file in the active editor that I'm in, win win! The file that is opened by default for the schema includes the following GraphQL schema code.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"err\">#<\/span> <span class=\"nx\">This<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">input<\/span><span class=\"dl\">\"<\/span> <span class=\"nx\">configures<\/span> <span class=\"nx\">a<\/span> <span class=\"nb\">global<\/span> <span class=\"nx\">authorization<\/span> <span class=\"nx\">rule<\/span> <span class=\"nx\">to<\/span> <span class=\"nx\">enable<\/span> <span class=\"kr\">public<\/span> <span class=\"nx\">access<\/span> <span class=\"nx\">to<\/span>\n<span class=\"err\">#<\/span> <span class=\"nx\">all<\/span> <span class=\"nx\">models<\/span> <span class=\"k\">in<\/span> <span class=\"k\">this<\/span> <span class=\"nx\">schema<\/span><span class=\"p\">.<\/span> <span class=\"nx\">Learn<\/span> <span class=\"nx\">more<\/span> <span class=\"nx\">about<\/span> <span class=\"nx\">authorization<\/span> <span class=\"nx\">rules<\/span> <span class=\"nx\">here<\/span><span class=\"p\">:<\/span> <span class=\"nx\">https<\/span><span class=\"p\">:<\/span><span class=\"c1\">\/\/docs.amplify.aws\/cli\/graphql\/authorization-rules<\/span>\n\n<span class=\"nx\">input<\/span> <span class=\"nx\">AMPLIFY<\/span> <span class=\"p\">{<\/span> <span class=\"nl\">globalAuthRule<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AuthRule<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span> <span class=\"na\">allow<\/span><span class=\"p\">:<\/span> <span class=\"kr\">public<\/span> <span class=\"p\">}<\/span> <span class=\"p\">}<\/span> <span class=\"err\">#<\/span> <span class=\"nx\">FOR<\/span> <span class=\"nx\">TESTING<\/span> <span class=\"nx\">ONLY<\/span><span class=\"o\">!<\/span>\n\n<span class=\"nx\">type<\/span> <span class=\"nx\">Todo<\/span> <span class=\"p\">@<\/span><span class=\"nd\">model<\/span> <span class=\"p\">{<\/span>\n    <span class=\"na\">id<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">description<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>For now, I'll just leave the comment, the input AMPLIFY and the Todo type just as it is. It's important to note that this schema.graphql file is located at <code>app\/amplify\/backend\/schema.graphql<\/code>. I'll come back to this later in thatPartiDeviate.<\/p>\n\n<p>Next I want to push the app, api, and backend to Amplify and AppSync.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>amplify push\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>During this phase a <em>lot<\/em> of things happen. The GraphQL Schema is turned into an API and this is deployed along with the Database is deployed to DynamoDB.<\/p>\n\n<p>To get the backend shipped, i.e. deployed to AppSync, issue the <code>amplify push<\/code> command. Again, following through with the default choices. If <code>amplify console<\/code> is issued just after this a review of the API can be made.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--lr6Un2-B--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/nq17xdmnzxjje3d86frh.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--lr6Un2-B--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/nq17xdmnzxjje3d86frh.png\" alt=\"Amplify push\" width=\"880\" height=\"151\"><\/a><\/p>\n\n<p>Ok, now it's auth time. Adding that is somewhat mind boggling minimal, just <code>amplify add auth<\/code>. For this I chose <em>Default config<\/em>, then <em>Username<\/em> for the way users sign in, and then the <em>No, I am done<\/em> option followed by issuing another <code>amplify push<\/code>, confirmed that and let it go through its process.<\/p>\n\n<p>After this next steps included adding the following code to the App.vue file to get the initial interactions, security and related things into place for the todo app. Again, I feel it important to note that I'll be changing all of this later in the post here. But it's a solid way to start building an application and then looping back around after it is up and running, deployed before moving on to next steps.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"o\">&lt;<\/span><span class=\"nx\">template<\/span><span class=\"o\">&gt;<\/span>\n  <span class=\"o\">&lt;<\/span><span class=\"nx\">amplify<\/span><span class=\"o\">-<\/span><span class=\"nx\">authenticator<\/span><span class=\"o\">&gt;<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"nx\">div<\/span> <span class=\"nx\">id<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">app<\/span><span class=\"dl\">\"<\/span><span class=\"o\">&gt;<\/span>\n      <span class=\"o\">&lt;<\/span><span class=\"nx\">h1<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Todo<\/span> <span class=\"nx\">App<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/h1<\/span><span class=\"err\">&gt;\n<\/span>      <span class=\"o\">&lt;<\/span><span class=\"nx\">input<\/span> <span class=\"nx\">type<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">text<\/span><span class=\"dl\">\"<\/span> <span class=\"nx\">v<\/span><span class=\"o\">-<\/span><span class=\"nx\">model<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">name<\/span><span class=\"dl\">\"<\/span> <span class=\"nx\">placeholder<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">Todo name<\/span><span class=\"dl\">\"<\/span><span class=\"o\">&gt;<\/span>\n      <span class=\"o\">&lt;<\/span><span class=\"nx\">input<\/span> <span class=\"nx\">type<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">text<\/span><span class=\"dl\">\"<\/span> <span class=\"nx\">v<\/span><span class=\"o\">-<\/span><span class=\"nx\">model<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">description<\/span><span class=\"dl\">\"<\/span> <span class=\"nx\">placeholder<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">Todo description<\/span><span class=\"dl\">\"<\/span><span class=\"o\">&gt;<\/span>\n      <span class=\"o\">&lt;<\/span><span class=\"nx\">button<\/span> <span class=\"nx\">v<\/span><span class=\"o\">-<\/span><span class=\"nx\">on<\/span><span class=\"p\">:<\/span><span class=\"nx\">click<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">createTodo<\/span><span class=\"dl\">\"<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Create<\/span> <span class=\"nx\">Todo<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/button<\/span><span class=\"err\">&gt;\n<\/span>      <span class=\"o\">&lt;<\/span><span class=\"nx\">div<\/span> <span class=\"nx\">v<\/span><span class=\"o\">-<\/span><span class=\"k\">for<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">item in todos<\/span><span class=\"dl\">\"<\/span> <span class=\"p\">:<\/span><span class=\"nx\">key<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">item.id<\/span><span class=\"dl\">\"<\/span><span class=\"o\">&gt;<\/span>\n        <span class=\"o\">&lt;<\/span><span class=\"nx\">h3<\/span><span class=\"o\">&gt;<\/span><span class=\"p\">{{<\/span> <span class=\"nx\">item<\/span><span class=\"p\">.<\/span><span class=\"nx\">name<\/span> <span class=\"p\">}}<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/h3<\/span><span class=\"err\">&gt;\n<\/span>        <span class=\"o\">&lt;<\/span><span class=\"nx\">p<\/span><span class=\"o\">&gt;<\/span><span class=\"p\">{{<\/span> <span class=\"nx\">item<\/span><span class=\"p\">.<\/span><span class=\"nx\">description<\/span> <span class=\"p\">}}<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/p<\/span><span class=\"err\">&gt;\n<\/span>      <span class=\"o\">&lt;<\/span><span class=\"sr\">\/div<\/span><span class=\"err\">&gt;\n<\/span>    <span class=\"o\">&lt;<\/span><span class=\"sr\">\/div<\/span><span class=\"err\">&gt;\n<\/span>    <span class=\"o\">&lt;<\/span><span class=\"nx\">amplify<\/span><span class=\"o\">-<\/span><span class=\"nx\">sign<\/span><span class=\"o\">-<\/span><span class=\"nx\">out<\/span><span class=\"o\">&gt;&lt;<\/span><span class=\"sr\">\/amplify-sign-out<\/span><span class=\"err\">&gt;\n<\/span>  <span class=\"o\">&lt;<\/span><span class=\"sr\">\/amplify-authenticator<\/span><span class=\"err\">&gt;\n<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/template<\/span><span class=\"err\">&gt;\n<\/span>\n<span class=\"o\">&lt;<\/span><span class=\"nx\">script<\/span><span class=\"o\">&gt;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">API<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">aws-amplify<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">createTodo<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/graphql\/mutations<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">listTodos<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/graphql\/queries<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">onCreateTodo<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/graphql\/subscriptions<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"k\">export<\/span> <span class=\"k\">default<\/span> <span class=\"p\">{<\/span>\n  <span class=\"na\">name<\/span><span class=\"p\">:<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">App<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span>\n  <span class=\"k\">async<\/span> <span class=\"nx\">created<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n    <span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">getTodos<\/span><span class=\"p\">();<\/span>\n    <span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">subscribe<\/span><span class=\"p\">();<\/span>\n  <span class=\"p\">},<\/span>\n  <span class=\"nx\">data<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n    <span class=\"k\">return<\/span> <span class=\"p\">{<\/span>\n      <span class=\"na\">name<\/span><span class=\"p\">:<\/span> <span class=\"dl\">''<\/span><span class=\"p\">,<\/span>\n      <span class=\"na\">description<\/span><span class=\"p\">:<\/span> <span class=\"dl\">''<\/span><span class=\"p\">,<\/span>\n      <span class=\"na\">todos<\/span><span class=\"p\">:<\/span> <span class=\"p\">[]<\/span>\n    <span class=\"p\">}<\/span>\n  <span class=\"p\">},<\/span>\n  <span class=\"na\">methods<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span>\n    <span class=\"k\">async<\/span> <span class=\"nx\">createTodo<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n      <span class=\"kd\">const<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">name<\/span><span class=\"p\">,<\/span> <span class=\"nx\">description<\/span> <span class=\"p\">}<\/span> <span class=\"o\">=<\/span> <span class=\"k\">this<\/span><span class=\"p\">;<\/span>\n      <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"o\">!<\/span><span class=\"nx\">name<\/span> <span class=\"o\">||<\/span> <span class=\"o\">!<\/span><span class=\"nx\">description<\/span><span class=\"p\">)<\/span> <span class=\"k\">return<\/span><span class=\"p\">;<\/span>\n      <span class=\"kd\">const<\/span> <span class=\"nx\">todo<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">name<\/span><span class=\"p\">,<\/span> <span class=\"nx\">description<\/span> <span class=\"p\">};<\/span>\n      <span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">todos<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[...<\/span><span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">todos<\/span><span class=\"p\">,<\/span> <span class=\"nx\">todo<\/span><span class=\"p\">];<\/span>\n      <span class=\"k\">await<\/span> <span class=\"nx\">API<\/span><span class=\"p\">.<\/span><span class=\"nx\">graphql<\/span><span class=\"p\">({<\/span>\n        <span class=\"na\">query<\/span><span class=\"p\">:<\/span> <span class=\"nx\">createTodo<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">variables<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span><span class=\"na\">input<\/span><span class=\"p\">:<\/span> <span class=\"nx\">todo<\/span><span class=\"p\">},<\/span>\n      <span class=\"p\">});<\/span>\n      <span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">name<\/span> <span class=\"o\">=<\/span> <span class=\"dl\">''<\/span><span class=\"p\">;<\/span>\n      <span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">description<\/span> <span class=\"o\">=<\/span> <span class=\"dl\">''<\/span><span class=\"p\">;<\/span>\n    <span class=\"p\">},<\/span>\n    <span class=\"k\">async<\/span> <span class=\"nx\">getTodos<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n      <span class=\"kd\">const<\/span> <span class=\"nx\">todos<\/span> <span class=\"o\">=<\/span> <span class=\"k\">await<\/span> <span class=\"nx\">API<\/span><span class=\"p\">.<\/span><span class=\"nx\">graphql<\/span><span class=\"p\">({<\/span>\n        <span class=\"na\">query<\/span><span class=\"p\">:<\/span> <span class=\"nx\">listTodos<\/span>\n      <span class=\"p\">});<\/span>\n      <span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">todos<\/span> <span class=\"o\">=<\/span> <span class=\"nx\">todos<\/span><span class=\"p\">.<\/span><span class=\"nx\">data<\/span><span class=\"p\">.<\/span><span class=\"nx\">listTodos<\/span><span class=\"p\">.<\/span><span class=\"nx\">items<\/span><span class=\"p\">;<\/span>\n    <span class=\"p\">},<\/span>\n    <span class=\"nx\">subscribe<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n      <span class=\"nx\">API<\/span><span class=\"p\">.<\/span><span class=\"nx\">graphql<\/span><span class=\"p\">({<\/span> <span class=\"na\">query<\/span><span class=\"p\">:<\/span> <span class=\"nx\">onCreateTodo<\/span> <span class=\"p\">})<\/span>\n        <span class=\"p\">.<\/span><span class=\"nx\">subscribe<\/span><span class=\"p\">({<\/span>\n          <span class=\"na\">next<\/span><span class=\"p\">:<\/span> <span class=\"p\">(<\/span><span class=\"nx\">eventData<\/span><span class=\"p\">)<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">{<\/span>\n            <span class=\"kd\">let<\/span> <span class=\"nx\">todo<\/span> <span class=\"o\">=<\/span> <span class=\"nx\">eventData<\/span><span class=\"p\">.<\/span><span class=\"nx\">value<\/span><span class=\"p\">.<\/span><span class=\"nx\">data<\/span><span class=\"p\">.<\/span><span class=\"nx\">onCreateTodo<\/span><span class=\"p\">;<\/span>\n            <span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">todos<\/span><span class=\"p\">.<\/span><span class=\"nx\">some<\/span><span class=\"p\">(<\/span><span class=\"nx\">item<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"nx\">item<\/span><span class=\"p\">.<\/span><span class=\"nx\">name<\/span> <span class=\"o\">===<\/span> <span class=\"nx\">todo<\/span><span class=\"p\">.<\/span><span class=\"nx\">name<\/span><span class=\"p\">))<\/span> <span class=\"k\">return<\/span><span class=\"p\">;<\/span> <span class=\"c1\">\/\/ remove duplications<\/span>\n            <span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">todos<\/span> <span class=\"o\">=<\/span> <span class=\"p\">[...<\/span><span class=\"k\">this<\/span><span class=\"p\">.<\/span><span class=\"nx\">todos<\/span><span class=\"p\">,<\/span> <span class=\"nx\">todo<\/span><span class=\"p\">];<\/span>\n          <span class=\"p\">}<\/span>\n        <span class=\"p\">});<\/span>\n    <span class=\"p\">}<\/span>\n  <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<span class=\"o\">&lt;<\/span><span class=\"sr\">\/script<\/span><span class=\"err\">&gt;\n<\/span><\/code><\/pre>\n\n<\/div>\n\n\n\n<p>With this added now I could run <code>yarn serve<\/code> and check out the site. At this point I signed up just to have an account to use and added a todo item. Everything worked swimmingly at this point!<\/p>\n\n<p>The final step before getting into a proper deviation from this todo example involves now getting the app properly published to Amplify. This is done by executing <code>amplify add hosting<\/code>. Accept <em>Hosting with Amplify Console (Managed hosting with custom domains, Continuous deployment)<\/em> and <em>Manual deployment<\/em> when prompted. Now, finally, issue the command <code>amplify publish<\/code>.<\/p>\n\n<p>Boom, the todo app site is live!<\/p>\n\n<h2>\n  \n  \n  thatPartWhereiDeviate <a id=\"thatPartWhereiDeviate\"><\/a>\n<\/h2>\n\n<p>Now it's time to get into the nitty gritty of deviations from the easy path!<\/p>\n\n<p>New GraphQL Schema!<\/p>\n\n<p>My schema that I want to add is around building out collections for a number of data sets. The first one is a data set that I routinely talk about on a regular basis, and yes, it is indeed centered around trains! If you're uninterested in the <em>trains<\/em> part and <em>schema<\/em> and more interested in the changes skip down to the \"Deploying The Changes\" section of the post.<\/p>\n\n<p>Alright, describing the data model that I want to have and use will start with the minimal part of just having a list of railroads. This would be a list, or more specifically a table of railroads, that we can add railroads too and collect peripheral information about them. For this table I'll add the following fields, AKA columns of data to store. I would want to collect the following for a railroad:<\/p>\n\n<ol>\n<li>railroad name<\/li>\n<li>wikipedia URI<\/li>\n<li>map URI<\/li>\n<li>peripheral details of an unstructured nature<\/li>\n<li>founding year, month, and day of the railroad<\/li>\n<li>record stamp<\/li>\n<\/ol>\n\n<p>In addition, I want to keep a list of trains - specifically named trains - that each railroad operates. This data would include:<\/p>\n\n<ol>\n<li>train name<\/li>\n<li>active - yes \/ no<\/li>\n<li>peripheral details of an unstructured type<\/li>\n<li>wikipedia URI<\/li>\n<li>route map URI<\/li>\n<li>time table URI<\/li>\n<li>train URI - i.e. like a website or something that might be dedicated to the particular train.<\/li>\n<li>record stamp<\/li>\n<\/ol>\n\n<h2>\n  \n  \n  Deploying The Changes<a id=\"DeployingTheChanges\"><\/a>\n<\/h2>\n\n<p>Now it is time to deploy these additional database and schema changes. One of the easiest ways to make these changes is to use Amplify Studio, which has a great section for data modeling, which in turn puts together and ensures your schema is usable. Then it will enable you to deploy that new schema with changes to the database and the active service!<\/p>\n\n<p>Navigate to the interface from here.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--B3KN5jL---\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/dwiete9ezdc4q56crm25.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--B3KN5jL---\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/dwiete9ezdc4q56crm25.png\" alt=\"Opening Amplify Studio\" width=\"880\" height=\"366\"><\/a><\/p>\n\n<p>Once I navigated to the interface I built out the additional tables like this.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--2wYVTS0V--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/ru80ha0ou0pl1ynbfyd8.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--2wYVTS0V--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/ru80ha0ou0pl1ynbfyd8.png\" alt=\"Amplify Studio Schema Designer\" width=\"880\" height=\"647\"><\/a><\/p>\n\n<p>Then just click on <em>Save and Deploy<\/em> and then <em>Deploy<\/em> on the following modal dialog and Amplify will deploy the AppSync schema changes.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--IhbhKuIu--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/w1ply74ktoi1u55d84lu.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--IhbhKuIu--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/w1ply74ktoi1u55d84lu.png\" alt=\"Amplify Save &amp; Deploy\" width=\"880\" height=\"415\"><\/a><\/p>\n\n<p>With that deployed, in the same Amplify Studio interface I then clicked on the <em>GraphQL API<\/em> tab section and then on the <em>Resource name<\/em> for mywahteverproject to open up the AppSync Console.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--WXzlKcGt--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/6tz900gf5kb7ufp383xd.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--WXzlKcGt--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/6tz900gf5kb7ufp383xd.png\" alt=\"Image description\" width=\"880\" height=\"304\"><\/a><\/p>\n\n<p>Further down in the schema toward the bottom I can then find and confirm my types are in and ready for use. The Todo type is still there, since I didn't need to really remove it yet and it acts as a good working reference. But more importantly you can see the other types and the correlative relationship that was added via the Amplify data modeling interface.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">...<\/span><span class=\"nx\">more<\/span> <span class=\"nx\">schema<\/span>\n\n<span class=\"nx\">type<\/span> <span class=\"nx\">Todo<\/span> <span class=\"p\">@<\/span><span class=\"nd\">aws_iam<\/span>\n<span class=\"p\">@<\/span><span class=\"nd\">aws_api_key<\/span> <span class=\"p\">{<\/span>\n    <span class=\"na\">id<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">description<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\n    <span class=\"na\">_version<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">_deleted<\/span><span class=\"p\">:<\/span> <span class=\"nb\">Boolean<\/span>\n    <span class=\"na\">_lastChangedAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSTimestamp<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">createdAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSDateTime<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">updatedAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSDateTime<\/span><span class=\"o\">!<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"nx\">type<\/span> <span class=\"nx\">Train<\/span> <span class=\"p\">@<\/span><span class=\"nd\">aws_iam<\/span>\n<span class=\"p\">@<\/span><span class=\"nd\">aws_api_key<\/span> <span class=\"p\">{<\/span>\n    <span class=\"na\">id<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">train_name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">active<\/span><span class=\"p\">:<\/span> <span class=\"nb\">Boolean<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">peripheral_details<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSJSON<\/span>\n    <span class=\"na\">wikipedia_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n    <span class=\"na\">route_map_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n    <span class=\"na\">timetable_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n    <span class=\"na\">train_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSJSON<\/span>\n    <span class=\"na\">record_stamp<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSTimestamp<\/span>\n    <span class=\"na\">_version<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">_deleted<\/span><span class=\"p\">:<\/span> <span class=\"nb\">Boolean<\/span>\n    <span class=\"na\">_lastChangedAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSTimestamp<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">createdAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSDateTime<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">updatedAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSDateTime<\/span><span class=\"o\">!<\/span>\n    <span class=\"nx\">railroads<\/span><span class=\"p\">(<\/span>\n        <span class=\"na\">railroadID<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ModelIDKeyConditionInput<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">filter<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ModelRailroadTrainFilterInput<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">sortDirection<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ModelSortDirection<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">limit<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">nextToken<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\n    <span class=\"p\">):<\/span> <span class=\"nx\">ModelRailroadTrainConnection<\/span>\n        <span class=\"p\">@<\/span><span class=\"nd\">aws_iam<\/span>\n<span class=\"p\">@<\/span><span class=\"nd\">aws_api_key<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"nx\">type<\/span> <span class=\"nx\">Railroad<\/span> <span class=\"p\">@<\/span><span class=\"nd\">aws_iam<\/span>\n<span class=\"p\">@<\/span><span class=\"nd\">aws_api_key<\/span> <span class=\"p\">{<\/span>\n    <span class=\"na\">id<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">railroad<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">wikipedia_ur<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n    <span class=\"na\">map_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n    <span class=\"na\">peripheral_details<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSJSON<\/span>\n    <span class=\"na\">founding_year<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span>\n    <span class=\"na\">founding_month<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span>\n    <span class=\"na\">founding_day<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span>\n    <span class=\"na\">record_stamp<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSTimestamp<\/span>\n    <span class=\"na\">_version<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">_deleted<\/span><span class=\"p\">:<\/span> <span class=\"nb\">Boolean<\/span>\n    <span class=\"na\">_lastChangedAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSTimestamp<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">createdAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSDateTime<\/span><span class=\"o\">!<\/span>\n    <span class=\"na\">updatedAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSDateTime<\/span><span class=\"o\">!<\/span>\n    <span class=\"nx\">RailroadTrains<\/span><span class=\"p\">(<\/span>\n        <span class=\"na\">trainID<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ModelIDKeyConditionInput<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">filter<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ModelRailroadTrainFilterInput<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">sortDirection<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ModelSortDirection<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">limit<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span><span class=\"p\">,<\/span>\n        <span class=\"na\">nextToken<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\n    <span class=\"p\">):<\/span> <span class=\"nx\">ModelRailroadTrainConnection<\/span>\n        <span class=\"p\">@<\/span><span class=\"nd\">aws_iam<\/span>\n<span class=\"p\">@<\/span><span class=\"nd\">aws_api_key<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"p\">...<\/span><span class=\"nx\">more<\/span> <span class=\"nx\">schema<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>The relationship can be seen via the object connections here in the <code>ModelRailroadTrainConnection<\/code> and the keys associated.<\/p>\n\n<p>Next steps to get this updated in the local repository from these changes that were just made out of sync via the Amplify Studio interface requires two quick commands, both of which are displayed on the screen of the GraphQL interface in the studio. It's best to get the command, as it'll have the appId already included in a copypasta option on the screen, which looks like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>amplify pull <span class=\"nt\">--appId<\/span> app-id-which-is-in-studio <span class=\"nt\">--envName<\/span> dev\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Executing that will get everything updated and pull in the remote GraphQL Schema to the local schema.graphql file located in the amplify\/backend\/api\/ location. Next run this command.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>amplify update api\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>This will update everything to synchronize things, which will also prompt me for code generation so that I can have the client side code ready for use whenever I build out the user interface later.<\/p>\n\n<p>Next Up<\/p>\n\n<p>Some of the things I'll cover in the next article, as I continue this effort, is what has been done with all these steps from a project perspective. As one can see, some things might be a little confusing at this point, for example the above schema shown in AppSync, but after the synchronization if you look at the schema.graphql file locally it shows this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"nx\">type<\/span> <span class=\"nx\">Train<\/span> <span class=\"p\">@<\/span><span class=\"nd\">model<\/span> <span class=\"p\">@<\/span><span class=\"nd\">auth<\/span><span class=\"p\">(<\/span><span class=\"nx\">rules<\/span><span class=\"p\">:<\/span> <span class=\"p\">[{<\/span><span class=\"na\">allow<\/span><span class=\"p\">:<\/span> <span class=\"kr\">public<\/span><span class=\"p\">}])<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nl\">id<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">train_name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">active<\/span><span class=\"p\">:<\/span> <span class=\"nb\">Boolean<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">peripheral_details<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSJSON<\/span>\n  <span class=\"nx\">wikipedia_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n  <span class=\"nx\">route_map_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n  <span class=\"nx\">timetable_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n  <span class=\"nx\">train_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSJSON<\/span>\n  <span class=\"nx\">railroads<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"nx\">RailroadTrain<\/span><span class=\"p\">]<\/span> <span class=\"p\">@<\/span><span class=\"nd\">connection<\/span><span class=\"p\">(<\/span><span class=\"nx\">keyName<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">byTrain<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nx\">fields<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">id<\/span><span class=\"dl\">\"<\/span><span class=\"p\">])<\/span>\n  <span class=\"nx\">record_stamp<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSTimestamp<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"nx\">type<\/span> <span class=\"nx\">Railroad<\/span> <span class=\"p\">@<\/span><span class=\"nd\">model<\/span> <span class=\"p\">@<\/span><span class=\"nd\">auth<\/span><span class=\"p\">(<\/span><span class=\"nx\">rules<\/span><span class=\"p\">:<\/span> <span class=\"p\">[{<\/span><span class=\"na\">allow<\/span><span class=\"p\">:<\/span> <span class=\"kr\">public<\/span><span class=\"p\">}])<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nl\">id<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">railroad<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">wikipedia_ur<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n  <span class=\"nx\">map_uri<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSURL<\/span>\n  <span class=\"nx\">peripheral_details<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSJSON<\/span>\n  <span class=\"nx\">founding_year<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span>\n  <span class=\"nx\">founding_month<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span>\n  <span class=\"nx\">founding_day<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span>\n  <span class=\"nx\">record_stamp<\/span><span class=\"p\">:<\/span> <span class=\"nx\">AWSTimestamp<\/span>\n  <span class=\"nx\">RailroadTrains<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"nx\">RailroadTrain<\/span><span class=\"p\">]<\/span> <span class=\"p\">@<\/span><span class=\"nd\">connection<\/span><span class=\"p\">(<\/span><span class=\"nx\">keyName<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">byRailroad<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nx\">fields<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">id<\/span><span class=\"dl\">\"<\/span><span class=\"p\">])<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"nx\">type<\/span> <span class=\"nx\">Todo<\/span> <span class=\"p\">@<\/span><span class=\"nd\">model<\/span> <span class=\"p\">@<\/span><span class=\"nd\">auth<\/span><span class=\"p\">(<\/span><span class=\"nx\">rules<\/span><span class=\"p\">:<\/span> <span class=\"p\">[{<\/span><span class=\"na\">allow<\/span><span class=\"p\">:<\/span> <span class=\"kr\">public<\/span><span class=\"p\">}])<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nl\">id<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">description<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"nx\">type<\/span> <span class=\"nx\">RailroadTrain<\/span> <span class=\"p\">@<\/span><span class=\"nd\">model<\/span><span class=\"p\">(<\/span><span class=\"nx\">queries<\/span><span class=\"p\">:<\/span> <span class=\"kc\">null<\/span><span class=\"p\">)<\/span> <span class=\"p\">@<\/span><span class=\"nd\">key<\/span><span class=\"p\">(<\/span><span class=\"nx\">name<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">byRailroad<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nx\">fields<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">railroadID<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">trainID<\/span><span class=\"dl\">\"<\/span><span class=\"p\">])<\/span> <span class=\"p\">@<\/span><span class=\"nd\">key<\/span><span class=\"p\">(<\/span><span class=\"nx\">name<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">byTrain<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"nx\">fields<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">trainID<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">railroadID<\/span><span class=\"dl\">\"<\/span><span class=\"p\">])<\/span> <span class=\"p\">@<\/span><span class=\"nd\">auth<\/span><span class=\"p\">(<\/span><span class=\"nx\">rules<\/span><span class=\"p\">:<\/span> <span class=\"p\">[{<\/span><span class=\"na\">allow<\/span><span class=\"p\">:<\/span> <span class=\"kr\">public<\/span><span class=\"p\">}])<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nl\">id<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">railroadID<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">trainID<\/span><span class=\"p\">:<\/span> <span class=\"nx\">ID<\/span><span class=\"o\">!<\/span>\n  <span class=\"nx\">railroad<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Railroad<\/span><span class=\"o\">!<\/span> <span class=\"p\">@<\/span><span class=\"nd\">connection<\/span><span class=\"p\">(<\/span><span class=\"nx\">fields<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">railroadID<\/span><span class=\"dl\">\"<\/span><span class=\"p\">])<\/span>\n  <span class=\"nx\">train<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Train<\/span><span class=\"o\">!<\/span> <span class=\"p\">@<\/span><span class=\"nd\">connection<\/span><span class=\"p\">(<\/span><span class=\"nx\">fields<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">trainID<\/span><span class=\"dl\">\"<\/span><span class=\"p\">])<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Obviously this is very different than what is shown from one place to another, so I'll discuss this and other things. So subscribe (over on the right side of the blog), follow (<a class=\"mentioned-user\" href=\"https:\/\/dev.to\/adron\">@adron<\/a>), and you'll be updated on the next post when it's published.<\/p>\n\n<h2>\n  \n  \n  SITREP (Situational Report)\n<\/h2>\n\n<p>Alright, what have I wrapped up so far? Here's a bullet list of the things finished:<\/p>\n\n<ul>\n<li>Vue.js App created.<\/li>\n<li>Vue.js Form put together for todo entries.<\/li>\n<li>Authentication added with Cognito.<\/li>\n<li>An AppSync GraphQL created and published.<\/li>\n<li>Additional types added to the AppSync GraphQL API.<\/li>\n<li>Updates and code regenerated for our API.<\/li>\n<\/ul>\n\n<p>What's next to do? This is the short list, there will be after that, much more to do!<\/p>\n\n<ul>\n<li>Get the Vue.js app spified up, get some nice design put together for it, add some reasonable CSS, graphics, etc to make the interface pop. But above all, it needs to <em>feel usable<\/em> and <em>be usable<\/em>.<\/li>\n<li>Add the forms for each of the respective interfaces to manipulate the data. This could amount to lots of different things, adding navigation, routing, and other menues and the like.<\/li>\n<li>Add screens that can provide some nice reports on the data that I'm putting together. For example, it'd be nice to get a list of the actual named trains or the railroads and have their images, maps, and other respective elements shown.<\/li>\n<\/ul>\n\n<p>...and the list goes on. Until next session, enjoy your thrashing code! \ud83e\udd18\ud83c\udffb<\/p>\n\n<h3>\n  \n  \n  References\n<\/h3>\n\n<ul>\n<li><a href=\"https:\/\/docs.amplify.aws\/start\/getting-started\/data-model\/q\/integration\/vue\/\">Getting Started with Vue.js &amp; Amplify<\/a><\/li>\n<li>Official <a href=\"https:\/\/aws.amazon.com\/blogs\/mobile\/amplify-javascript-releases-support-for-vue-3\/\">blog entry on the Vue.js v3 release for Amplify<\/a> by William Lee.<\/li>\n<\/ul>\n\n","category":["javascript","vue","howto","amplify"]},{"title":"The Best Collected Details on the GraphQL Specification \u2013 Overview & Language","pubDate":"Wed, 29 Dec 2021 19:51:08 +0000","link":"https:\/\/dev.to\/adron\/the-best-collected-details-on-the-graphql-specification-overview-language-3e88","guid":"https:\/\/dev.to\/adron\/the-best-collected-details-on-the-graphql-specification-overview-language-3e88","description":"<blockquote>\n<p>Reference <a href=\"https:\/\/spec.graphql.org\">https:\/\/spec.graphql.org<\/a><\/p>\n<\/blockquote>\n\n<p>GraphQL, a query language and execution engine is described in this specification based on capabilities and requirements of data models for client-server applications. This article details and elaborates on the specification, the features and capabilities of GraphQL and implementations. I hope this collection of details around the GraphQL Specification can be used as a reference and launch point into learning about GraphQL use, implementation - server and client side - and ongoing references during future specification additions or changes!<\/p>\n\n<h2>\n  \n  \n  The Humans\n<\/h2>\n\n<p>Every aspect of languages and specifications are created with context of an end user human. The specification is a project by the <a href=\"https:\/\/www.jointdevelopment.org\">Joint Development Foundation<\/a>, with a current <a href=\"https:\/\/github.com\/graphql\/graphql-wg\">Working Group<\/a> charter that includes the IP policy governing all working group deliverables (i.e. new features, changes of spec, source code, and datasets, etc). To join the <a href=\"https:\/\/github.com\/graphql\/graphql-wg\">Working Group<\/a> there are details for <a href=\"https:\/\/github.com\/graphql\/graphql-wg\/tree\/main\/membership\">membership<\/a> and <a href=\"https:\/\/github.com\/graphql\/graphql-wg\/blob\/main\/membership\/GraphQL-Specification_Membership-2021-01-25-PREVIEW.pdf\">details in the agreement<\/a> for joining the efforts of the group.<\/p>\n\n<h2>\n  \n  \n  Licensing, Notation, Grammar, &amp; Syntax\n<\/h2>\n\n<p>Current licensing for the GraphQL Specification and related <a href=\"https:\/\/github.com\/graphql\/graphql-wg\">Working Group<\/a> deliverables fall under the <a href=\"https:\/\/www.openwebfoundation.org\/the-agreements\/the-owf-1-0-agreements-granted-claims\/owf-contributor-license-agreement-1-0-copyright-and-patent\">Open Web Foundation Agreement 1.0 Mode<\/a> (Patent and Copyright).<\/p>\n\n<p>The syntax grammar and related specifics are laid out in the document, which for this article it isn't necessary to dig through the specifics of this. The research done and collected for this article has that covered for you dear reader, however if you do dig into the specification itself I strongly suggest reading these to insure you specifically know what is represented by what.<\/p>\n\n<h2>\n  \n  \n  Description of GraphQL\n<\/h2>\n\n<p>The specification starts off with a detailed description of GraphQL. More detailed than a lot of descriptions that one would find in articles on the topic, which makes it extremely valuable for anyone who wants to really get a rich and thorough understanding of GraphQL. The first sentence of the October 2021 Edition of the specification provides a great high level definition,<\/p>\n\n<blockquote>\n<p>...a query language and execution engine originally created at Facebook in 2012 for describing the capabilities and requirements of data models for client-server applications.<\/p>\n<\/blockquote>\n\n<p>A few things outside of the spec you'll read often is, \"GraphQL is a query language similar to SQL\", which is true, but not. I've even seen descriptions like \"GraphQL is a programming language\" which is a hard no. Taking the specification description provides clarity around some of these simplified definitions that could leave one confused.<\/p>\n\n<p>GraphQL, as defined, is not a programming language and not capable of arbitrary computation. This is important to note, as many of the platforms and services that provide GraphQL APIs could lead one to think that GraphQL is providing much of the functionality in these platforms, when really it is merely the facade and presentation via API of the capabilities of the underlying systems and platforms (re: <a href=\"https:\/\/hasura.io\">Hasura<\/a>, <a href=\"https:\/\/aws.amazon.com\/appsync\/\">AppSync<\/a>, <a href=\"https:\/\/www.datastax.com\/products\/datastax-astra\">Astra<\/a>, <a href=\"https:\/\/www.mongodb.com\/atlas\">Atlas<\/a>, <a href=\"https:\/\/dgraph.io\">Dgraph<\/a>, <a href=\"https:\/\/www.contentful.com\">Contentful<\/a>, <a href=\"https:\/\/graphcms.com\/\">GraphCMS<\/a>, etc).<\/p>\n\n<p>Enough about what GraphQL isn't per the spec, what does define GraphQL? Reading the design principles behind the specification provide a much clearer idea of what GraphQL is intended to do.<\/p>\n\n<ul>\n<li>Product-centric - The idea behind GraphQL is focused on the product first. With emphasis around what the user interface, and specifically the front-end engineers, want and need for display and interaction with an application's data. Extending this it behooves one to design GraphQL APIs around data storage mechanisms that encourage this type of user interface first, and arguably even user experience first design practices. This often includes databases like Dynamo DB, Apache Cassandra, or AWS Neptune as systems that necessitate designing from the front end into the data. Where as it draws conflicts on those that try to follow tightly coupled database first design practices with systems like relational databases. However, that identified as a characteristic, note that it doesn't preclude design first practices - like GraphQL is designed for - with databases like relational databases. It just provides an avenue of conflict for those that want data first design since that is an entrenched practice with relational databases.<\/li>\n<li>Hierarchical - GraphQL is oriented toward the creation of and manipulation of hierarchical views. So much that GraphQL requests are structured as such.<\/li>\n<li>Strong-typing - Every GraphQL service defines an application-specific type system and requests are made in that context. This design principle is also why one will find regular use of TypeScript with GraphQL, specifically in the JavaScript web world. The two are matched very well to manage and extend strong-types to the systems using the GraphQL API. This also extends well, albeit with more mapping specifics needed to ensure types match. This design principle provides a solid level of type safety for GraphQL use within application development.<\/li>\n<li>Client-specified response - Based on this design pattern GraphQL provides a published capability for how clients will, or can, access the API. These requests provide field-level granularity. With that provided, the client can then provide exactly what it needs to retrieve from this field-level granularity. This particular characteristic is what gives GraphQL it's famed <\/li>\n<li>Introspective - The ability to introspect against an API and derive what is available, and in many cases derive how or what to do with what is available, is a very powerful feature of GraphQL APIs. All of the intricate power of SOA Architectures without the conflagrations of XML, SOAP, and WSDLs. Arguably, one could say that GraphQL is SOA right? Ok, getting off in the weeds here, let's keep rolling!<\/li>\n<\/ul>\n\n<h2>\n  \n  \n  Language\n<\/h2>\n\n<p>Clients accessing the GraphQL API use the GraphQL Query Language. These requests are referred to as documents. These documents can contain one of the operations available from a GraphQL API: queries, mutations, or subscription, as well as fragments that allow for various data requirements reuse.<\/p>\n\n<p>The GraphQL document follows a particular processing paradigm. First the document is converted into tokens and ignored tokens. This is done scanning left to right, repeatedly taking the next possible <em>sequence of code-points<\/em> allowed by the lexical grammar as the next token. This produces the AST (<strong>A<\/strong>bstract <strong>S<\/strong>yntax <strong>T<\/strong>ree). There are other specifics to how the document is processed, but from a usage perspective the primary paradigm of tokens, ignored tokens, and processing order are sometimes helpful to know about the processing of the GraphQL Document.<\/p>\n\n<p>So far, this covers sections 1 and the start of section 2. The other parts of section 2.x cover a wide range of what the document can use and be made of from a source text perspective, which Unicode characters, that it needs to be Unicode, can have and utilizes white space and line terminators to improve legibility, and other characteristics that can be assumed, since almost every text formatted document type in the industry uses this today.<\/p>\n\n<p>2.1.4 covers comments, which are important to note that the comment character is the <code>#<\/code> sign. 2.1.5 describes the role of insignificant commas, those that provide readability such as stylistic use of either trailing commas or line terminators as list delimiters.<\/p>\n\n<p>2.1.6 is about <strong><em>Lexical Tokens<\/em><\/strong>, where we get into one of the two key elements of the overall GraphQL document. A Lexical Token is made up of several kinds of indivisible lexical grammar. These tokens can be separated by Ignored Tokens. The Lexical Tokens consist of the following:<\/p>\n\n<p>Token ::<br>\n  Punctuator<br>\n  Name<br>\n  InValue<br>\n  FloatValue<br>\n  StringValue<\/p>\n\n<p>2.1.7 is about <strong><em>Ignored Tokens<\/em><\/strong>, the element that can be used to improve readability and separated between Lexical Tokens. Ignored Tokens are Unicode BOM, white space, line terminator, comments, or comma.<\/p>\n\n<p>Within a token, there are <strong><em>punctuators<\/em><\/strong>, made up of <em>one<\/em> the following:<\/p>\n\n<p><em>!   $   &amp;   (    )   ...    :    =   @   [   ]   {   |   }<\/em><\/p>\n\n<p>Names in 2.1.9 are defined as alphanumeric characters and the underscore. These are case-sensitive letters thus <code>word<\/code>, <code>Word<\/code>, and <code>WORD<\/code> are entirely different names.<\/p>\n\n<p>The next key element of the language are the Operations (defined in 2.3). There are three specific operations:<\/p>\n\n<ol>\n<li>query<\/li>\n<li>mutation<\/li>\n<li>subscription<\/li>\n<\/ol>\n\n<p>An example, inclusive of additional tokens would look something like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"nx\">mutation<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nx\">getThisWidget<\/span><span class=\"p\">(<\/span><span class=\"nx\">widgetId<\/span><span class=\"p\">:<\/span> <span class=\"mi\">666<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">widget<\/span> <span class=\"p\">{<\/span>\n      <span class=\"nx\">widgetValues<\/span>\n    <span class=\"p\">}<\/span>\n  <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>A special case is shorthand, provided for the query operation. In this case, if the only operation in a GraphQL Document is a query, the query operation keyword can be left out. So an example would be that this<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"nx\">query<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">widget<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">widgetValues<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>would end up looking like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n    <span class=\"nx\">widget<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">widgetValues<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>In 2.4 <strong><em>Selection Sets<\/em><\/strong> are defined as \"<em>An operation selects the set of information it needs, and will receive exactly that information and nothing more, avoiding over-fetching and under-fetching data<\/em>\" which is of course one of the key feature-sets of GraphQL. The idea of minimizing or eliminating over- or under-fetching of data is a very strong selling point! A query, for example<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n    <span class=\"nx\">id<\/span>\n    <span class=\"nx\">train<\/span>\n    <span class=\"nx\">railroad<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>would only return exactly the data shown, eliminating excess across the wire to the client. Elaborating on this, imagine the underlying table or database storing not just the id, train, and railroad, but the inception of the railroad, extra peripheral details, maybe some extra key codes, or other information. Querying all of the data would look like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>{\n    id\n    train\n    railroad\n    inceptionDate\n    details\n    peripheralDetails\n    keyCodeA\n    keyCodeB\n    keyCodeC\n    information\n}\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>This of course, would get all of the data, but pending we don't need all of that, fetching only the key fields we need with the absolute minimal amount of language syntax is a feature set, and strength of GraphQL.<\/p>\n\n<p>Each of the Selection Sets, as in the examples above, is made up of Fields (2.5 in spec). Each field is either a discrete piece of data, complex data, or relationship to other data.<\/p>\n\n<p>This example shows a discrete piece of data that is being requested.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n    <span class=\"nx\">train<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">namedTrain<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>This discrete request would return a value that would provide the named trains of the train type.<\/p>\n\n<p>Then a complex type in a query might look like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n    <span class=\"nx\">train<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">startDate<\/span> <span class=\"p\">{<\/span>\n            <span class=\"nx\">day<\/span>\n            <span class=\"nx\">month<\/span>\n            <span class=\"nx\">year<\/span>\n        <span class=\"p\">}<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Even though one could use a date field as a singular discrete piece of data, in this example startDate is a complex type with the parts of the starting date for the train type being broken out to day, month, and year.<\/p>\n\n<p>Another might have a correlative relationship that looks similar to the above discrete data example, except there are the nested values of the related element.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n    <span class=\"nx\">train<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">namedTrain<\/span>\n        <span class=\"nx\">startDate<\/span> <span class=\"p\">{<\/span>\n            <span class=\"nx\">year<\/span>\n        <span class=\"p\">}<\/span>\n        <span class=\"nx\">railroads<\/span> <span class=\"p\">{<\/span>\n            <span class=\"nx\">foundingYear<\/span>\n            <span class=\"nx\">history<\/span>\n        <span class=\"p\">}<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>In the above example, we are specifically fetching only the year of the complex type startDate, and returning the related object railroad that has correlative related values foundingYear and history.<\/p>\n\n<p>From a conceptual point of view, fields are functions that return a value. GraphQL doesn't dictate what or how that function would execute to return that value, only that the value would be returned. The underlying function would many times need an argument passed to identify the field value to return, in this case <strong><em>Arguments<\/em><\/strong> are implemented through an argument list in parenthesis attached to the field identifier.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n    <span class=\"nx\">train<\/span><span class=\"p\">(<\/span><span class=\"nx\">id<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">namedTrain<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>In this example the train retrieved has an id equal to 1, which will return a singular train with the field namedTrain returned. Let's say the train had a certain seat type that could be returned based on various parameters.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n    <span class=\"nx\">train<\/span><span class=\"p\">(<\/span><span class=\"nx\">id<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"nx\">seatClass<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">namedTrain<\/span>\n        <span class=\"nx\">seats<\/span> <span class=\"p\">{<\/span>\n            <span class=\"nx\">passengerCar<\/span>\n            <span class=\"nx\">number<\/span>\n        <span class=\"p\">}<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>The return list of seats for the train would consist of the seat and passenger car the seat is in, based on the seatClass equaling 1.<\/p>\n\n<p>Another way to build results is with the Field Alias specification (2.7). Imagine you want to return a field with a picture of the train at thumbnail size and display size.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n    <span class=\"nx\">train<\/span><span class=\"p\">(<\/span><span class=\"nx\">id<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nl\">smallTrainImage<\/span><span class=\"p\">:<\/span> <span class=\"nx\">trainPic<\/span><span class=\"p\">(<\/span><span class=\"nx\">imageType<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">thumbnail<\/span><span class=\"dl\">\"<\/span><span class=\"p\">)<\/span>\n        <span class=\"nx\">fullsizeTrainImage<\/span><span class=\"p\">:<\/span> <span class=\"nx\">trainPic<\/span><span class=\"p\">(<\/span><span class=\"nx\">imageType<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">display<\/span><span class=\"dl\">\"<\/span><span class=\"p\">)<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>This example would return the thumbnail size image, stored as field trainPic, in the smallTrainImage field alias. The fullsizeTrainImage field alias providing the return field for the trainPic that is matched to display imageType.<\/p>\n\n<p>Another example, similarly focused on the above might be providing return the types of seats that are available for a particular train divided into the 1st, 2nd, and 3rd class named as firstClass, businessClass, and coachClass seats accordingly.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n    <span class=\"nx\">train<\/span><span class=\"p\">(<\/span><span class=\"nx\">id<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">namedTrain<\/span>\n        <span class=\"nx\">firstClass<\/span><span class=\"p\">:<\/span> <span class=\"nx\">seats<\/span><span class=\"p\">(<\/span><span class=\"nx\">seatClass<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n            <span class=\"nx\">passengerCar<\/span>\n            <span class=\"nx\">number<\/span>\n        <span class=\"p\">}<\/span>\n        <span class=\"nl\">businessClass<\/span><span class=\"p\">:<\/span> <span class=\"nx\">seats<\/span><span class=\"p\">(<\/span><span class=\"nx\">seatClass<\/span><span class=\"p\">:<\/span> <span class=\"mi\">2<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n            <span class=\"nx\">passengerCar<\/span>\n            <span class=\"nx\">number<\/span>\n        <span class=\"p\">}<\/span>\n        <span class=\"nl\">coachClass<\/span><span class=\"p\">:<\/span> <span class=\"nx\">seats<\/span><span class=\"p\">(<\/span><span class=\"nx\">seatClass<\/span><span class=\"p\">:<\/span> <span class=\"mi\">3<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n            <span class=\"nx\">passengerCar<\/span>\n            <span class=\"nx\">number<\/span>\n        <span class=\"p\">}<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>The above also display the concept described in 2.8 <strong><em>Fragments<\/em><\/strong>. Fragments allo for the reuse of common repeated selects of fields, reducing duplicated text in the document.<\/p>\n\n<p>In the above this also provides further accentuation and focus to the aforementioned <em>Selection Sections<\/em> fetching specificity. Most specifically stated, providing more options to prevent needless round-trips, excess data per request, and preventing getting too little data and requiring those extra round trips. Fetching problems mitigated!<\/p>\n\n<p>A sub section of a subsection, for the language section of the specification is on <strong><em>Type Conditions<\/em><\/strong> 2.8.1 and <strong><em>Inline Fragments<\/em><\/strong> 2.8.2. Fragments must specify the type they apply to, cannot be specified on any input value, and only return values when the concrete type of the object matches the type fragment. Fragments can also be defined inline to a selection set. This conditionally includes fields at runtime based on their type.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"nx\">query<\/span> <span class=\"nx\">FragmentTyping<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">trainConsist<\/span><span class=\"p\">(<\/span><span class=\"nx\">handles<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">baggage<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">passenger<\/span><span class=\"dl\">\"<\/span><span class=\"p\">])<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">handle<\/span>\n        <span class=\"p\">...<\/span><span class=\"nx\">baggageFragment<\/span>\n        <span class=\"p\">...<\/span><span class=\"nx\">passengerFragment<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"nx\">fragment<\/span> <span class=\"nx\">baggageFragment<\/span> <span class=\"nx\">on<\/span> <span class=\"nx\">BaggageUnit<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">baggageUnits<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">count<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"nx\">fragment<\/span> <span class=\"nx\">passengerFragment<\/span> <span class=\"nx\">on<\/span> <span class=\"nx\">PassengerUnit<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">passengerUnits<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">count<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>With a result that would look like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"p\">{<\/span>\n  <span class=\"dl\">\"<\/span><span class=\"s2\">profiles<\/span><span class=\"dl\">\"<\/span><span class=\"p\">:<\/span> <span class=\"p\">[<\/span>\n    <span class=\"p\">{<\/span>\n      <span class=\"dl\">\"<\/span><span class=\"s2\">handle<\/span><span class=\"dl\">\"<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">baggage<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span>\n      <span class=\"dl\">\"<\/span><span class=\"s2\">baggageUnits<\/span><span class=\"dl\">\"<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">count<\/span><span class=\"dl\">\"<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span> <span class=\"p\">}<\/span>\n    <span class=\"p\">},<\/span>\n    <span class=\"p\">{<\/span>\n      <span class=\"dl\">\"<\/span><span class=\"s2\">handle<\/span><span class=\"dl\">\"<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">passenger<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span>\n      <span class=\"dl\">\"<\/span><span class=\"s2\">passengerUnits<\/span><span class=\"dl\">\"<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">count<\/span><span class=\"dl\">\"<\/span><span class=\"p\">:<\/span> <span class=\"mi\">11<\/span> <span class=\"p\">}<\/span>\n    <span class=\"p\">}<\/span>\n  <span class=\"p\">]<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Something similar could be done with inline fragments too. Additionally Inline Fragments can be used to apply a directive too. More on that and this later!<\/p>\n\n<p><strong><em>Input Values<\/em><\/strong>, starting in section 2.9 have a number of sub section defining the characteristic and features of Input Values. Field and directive argument accept input values with literal primitives. Input Values can include scalars, enumeration values, lists, or input objects. Another ability of Input Values is to define them as variables. For each of these there are numerous semantic details. The following breakdown are the specific core details of note for the values.<\/p>\n\n<ul>\n<li>2.9.1 Int Value - This value is specified as a decimal point or exponent, no leading zero, and can be negative.<\/li>\n<li>2.9.2 Float Value - Floats include either a decimal point or exponent or both can be negative, and no leading zero.<\/li>\n<li>2.9.3 Boolean Value - Simple, either <em>true<\/em> or <em>false<\/em>.<\/li>\n<li>2.9.4 String Value - Strings are sequences of characters wrapped in quotation marks (i.e. \"This is a string value that is a sentence.\"). There can also be block strings, across multiple lines using three quotes to start and end on the line before and after the string text. As shown here\n\n```\"\"\"\nThe text goes here just after the starting quotes.<\/li>\n<\/ul>\n\n<p>then some more text.<\/p>\n\n<p>last line... then followed by the three quotes.<br>\n\"\"\"```<br>\n<br>\n. <\/p>\n\n<ul>\n<li>2.9.5 Null Value - <code>null<\/code> which is kind of nuff' said. Sometimes, just like in databases, I'm not entirely sure how I feel about null being included in so many things.<\/li>\n<li>2.9.6 Enum Value - These values are represented as unquoted names, and recommended to be all caps.<\/li>\n<li>2.9.7 List Value - Wrapped by square-brackets (i.e. brackets vs. braces) [ ]. Commas are optional for separation and readability. Both [1, 2, 3] and [1 2 3] are the same.<\/li>\n<li>2.9.8 Input Object Value - These are unordered lists wrapped in curly-braces (i.e. braces, vs brackets) { }. These are referred to as object literals and might look like <code>{ name: Benjamin }<\/code> or <code>{ price: 4.39 }<\/code>.<\/li>\n<\/ul>\n\n<p>Variables for Input Values are for parameterized for reuse. An example would look like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"nx\">query<\/span> <span class=\"nx\">getTrainsList<\/span><span class=\"p\">(<\/span><span class=\"nx\">$inceptionYear<\/span><span class=\"p\">:<\/span> <span class=\"nx\">Int<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nx\">train<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nx\">id<\/span>\n        <span class=\"nx\">namedTrain<\/span>\n        <span class=\"nx\">details<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p><strong><em>Type references<\/em><\/strong> (2.11) are types of data used for arguments and variables, can be lists of another input type, or non-null variant of any other input type.<\/p>\n\n<p>Even though 2.12 is a minimal section in the specification, it's a hugely powerful feature that is used extensively in various GraphQL services options, which is <strong><em>Directives<\/em><\/strong>. Directives provide a way to define runtime execution and type validation behavior in a GraphQL document that is different than specification based behaviors. Directives have a name with arguments listed of whichever input types. They can also describe additional information for types, fields, fragments, and operations. New configuration options for example could be setup via Directives.<\/p>\n\n<p>Note Directive order is significant. For example these two examples could have difference resolutions:<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"nx\">type<\/span> <span class=\"nx\">Freight<\/span>\n    <span class=\"p\">@<\/span><span class=\"nd\">addFreight<\/span><span class=\"p\">(<\/span><span class=\"nx\">source<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">farmSystems<\/span><span class=\"dl\">\"<\/span><span class=\"p\">)<\/span>\n    <span class=\"p\">@<\/span><span class=\"nd\">excludeFreight<\/span><span class=\"p\">(<\/span><span class=\"nx\">source<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">toxicities<\/span><span class=\"dl\">\"<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nl\">name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"nx\">type<\/span> <span class=\"nx\">Freight<\/span>\n    <span class=\"p\">@<\/span><span class=\"nd\">excludeFreight<\/span><span class=\"p\">(<\/span><span class=\"nx\">source<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">toxicities<\/span><span class=\"dl\">\"<\/span><span class=\"p\">)<\/span> \n    <span class=\"p\">@<\/span><span class=\"nd\">addFreight<\/span><span class=\"p\">(<\/span><span class=\"nx\">source<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">lightCars<\/span><span class=\"dl\">\"<\/span><span class=\"p\">){<\/span>\n    <span class=\"nl\">name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>That wraps up GraphQL section 1 and 2, covering the core language. Next up is the type system, schema, and related topics in section 3 of the specification. Notes coming soon!7<\/p>\n\n","category":["graphql","javascript","programming"]},{"title":"AWS Amplify Release, GraphQL, and Recent Curated Links","pubDate":"Wed, 24 Nov 2021 20:38:44 +0000","link":"https:\/\/dev.to\/adron\/aws-amplify-release-graphql-and-recent-curated-links-3o3o","guid":"https:\/\/dev.to\/adron\/aws-amplify-release-graphql-and-recent-curated-links-3o3o","description":"<p>This release kicked off this week in time for <a href=\"https:\/\/reinvent.awsevents.com\/\">re:Invent<\/a> and I put together a quick write up. Any questions, feel free to ping me via my contact form or better yet, just pop a question at me via the Twitters <a href=\"https:\/\/twitter.com\/adron\">@Adron<\/a>.<\/p>\n\n<h2>\n  \n  \n  Authenticator\n<\/h2>\n\n<p><a href=\"https:\/\/ui.docs.amplify.aws\/components\/authenticator\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--pHMw4PZ2--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/tvd0iaxbddqbm9zj4qmp.jpg\" alt=\"Image description\" width=\"680\" height=\"345\"><\/a><\/p>\n\n<p><a href=\"https:\/\/ui.docs.amplify.aws\/components\/authenticator\">Docs here<\/a><\/p>\n\n<p>The new authenticator is a component that adds a full authentication flow for your app with coordinated boilerplate. This covers vue.js, angular, and react frameworks. The component has a customizable UI (as you'd expect), includes social logins for Google, Facebook, Apple, and Amazon. The initial setup is zero-configuration, and does have password manager support, along with show\/hide confirm password forms.<\/p>\n\n<p>The zero configuration works based on your Amplify CLI setup. To use this component grab the latest version of Amplify 6.4.0.<\/p>\n\n<p>npm<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>npm <span class=\"nb\">install<\/span> <span class=\"nt\">-g<\/span> @aws-amplify\/cli@latest\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>yarn<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>yarn global add @aws-amplify\/cli@latest\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Once that runs it will update your aws-exports.js with the latest backend configuration for the Authenticator. So, zero configuration <em>you<\/em> have to add, but there's configuration back there if you need to or want to dig in.<\/p>\n\n<p>There is then an initial state for the component that sets a user up for sign in, sign up, or resetting their password. You might start with some code to get the component in your page like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">export<\/span> <span class=\"k\">default<\/span> <span class=\"kd\">function<\/span> <span class=\"nx\">App<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n  <span class=\"k\">return<\/span> <span class=\"p\">(<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"nx\">Authenticator<\/span><span class=\"o\">&gt;<\/span>\n      <span class=\"p\">{({<\/span> <span class=\"nx\">signOut<\/span><span class=\"p\">,<\/span> <span class=\"nx\">user<\/span> <span class=\"p\">})<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">(<\/span>\n        <span class=\"o\">&lt;<\/span><span class=\"nx\">main<\/span><span class=\"o\">&gt;<\/span>\n          <span class=\"o\">&lt;<\/span><span class=\"nx\">h1<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Hello<\/span> <span class=\"p\">{<\/span><span class=\"nx\">user<\/span><span class=\"p\">.<\/span><span class=\"nx\">username<\/span><span class=\"p\">}<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/h1<\/span><span class=\"err\">&gt;\n<\/span>          <span class=\"o\">&lt;<\/span><span class=\"nx\">button<\/span> <span class=\"nx\">onClick<\/span><span class=\"o\">=<\/span><span class=\"p\">{<\/span><span class=\"nx\">signOut<\/span><span class=\"p\">}<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Sign<\/span> <span class=\"nx\">out<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/button<\/span><span class=\"err\">&gt;\n<\/span>        <span class=\"o\">&lt;<\/span><span class=\"sr\">\/main<\/span><span class=\"err\">&gt;\n<\/span>      <span class=\"p\">)}<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"sr\">\/Authenticator<\/span><span class=\"err\">&gt;\n<\/span>  <span class=\"p\">);<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Then to set the initial state add the following parameter.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">export<\/span> <span class=\"k\">default<\/span> <span class=\"kd\">function<\/span> <span class=\"nx\">App<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n  <span class=\"k\">return<\/span> <span class=\"p\">(<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"nx\">Authenticator<\/span> <span class=\"nx\">initialState<\/span><span class=\"o\">=<\/span><span class=\"dl\">\"<\/span><span class=\"s2\">signUp<\/span><span class=\"dl\">\"<\/span><span class=\"o\">&gt;<\/span>\n      <span class=\"p\">{({<\/span> <span class=\"nx\">signOut<\/span><span class=\"p\">,<\/span> <span class=\"nx\">user<\/span> <span class=\"p\">})<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">(<\/span>\n        <span class=\"o\">&lt;<\/span><span class=\"nx\">main<\/span><span class=\"o\">&gt;<\/span>\n          <span class=\"o\">&lt;<\/span><span class=\"nx\">h1<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Hello<\/span> <span class=\"p\">{<\/span><span class=\"nx\">user<\/span><span class=\"p\">.<\/span><span class=\"nx\">username<\/span><span class=\"p\">}<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/h1<\/span><span class=\"err\">&gt;\n<\/span>          <span class=\"o\">&lt;<\/span><span class=\"nx\">button<\/span> <span class=\"nx\">onClick<\/span><span class=\"o\">=<\/span><span class=\"p\">{<\/span><span class=\"nx\">signOut<\/span><span class=\"p\">}<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Sign<\/span> <span class=\"nx\">out<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/button<\/span><span class=\"err\">&gt;\n<\/span>        <span class=\"o\">&lt;<\/span><span class=\"sr\">\/main<\/span><span class=\"err\">&gt;\n<\/span>      <span class=\"p\">)}<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"sr\">\/Authenticator<\/span><span class=\"err\">&gt;\n<\/span>  <span class=\"p\">);<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Setting many of the other options to your needs includes adding additional parameters to the Authenticator component like;<\/p>\n\n<p>Social providers<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">export<\/span> <span class=\"k\">default<\/span> <span class=\"kd\">function<\/span> <span class=\"nx\">App<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n  <span class=\"k\">return<\/span> <span class=\"p\">(<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"nx\">Authenticator<\/span> <span class=\"nx\">socialProviders<\/span><span class=\"o\">=<\/span><span class=\"p\">{[<\/span><span class=\"dl\">'<\/span><span class=\"s1\">amazon<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">apple<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">facebook<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">google<\/span><span class=\"dl\">'<\/span><span class=\"p\">]}<\/span><span class=\"o\">&gt;<\/span>\n      <span class=\"p\">{({<\/span> <span class=\"nx\">signOut<\/span><span class=\"p\">,<\/span> <span class=\"nx\">user<\/span> <span class=\"p\">})<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">(<\/span>\n        <span class=\"o\">&lt;<\/span><span class=\"nx\">main<\/span><span class=\"o\">&gt;<\/span>\n          <span class=\"o\">&lt;<\/span><span class=\"nx\">h1<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Hello<\/span> <span class=\"p\">{<\/span><span class=\"nx\">user<\/span><span class=\"p\">.<\/span><span class=\"nx\">username<\/span><span class=\"p\">}<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/h1<\/span><span class=\"err\">&gt;\n<\/span>          <span class=\"o\">&lt;<\/span><span class=\"nx\">button<\/span> <span class=\"nx\">onClick<\/span><span class=\"o\">=<\/span><span class=\"p\">{<\/span><span class=\"nx\">signOut<\/span><span class=\"p\">}<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Sign<\/span> <span class=\"nx\">out<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/button<\/span><span class=\"err\">&gt;\n<\/span>        <span class=\"o\">&lt;<\/span><span class=\"sr\">\/main<\/span><span class=\"err\">&gt;\n<\/span>      <span class=\"p\">)}<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"sr\">\/Authenticator<\/span><span class=\"err\">&gt;\n<\/span>  <span class=\"p\">);<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Sign up attributes<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">export<\/span> <span class=\"k\">default<\/span> <span class=\"kd\">function<\/span> <span class=\"nx\">App<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n  <span class=\"k\">return<\/span> <span class=\"p\">(<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"nx\">Authenticator<\/span> <span class=\"nx\">signUpAttributes<\/span><span class=\"o\">=<\/span><span class=\"p\">{[]}<\/span><span class=\"o\">&gt;<\/span>\n      <span class=\"p\">{({<\/span> <span class=\"nx\">signOut<\/span><span class=\"p\">,<\/span> <span class=\"nx\">user<\/span> <span class=\"p\">})<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">(<\/span>\n        <span class=\"o\">&lt;<\/span><span class=\"nx\">main<\/span><span class=\"o\">&gt;<\/span>\n          <span class=\"o\">&lt;<\/span><span class=\"nx\">h1<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Hello<\/span> <span class=\"p\">{<\/span><span class=\"nx\">user<\/span><span class=\"p\">.<\/span><span class=\"nx\">username<\/span><span class=\"p\">}<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/h1<\/span><span class=\"err\">&gt;\n<\/span>          <span class=\"o\">&lt;<\/span><span class=\"nx\">button<\/span> <span class=\"nx\">onClick<\/span><span class=\"o\">=<\/span><span class=\"p\">{<\/span><span class=\"nx\">signOut<\/span><span class=\"p\">}<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Sign<\/span> <span class=\"nx\">out<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/button<\/span><span class=\"err\">&gt;\n<\/span>        <span class=\"o\">&lt;<\/span><span class=\"sr\">\/main<\/span><span class=\"err\">&gt;\n<\/span>      <span class=\"p\">)}<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"sr\">\/Authenticator<\/span><span class=\"err\">&gt;\n<\/span>  <span class=\"p\">);<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Login mechanisms<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">export<\/span> <span class=\"k\">default<\/span> <span class=\"kd\">function<\/span> <span class=\"nx\">App<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n  <span class=\"k\">return<\/span> <span class=\"p\">(<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"nx\">Authenticator<\/span> <span class=\"nx\">loginMechanisms<\/span><span class=\"o\">=<\/span><span class=\"p\">{[<\/span><span class=\"dl\">'<\/span><span class=\"s1\">username<\/span><span class=\"dl\">'<\/span><span class=\"p\">]}<\/span><span class=\"o\">&gt;<\/span>\n      <span class=\"p\">{({<\/span> <span class=\"nx\">signOut<\/span><span class=\"p\">,<\/span> <span class=\"nx\">user<\/span> <span class=\"p\">})<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">(<\/span>\n        <span class=\"o\">&lt;<\/span><span class=\"nx\">main<\/span><span class=\"o\">&gt;<\/span>\n          <span class=\"o\">&lt;<\/span><span class=\"nx\">h1<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Hello<\/span> <span class=\"p\">{<\/span><span class=\"nx\">user<\/span><span class=\"p\">.<\/span><span class=\"nx\">username<\/span><span class=\"p\">}<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/h1<\/span><span class=\"err\">&gt;\n<\/span>          <span class=\"o\">&lt;<\/span><span class=\"nx\">button<\/span> <span class=\"nx\">onClick<\/span><span class=\"o\">=<\/span><span class=\"p\">{<\/span><span class=\"nx\">signOut<\/span><span class=\"p\">}<\/span><span class=\"o\">&gt;<\/span><span class=\"nx\">Sign<\/span> <span class=\"nx\">out<\/span><span class=\"o\">&lt;<\/span><span class=\"sr\">\/button<\/span><span class=\"err\">&gt;\n<\/span>        <span class=\"o\">&lt;<\/span><span class=\"sr\">\/main<\/span><span class=\"err\">&gt;\n<\/span>      <span class=\"p\">)}<\/span>\n    <span class=\"o\">&lt;<\/span><span class=\"sr\">\/Authenticator<\/span><span class=\"err\">&gt;\n<\/span>  <span class=\"p\">);<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>There are lots of other features too, give the <a href=\"https:\/\/ui.docs.amplify.aws\/components\/authenticator\">docs<\/a> a quick read for the full details. For more details on the overall authentication worflow check out these <a href=\"https:\/\/docs.amplify.aws\/lib\/auth\/getting-started\/q\/platform\/js\/\">docs<\/a>.<\/p>\n\n<h2>\n  \n  \n  In-App Messaging\n<\/h2>\n\n<p><a href=\"https:\/\/docs.amplify.aws\/lib\/in-app-messaging\/getting-started\/q\/platform\/js\/\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--aHEPiB0J--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/ketnw6zlwcabtdih3cjo.jpg\" alt=\"Image description\" width=\"880\" height=\"400\"><\/a><\/p>\n\n<p>This library is, sadly for my vue.js app, only available for react native. A quick install will get you started.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>npm <span class=\"nb\">install<\/span> <span class=\"nt\">-E<\/span> aws-amplify@in-app-messaging aws-amplify-react-native@in-app-messaging amazon-cognito-identity-js @react-native-community\/netinfo @react-native-async-storage\/async-storage @react-native-picker\/picker react-native-get-random-values react-native-url-polyfill\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Then install pod dependencies for iOS.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code>pod <span class=\"nb\">install<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>An example looks like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">import<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">react-native-get-random-values<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">react-native-url-polyfill\/auto<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">AppRegistry<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">react-native<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"nx\">App<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/App<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">name<\/span> <span class=\"k\">as<\/span> <span class=\"nx\">appName<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/app.json<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"nx\">AppRegistry<\/span><span class=\"p\">.<\/span><span class=\"nx\">registerComponent<\/span><span class=\"p\">(<\/span><span class=\"nx\">appName<\/span><span class=\"p\">,<\/span> <span class=\"p\">()<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"nx\">App<\/span><span class=\"p\">);<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Then import the awsconfig vis aws.exports.js.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight javascript\"><code><span class=\"k\">import<\/span> <span class=\"nx\">Amplify<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">aws-amplify<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"nx\">awsconfig<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/src\/aws-exports<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"nx\">Amplify<\/span><span class=\"p\">.<\/span><span class=\"nx\">configure<\/span><span class=\"p\">(<\/span><span class=\"nx\">awsconfig<\/span><span class=\"p\">);<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>Then integrate the Amplify React Native UI component if your app's root component.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight jsx\"><code><span class=\"k\">import<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nx\">InAppMessagingProvider<\/span><span class=\"p\">,<\/span>\n  <span class=\"nx\">InAppMessageDisplay<\/span>\n<span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">aws-amplify-react-native<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"kd\">const<\/span> <span class=\"nx\">App<\/span> <span class=\"o\">=<\/span> <span class=\"p\">()<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">(<\/span>\n  <span class=\"p\">&lt;<\/span><span class=\"nc\">InAppMessagingProvider<\/span><span class=\"p\">&gt;<\/span>\n    <span class=\"si\">{<\/span><span class=\"cm\">\/* Your application *\/<\/span><span class=\"si\">}<\/span>\n    <span class=\"p\">&lt;<\/span><span class=\"nc\">InAppMessageDisplay<\/span> <span class=\"p\">\/&gt;<\/span>\n  <span class=\"p\">&lt;\/<\/span><span class=\"nc\">InAppMessagingProvider<\/span><span class=\"p\">&gt;<\/span>\n<span class=\"p\">);<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>re: from the docs, here's an app.jsx example.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight jsx\"><code><span class=\"k\">import<\/span> <span class=\"nx\">React<\/span><span class=\"p\">,<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">useEffect<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">react<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">SafeAreaView<\/span><span class=\"p\">,<\/span> <span class=\"nx\">Button<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">react-native<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">Analytics<\/span><span class=\"p\">,<\/span> <span class=\"nx\">Notifications<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">aws-amplify<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">import<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nx\">InAppMessagingProvider<\/span><span class=\"p\">,<\/span>\n  <span class=\"nx\">InAppMessageDisplay<\/span>\n<span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">aws-amplify-react-native<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"kd\">const<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">InAppMessaging<\/span> <span class=\"p\">}<\/span> <span class=\"o\">=<\/span> <span class=\"nx\">Notifications<\/span><span class=\"p\">;<\/span>\n\n<span class=\"c1\">\/\/ To display your in-app message, make sure this event name matches one you created<\/span>\n<span class=\"c1\">\/\/ in an In-App Messaging campaign!<\/span>\n<span class=\"kd\">const<\/span> <span class=\"nx\">myFirstEvent<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span> <span class=\"na\">name<\/span><span class=\"p\">:<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">my_first_event<\/span><span class=\"dl\">'<\/span> <span class=\"p\">};<\/span>\n\n<span class=\"kd\">const<\/span> <span class=\"nx\">App<\/span> <span class=\"o\">=<\/span> <span class=\"p\">()<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">{<\/span>\n  <span class=\"nx\">useEffect<\/span><span class=\"p\">(()<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">{<\/span>\n    <span class=\"c1\">\/\/ Messages from your campaigns need to be synced from the backend before they<\/span>\n    <span class=\"c1\">\/\/ can be displayed. You can trigger this anywhere in your app. Here we are<\/span>\n    <span class=\"c1\">\/\/ syncing just once when this component (your app) renders for the first time.<\/span>\n    <span class=\"nx\">InAppMessaging<\/span><span class=\"p\">.<\/span><span class=\"nx\">syncMessages<\/span><span class=\"p\">();<\/span>\n  <span class=\"p\">},<\/span> <span class=\"p\">[]);<\/span>\n\n  <span class=\"k\">return<\/span> <span class=\"p\">(<\/span>\n    <span class=\"p\">&lt;<\/span><span class=\"nc\">SafeAreaView<\/span><span class=\"p\">&gt;<\/span>\n      <span class=\"p\">&lt;<\/span><span class=\"nc\">InAppMessagingProvider<\/span><span class=\"p\">&gt;<\/span>\n        <span class=\"si\">{<\/span><span class=\"cm\">\/* This button has an example of an analytics event triggering the in-app message. *\/<\/span><span class=\"si\">}<\/span>\n        <span class=\"p\">&lt;<\/span><span class=\"nc\">Button<\/span>\n          <span class=\"na\">onPress<\/span><span class=\"p\">=<\/span><span class=\"si\">{<\/span><span class=\"p\">()<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">{<\/span>\n            <span class=\"nx\">Analytics<\/span><span class=\"p\">.<\/span><span class=\"nx\">record<\/span><span class=\"p\">(<\/span><span class=\"nx\">myFirstEvent<\/span><span class=\"p\">);<\/span>\n          <span class=\"p\">}<\/span><span class=\"si\">}<\/span>\n          <span class=\"na\">title<\/span><span class=\"p\">=<\/span><span class=\"s\">\"Record Analytics Event\"<\/span>\n        <span class=\"p\">\/&gt;<\/span>\n\n        <span class=\"si\">{<\/span><span class=\"cm\">\/* This button has an example of an In-app Messaging event triggering the in-app message.*\/<\/span><span class=\"si\">}<\/span>\n        <span class=\"p\">&lt;<\/span><span class=\"nc\">Button<\/span>\n          <span class=\"na\">onPress<\/span><span class=\"p\">=<\/span><span class=\"si\">{<\/span><span class=\"p\">()<\/span> <span class=\"o\">=&gt;<\/span> <span class=\"p\">{<\/span>\n            <span class=\"nx\">InAppMessaging<\/span><span class=\"p\">.<\/span><span class=\"nx\">dispatchEvent<\/span><span class=\"p\">(<\/span><span class=\"nx\">myFirstEvent<\/span><span class=\"p\">);<\/span>\n          <span class=\"p\">}<\/span><span class=\"si\">}<\/span>\n          <span class=\"na\">title<\/span><span class=\"p\">=<\/span><span class=\"s\">\"Send In-App Messaging Event\"<\/span>\n        <span class=\"p\">\/&gt;<\/span>\n\n        <span class=\"p\">&lt;<\/span><span class=\"nc\">InAppMessageDisplay<\/span> <span class=\"p\">\/&gt;<\/span>\n      <span class=\"p\">&lt;\/<\/span><span class=\"nc\">InAppMessagingProvider<\/span><span class=\"p\">&gt;<\/span>\n    <span class=\"p\">&lt;\/<\/span><span class=\"nc\">SafeAreaView<\/span><span class=\"p\">&gt;<\/span>\n  <span class=\"p\">);<\/span>\n<span class=\"p\">};<\/span>\n\n<span class=\"k\">export<\/span> <span class=\"k\">default<\/span> <span class=\"nx\">App<\/span><span class=\"p\">;<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--8FmFdqng--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/nzpv06ng338hjyxmespx.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--8FmFdqng--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/nzpv06ng338hjyxmespx.png\" alt=\"Image description\" width=\"820\" height=\"741\"><\/a><\/p>\n\n<h2>\n  \n  \n  Custom Resources w\/ AWS CDK or Cloudformation\n<\/h2>\n\n<p>Ren\u00e9 (<a href=\"https:\/\/twitter.com\/renebrandel\">@renebrandel<\/a>) wrote a blog post on extending the Amplify backend with custom AWS resources using AWS CDK or CloudFormation. The post is avilable <a href=\"https:\/\/aws.amazon.com\/blogs\/mobile\/extend-amplify-backend-with-custom-aws-resource-using-aws-cdk-or-cloudformation\/\">here<\/a> but I'll give you a quick summary.<\/p>\n\n<p>The new CLI comand <code>amplify add custom<\/code> will get almost any of the AWS services added to an Amplify backend. The core tech here is backed with <a href=\"https:\/\/docs.aws.amazon.com\/cdk\/index.html\">AWS Cloud Development Kit<\/a> (<a href=\"https:\/\/docs.aws.amazon.com\/cdk\/index.html\">CDK<\/a>) or <a href=\"https:\/\/docs.aws.amazon.com\/cloudformation\/index.html\">CloudFormation<\/a>. For example if you want to pull in <a href=\"https:\/\/docs.aws.amazon.com\/sns\/index.html\">AWS SNS<\/a> as custom resource, this is a very quick and concise way to do just that.<\/p>\n\n<p>Again, check out <a href=\"https:\/\/aws.amazon.com\/blogs\/mobile\/extend-amplify-backend-with-custom-aws-resource-using-aws-cdk-or-cloudformation\/\">Ren\u00e9's post<\/a> to really get into it and check out some of the possibilities.<\/p>\n\n<h2>\n  \n  \n  Overriding Amplify Backend Resources with CDK\n<\/h2>\n\n<p>Amplify sets up various capabilities out of the box in many situations such as project-level IAM roles, Cognito Auth, or S3 resources. As with the previous section, this one I'll keep short as Ren\u00e9 (<a href=\"https:\/\/twitter.com\/renebrandel\">@renebrandel<\/a>) has wrote a great blog post about this capability too titled \"<a href=\"https:\/\/aws.amazon.com\/blogs\/mobile\/override-amplify-generated-backend-resources-using-cdk\/\">Override Amplify-generated backend resources using CDK<\/a>\". If you're interesting in nixing (overriding) any of these features and using another choice, this is your go to.<\/p>\n\n<h2>\n  \n  \n  Prototype a Fullstack App without an AWS Account\n<\/h2>\n\n<p>Not specifically related to the release, this capability that <a href=\"https:\/\/twitter.com\/codebeast\/\">Christian Nwamba AKA Codebeast<\/a> wrote up in a <a href=\"https:\/\/dev.to\/codebeast\/prototype-fullstack-apps-with-zero-account-setup-using-aws-amplify-5872\">blog post<\/a> will show you how to do just that. The docs focused around what he details in the post are avilable <a href=\"https:\/\/docs.amplify.aws\/console\/adminui\/start\/\">here<\/a>.<\/p>\n\n<h2>\n  \n  \n  GraphQL Transformer v2\n<\/h2>\n\n<p>This I saved for last, it's in my wheelhouse after all. Some of the features of the new v2 drop include; deny-by-default auth, lambda authorizor, customizable pipeline resolvers, and OpenSearch aggregations and use-scoped queries. The accomplished blogger, as mentioned in this very blog post, blogging legend <a href=\"https:\/\/twitter.com\/renebrandel\">Ren\u00e9<\/a> continues with \"<a href=\"https:\/\/aws.amazon.com\/blogs\/mobile\/aws-amplify-announces-the-new-graphql-transformer-v2-more-feature-rich-flexible-and-extensible\/\">AWS Amplify announces the new GraphQL Transformer v2. More feature-rich, flexible, and extensible.<\/a>\".<\/p>\n\n<p>The first thing Ren\u00e9 brings up in the post is more explicit data modeling. I've stolen two of the screen shots from that post as examples and motivation to click through and check out the post. But I'll also elaborate.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--sbI3kHh3--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/erod6gcf6ykarjfcxqix.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--sbI3kHh3--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/erod6gcf6ykarjfcxqix.png\" alt=\"Image description\" width=\"880\" height=\"508\"><\/a><\/p>\n\n<p>With the new explicit data modeling options, we've got @primaryKey and <a class=\"mentioned-user\" href=\"https:\/\/dev.to\/index\">@index<\/a>\n added as directoves to configure primary and secondary indexes from schema for your Dynamo Database. The directives in AppSync GraphQL really makes for a powerful schema definition capability to push via code first or to map from database to GraphQL scehma.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--gVNYuffC--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/z4stm8ca511sjj80iges.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--gVNYuffC--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/z4stm8ca511sjj80iges.png\" alt=\"Image description\" width=\"849\" height=\"440\"><\/a><\/p>\n\n<p>The other part that is hugely important is the ability in schema to draw relationships that add referential integrity to your schema and the inherent data. There are now <code>@hasOne<\/code>, <code>@hasMany<\/code>, <code>@belongsTo<\/code>, and <code>@manyToMany<\/code> directives. I'm really looking forward to some data schema and modeling build outs in the near future. I'll be sure to put together some tutorials and content detailing some of the design considerations and where and how to get all the schema hacks working best for your particular app data builds.<\/p>\n\n<h2>\n  \n  \n  Thanks &amp; Curated Follows\n<\/h2>\n\n<p>That's it for this post. I'm always endeavoring to bring interesting tech and blog about it, but another way to get the quickest updates, links, details, and information about these releases is to follow the following people in the <a href=\"https:\/\/twitter.com\">Twittersphere<\/a>. They're all in the cohort I run with at AWS with the Amplify team. I owe thanks to each for helping me find the following information and details included in this blog entry.<\/p>\n\n<ul>\n<li><a href=\"https:\/\/twitter.com\/renebrandel\">Ren\u00e9 Brandel<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/codebeast\">Christian Nwamba<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/_pananapread\">Anna M. Pfoertsch<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/TreTuna\">Tre Tuna<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/AbdallahSh07\">Abdallah Shaban<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/mtliendo\">Michael Liendo<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/ErikCH\">Erik Hanchett<\/a><\/li>\n<\/ul>\n\n","category":["javascript","aws","programming","graphql"]},{"title":"I Joined AWS, It's Surreal, and Why","pubDate":"Thu, 18 Nov 2021 18:13:55 +0000","link":"https:\/\/dev.to\/adron\/i-joined-aws-its-surreal-and-why-3pao","guid":"https:\/\/dev.to\/adron\/i-joined-aws-its-surreal-and-why-3pao","description":"<p><em>TLDR I joined Amazon Web Services on the 11th of October - i.e. AWS - and it rocks.<\/em><\/p>\n\n<p>When you join Amazon you are signing up to learn a lot of things about the company and the ways in which the company gets things done. Before I get into all that, I'm going to tell you a bit about my career and what led me to Amazon. After all, it is surreal and unexpected  for many that know me that I'm here. This relationship has definitely been a 2-way story, and one where it finally fit in a mutually beneficial way.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--U8sXbRyC--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/vj524mvjchaqx3r5rrhq.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--U8sXbRyC--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/vj524mvjchaqx3r5rrhq.png\" alt=\"Image description\" width=\"699\" height=\"189\"><\/a><\/p>\n\n<h2>\n  \n  \n  My First Years in Tech\n<\/h2>\n\n<p>Years ago, I jumped into the nascent tech industry from the state of Mississippi, where I grew up. Mississippi is quintessentially one of the most regressive, least advanced, disadvantaged, poor, and poorly run states in the entire United States. For most Mississippians life starts rough and continues that way throughout. However there are shining little slivers where tech lives and thrives in the state, and I lucked out in a massive way by cutting my teeth at <a href=\"https:\/\/www.nasa.gov\/centers\/stennis\/home\/index.html\">Stennis Space Center<\/a> (yes, a part of <a href=\"https:\/\/www.nasa.gov\/\">NASA<\/a>).<\/p>\n\n<p>When I got into tech I had no high school diploma and no college. I would eventually attend college but I couldn't attend yet as I was only 13. I fumbled my way into some coding by taking a programming class. The class used the \"Basic\" programming language taught by a smart and creative woman that did well to keep the attention of a moderately bored \"metal head\" 13 year old.<\/p>\n\n<p>Just a few years later I picked up a C++ book, because one didn't have the internet to just google their way into learning a new language. That was quickly followed by learning Visual Basic 4, which landed me an opportunity to build a video rental tracking application. I got paid too, a massive $300 bucks! In the next several years I ended up getting into networking, systems administration, more programming and scripting and doing work for doctor's offices, hospitals, trucking dispatches, junk yards, and a number of other businesses.<\/p>\n\n<p>I loved the independence this life I'd gotten into gave me. Eventually college came up and I attended some courses, mostly about music and music theory more than programming. But out of a desire to learn faster and cover more topics I left college to advance in the industry.<\/p>\n\n<p>Fast forward over that following decade and I tore into a plethora of technologies, started working for some giant companies like Bank of America, Citigroup, and Fidelity with hundreds of thousands of people, Government agencies, and some smaller startup like companies.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--wu1SaBlx--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/l4yow3d9grrt4hy0k64i.jpg\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--wu1SaBlx--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/l4yow3d9grrt4hy0k64i.jpg\" alt=\"Image description\" width=\"336\" height=\"499\"><\/a><\/p>\n\n<p>Through all of this experience, and traumatic <a href=\"https:\/\/www.amazon.com\/Mythical-Man-Month-Software-Engineering-Anniversary\/dp\/0201835959\/ref=pd_lpo_1?pd_rd_i=0201835959&amp;psc=1\">death march<\/a> styled work, I came to two decisions that have shaped my career for many years and benefited me in a very significant way.<\/p>\n\n<ol>\n<li>I was going to cease working for the Government, after years of consulting and related work with the Federal and States Governments I just couldn't take the lack of control, inability to really effect change, and the general laggard nature of the work. I promised myself I'd stop working in this sector entirely. At this point in my life, I've held 100% to that promise, it's been a rewarding and very effective decision.<\/li>\n<li>I decided I would, likely, stay away from big corporations and also <em>likely<\/em> stick primarily to small (i.e. SMBs) that allowed me the most impact within an organization. <em>If<\/em> I were to shift back to a large corporate entity it would have to be with some type of rogue group or segmented team within that organization that fell outside of the general organization itself. So far only one team fit that mold, at Home Depot, but outside of that group I've stayed my course and stuck to small business, SMBs, and startups.<\/li>\n<\/ol>\n\n<h2>\n  \n  \n  Hello Amazon Web Services\n<\/h2>\n\n<blockquote>\n<p>\"Every day is Day 1.\"\u200a-\u200aCorporate Training, but coined per Jeff Bezos<\/p>\n<\/blockquote>\n\n<p>This line in the embarkation of working at AWS stuck out. Which is saying something, because when you join AWS there's about ~80-120 hours of training videos and culture related content to consume for the coder, techie, project, product, and leader related type of work.<\/p>\n\n<p>It stuck out because, really, in very real terms this is day 1 of a new career direction for me. I've shifted and mutated my 2nd declaration above, in a significant way. I've joined AWS to work with the Amplify, AppSync, and surrounding teams to move forward work in GraphQL, data, flows related to, and projects and services around that <em>data<\/em> space. I'm stoked, but I didn't join just because of the tech.<\/p>\n\n<h3>\n  \n  \n  Why AWS?\n<\/h3>\n\n<p>Why join AWS? Even though I'd promised myself not to join anymore big corp companies I got to a point and looked at several of the big companies because I wanted more scope. What I mean by scope is the range of topics, tech, and people that I could work with on a daily basis that were involved in a wide space instead of just a singular narrow space. Startups and small business, by their very nature, work in a singular and narrow space. I still had intent and wanted to work with GraphQL and tech immediately tangential to GraphQL, but I wanted more access, more range, and options to expand the interactions of the tech and expand into access to interactions with people in the industry. So I began a search that eventually led me to join AWS.<\/p>\n\n<p>That search started with several companies, including AWS. I was looking for several key characteristics that would dictate where I landed.<\/p>\n\n<ol>\n<li>Involvement in the space, specifically the open source space I wanted to work in. That included several key technologies, depending on what matched best, I'd go that direction: Kubernetes, GraphQL, and general open source development (like Github, etc). This made the options basically Google, Microsoft, AWS, or Facebook!<\/li>\n<li>What company would trigger the least ethical dilemmas for me. Yes, this was indeed part of the criteria I was looking at and discussing. Facebook was already on the shit list considering their political meanderings and inability to fix them. I also just wasn't sure considering the conflation between actions vs. words. Google was in a moderately ok space, as was AWS, and Microsoft has been doing pretty good on the ethical front as of late. There's always some questions about things, but I basically wanted to make sure I wasn't working on things directly helping to cage kids or bomb other countries that are in the stone age back to the stone age!<\/li>\n<li>What company has culture (i.e. specifically good behaviors around meetings, people, etc) that I would appreciate and would work well for me. I'm a rather disciplined, driven, yet ADHD afflicted soul so sometimes, a company's culture can destroy me or burn me out at 10x the rate of others. I want to join an effort and stick around for some time to really drive home some impact!<\/li>\n<li>How would the team I'm on and teams of people I'd work with, mesh with me. Obviously they'd interview me but I am more than aware, and 100% interview them at the same time. Interviews are absolutely a 2-way relationship and I, as with the last decade plus of my career, have chosen only to work with teams of people that I know are top tier, diverse, open minded, and have a good heart in their efforts.<\/li>\n<\/ol>\n\n<h3>\n  \n  \n  How It Came Together\n<\/h3>\n\n<p>I started my search with the premise that I wanted to gain the above four characteristics in which company I joined. I had the privilege and due diligence to choose the company that I could gain all of these, not just a one or a couple of these characteristics. I won't focus on the companies that didn't make the cut or why, but I will elaborate on why AWS, and Amazon in general, did indeed make the cut.<\/p>\n\n<ul>\n<li>Leadership principles: One of the things Amazon as a company lives and dies by is the <a href=\"https:\/\/www.amazon.jobs\/en\/principles\">leadership principles<\/a>. There are a whole host of folks that like to complain, denigrate, nit pick, and come up with reasons why these are bad, but I'll just cut that off with - when intent is good - they're all awesome. Full stop. To break down each and personally elaborate:\n\n<ul>\n<li>\n<em>Customer Obsession<\/em>: yeah, I literally do this work with a priority on who will use it. It's one of the reasons I focus on minimizing ethical concerns. It then insures that I too can truly be invested in supporting my customers in their efforts. Check.<\/li>\n<li>\n<em>Ownership<\/em>: I already live by this principle, not just in work life, but personal as well! It's something I staunchly believe in. Long term over short term, take accountability, act on behalf of not only yourself but others. Step up, there's a lot that needs to be done in this world! Check.<\/li>\n<li>\n<em>Invent and Simplify<\/em>: The mantra I've basically lived my whole programming career by. If I can't build things to work myself out of work, and I can't find a better way to do something after doing it for a while, I've started to fail at what I'm doing. I work in this field to make things easier, better, and more resilient for the users' of the things I build and help others build. Check.<\/li>\n<li>\n<em>Are Right, A Lot<\/em>: Nuff' said.<\/li>\n<li>\n<em>Learn and Be Curious<\/em>: Just scroll through and read the posts on this blog, follow me <a href=\"https:\/\/twitter.com\/adron\">@Adron<\/a> or streaming <a href=\"https:\/\/twitch.tv\/thrashingcode\">@ThrashingCode<\/a>. You know I'm all about this. Check.<\/li>\n<li>\n<em>Hire and Develop the Best<\/em>: Well, I haven't hired anybody <em>yet<\/em> at AWS, but I've hired a lot of people in my career so far. I don't hire you if you won't or can't be the best, thus, if I ever do hire you, you can rest well knowing I vouched for you and know you can kick ass and take names!  \ud83e\udd18\ud83c\udffb <\/li>\n<li>\n<em>Insist on the Highest Standards<\/em>: We can talk about the pedantic nature of this leadership principle in the future and joke about tablets later. Check.<\/li>\n<li>\n<em>Think Big<\/em>: Always. Check.<\/li>\n<li>\n<em>Bias for Action<\/em>: People's lives continue today because of my bias for action. If you know me, you''ll understand this comment. If not, feel free to ask, I've just summarized it with this statement for this post. Check.<\/li>\n<li>\n<em>Frugality<\/em>: At work, yup. At home, no comment. Albeit I would own a plane or launch rockets in a frugal way too if I had the financial resources. Check.<\/li>\n<li>\n<em>Earn Trust<\/em>: I'm always working to earn trust among those I trust and respect. I hope we all are, it's a remarkably good way to live. Check.<\/li>\n<li>\n<em>Dive Deep<\/em>: I'm on it. Check.<\/li>\n<li>\n<em>Have Backbone; Disagree and Commit<\/em>. Thanks brutally, caustic, and toxic southern upbringing, and thanks west coast for helping me tone that down to an effective level of having backbone, disagreeing and committing in life. Check.<\/li>\n<li>\n<em>Deliver Results<\/em>: I'll admit, this one I'm a little afraid to ask why it even needs to be listed. Check.<\/li>\n<li>\n<em>Strive to be Earth's Best Employer<\/em> and <em>Success and Scale Bring Broad Responsibility<\/em>: I'll do my part but I'll leave these as is for today. There's work to be done! Check.<\/li>\n<\/ul>\n\n\n<\/li>\n<li>The team and members on the periphery of that team checked all the boxes, were friendly, easy to converse with, and are top tier people in this industry! During my initial loop I got to speak with and meet, and I highly recommend following each of these people if you don't already and are interested in the work we're doing:\n\n<ul>\n<li>Bill Fine -&gt; <a href=\"https:\/\/twitter.com\/billfine\">@billfine<\/a>\n<\/li>\n<li>Brice Pell\u00e9 -&gt; <a href=\"https:\/\/twitter.com\/bricepelle\">@bricepelle<\/a>\n<\/li>\n<li>Ed Lima -&gt; <a href=\"https:\/\/twitter.com\/ednergizer\">@ednergizer<\/a>\n<\/li>\n<li>Robert Zhu -&gt; <a href=\"https:\/\/twitter.com\/rbzhu\">@rbzhu<\/a>\n<\/li>\n<li>Ali Spittell -&gt; <a href=\"https:\/\/twitter.com\/ASpittel\">@ASpittel<\/a>\n<\/li>\n<li>Mohit Srivastava -&gt; <a href=\"https:\/\/twitter.com\/mohit\">@mohit<\/a>\n<\/li>\n<li>I also met and spoke with <a href=\"https:\/\/www.linkedin.com\/in\/aleksej-trefilov-0a3a875\/\">Aleksej Trefilov<\/a> and <a href=\"https:\/\/www.linkedin.com\/in\/benjamin-snellings-a42b2b41\/\">Ben Snellings<\/a>, but we can't discuss all the cool secret thigns they're working on, so I'll just leave it at - awesome to meet them, if you get a chance to work with them sign up!<\/li>\n<li>Big shout out too to Adam Desai and Mashayla too! Adam is the recruiter that I worked with and got all of the loops lined up, and Mashayla joined in to make sure everything got coordinated and scheduled! Great experience and good workflow y'all have!<\/li>\n<\/ul>\n\n\n<\/li>\n<li>Around the culture aspect, as I spoke to the team and others in the immediate teams I dove into a number of culture questions. One of the things that summarizes the drive and energy at AWS is the principled and organized nature of meetings starting with a document read - everybody reads the document - then the meeting resumes around discussion of the document, the details, data, and the participants take actions based on that. It's a very effective way to run meetings. Beyond that however, the general readiness of the team, the approach and interactions of everybody involved, was excellent. The conversations during the interview, the tests and challenges, all were great fun and I got a lot of information (and I got the job, so I suspect I provide good information!) and enjoyed the interactions. I got a solid feeling we'd mesh well. Another criteria, check!<\/li>\n<\/ul>\n\n<p>Now all of this didn't go off without a hitch, because of certain things I got to do a second short loop and my role switched from Developer Advocate DA to Product Manager Technical. This worked out very well however, as no I'm positioned to have impact from work as a developer advocate <em>and<\/em> product management efforts.<\/p>\n\n<p>There were other competing offers from Google, Microsoft, and other companies I interviewed with at the same time. In the end though the responsiveness, effective flexibility from the team and Adam led to AWS coming out the winner. With everything wrapped up and questions answered, all criteria met, I gave AWS and the team a solid <strong><em>YES<\/em><\/strong>!<\/p>\n\n<p>With that I've joined AWS! Ready for new challenges and bringing a simpler, faster, more usable <a href=\"https:\/\/twitter.com\/AWSAmplify\">Amplify<\/a>, <a href=\"https:\/\/aws.amazon.com\/appsync\/\">AppSync<\/a>, and Cloud environs to every coder out there! Let's do this! \ud83e\udd18\ud83c\udffb<\/p>\n\n"},{"title":"My Bespoke JetBrains Toolbox Configuration","pubDate":"Fri, 29 Oct 2021 20:49:46 +0000","link":"https:\/\/dev.to\/adron\/my-bespoke-jetbrains-toolbox-configuration-3d0n","guid":"https:\/\/dev.to\/adron\/my-bespoke-jetbrains-toolbox-configuration-3d0n","description":"<h1>\n  \n  \n  JetBrains Toolbox Configuration\n<\/h1>\n\n<p>One thing I do just enough to remember I need to do, but not frequently enough to remember which settings are which, is installing the JetBrains Toolbox app to get the other JetBrains' software installed.<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--uLC77LiX--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/ia2a5anop18qnh2x1rk5.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--uLC77LiX--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/ia2a5anop18qnh2x1rk5.png\" alt=\"JetBrains Toolbox\" width=\"440\" height=\"701\"><\/a><\/p>\n\n<p>The following is the quick list of the key things that I setup to get the most out of Toolbox. This is a quick process and I've detailed it here, one for memory, but also to detail what some of the features provide so this might be of more use to others.<\/p>\n\n<p>The Toolbox <em>Settings<\/em> options are located by clicking on the gear icon when the application is opened up. This is the same across operating systems; Windows, Ubuntu, MacOS, or others. Find the gear, click it!<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--tiVNaagc--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/j1tczy2lp0tmlcj4hej4.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--tiVNaagc--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/j1tczy2lp0tmlcj4hej4.png\" alt=\"JetBrains Toolbox\" width=\"438\" height=\"698\"><\/a><\/p>\n\n<p>Once <em>Settings<\/em> are opened up the core 4 configurations include:<\/p>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--qDICpQo3--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/xxcodh22db06m30saejw.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--qDICpQo3--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/xxcodh22db06m30saejw.png\" alt=\"JetBrains Toolbox\" width=\"441\" height=\"699\"><\/a><\/p>\n\n<ol>\n<li>If you've got an account, login. Everything is easier if you're logged into your account.<\/li>\n<li>This second option around the theme is great on MacOS and Ubuntu. I'm not sure what it does on Windows exactly, but presume a similar effect. I myself set this to <em>Auto<\/em> since I always set the OS level theme to dark and love that almost all the apps that I use shift to that theme.<\/li>\n<\/ol>\n\n<p><a href=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--GyHmXNJw--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/p5p49wc33gmfz65fn5kd.png\" class=\"article-body-image-wrapper\"><img src=\"https:\/\/res.cloudinary.com\/practicaldev\/image\/fetch\/s--GyHmXNJw--\/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880\/https:\/\/dev-to-uploads.s3.amazonaws.com\/uploads\/articles\/p5p49wc33gmfz65fn5kd.png\" alt=\"JetBrains Toolbox\" width=\"441\" height=\"702\"><\/a><\/p>\n\n<ol>\n<li>I don't set a shortcut for the toolbox, I simply use the Ctrl+Space to launch it from the spotlight on MacOS and use whatever option to issue apps from command on Windows and Linux OS installations of Toolbox.<\/li>\n<li>This section, I'll detail further down, has a host of additional settings around the tools use itself.<\/li>\n<\/ol>\n\n<p>I'd have put the rest of the article here, but the image upload is bothersome. Thus I posted the full article on my blog <a href=\"https:\/\/compositecode.blog\/\">Composite Code<\/a>, <a href=\"https:\/\/compositecode.blog\/2021\/10\/29\/jetbrains-toolbox-configuration\/\">here<\/a>.<\/p>\n\n","category":["development","programming","tutorials","productivity"]},{"title":"Creating a Go Module & Writing Tests in Less Than 3 Minutes","pubDate":"Mon, 20 Sep 2021 20:54:28 +0000","link":"https:\/\/dev.to\/adron\/creating-a-go-module-writing-tests-in-less-than-3-minutes-4c45","guid":"https:\/\/dev.to\/adron\/creating-a-go-module-writing-tests-in-less-than-3-minutes-4c45","description":"<p>In this short (less than 4 minutes) video I put together a Go module library, then setup some first initial tests calling against functions in the module.<\/p>\n\n<p><iframe width=\"710\" height=\"399\" src=\"https:\/\/www.youtube.com\/embed\/Qs7vHHQPv18\">\n<\/iframe>\n<\/p>\n\n<p>NOTE: For each of these time points listed below, if you navigate to the video on YouTube, the time points are easier to naviagte to since YouTube creates clickable time points! \ud83d\udc4d\ud83c\udffb<\/p>\n\n<p>00:12 - Writing unit tests. \ud83d\udcdd<br>\n00:24 - Create the first go file.<br>\n00:40 - Creating the Go go.mod file. When creating the go.mode file, note the command is <code>go mod init [repopath]<\/code> where repopath is the actual URI to the repo. The go.mod file that is generated would look like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight go\"><code><span class=\"n\">module<\/span> <span class=\"n\">github<\/span><span class=\"o\">.<\/span><span class=\"n\">com<\/span><span class=\"o\">\/<\/span><span class=\"n\">adron<\/span><span class=\"o\">\/<\/span><span class=\"n\">awesomeLib<\/span>\n\n<span class=\"k\">go<\/span> <span class=\"m\">1.13<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>00:56 - <a href=\"https:\/\/blog.jetbrains.com\/go\/2020\/02\/26\/working-with-go-modules-getting-started\/\">Enabling Go mod integration<\/a> for Goland IDE. This dialog has an option to turn off the proxy or go direct to repo bypassing the proxy. For more details on the Go proxy, check out <a href=\"https:\/\/goproxy.io\/\">goproxy.io<\/a> and the <a href=\"https:\/\/blog.golang.org\/using-go-modules\">Go docs for more details<\/a>.<br>\n01:09 - Instead of TDD, first I cover a simple function implementation. Note the casing is very important in setting up a test in Go. The test function needs to be public, thus capitalized, and the function needs accessible, thus also capitalized. The function in the awesomeLib.go file, just to have a function that would return some value, looks like this.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight go\"><code><span class=\"k\">package<\/span> <span class=\"n\">awesomeLib<\/span>\n\n<span class=\"k\">func<\/span> <span class=\"n\">GetKnownResult<\/span><span class=\"p\">()<\/span> <span class=\"kt\">string<\/span> <span class=\"p\">{<\/span>\n    <span class=\"k\">return<\/span> <span class=\"s\">\"known\"<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>01:30 - Creating the test file, awesomeLib_test.go, then creating the test. In this I also show some of the features of the Goland IDE that extracts and offers the function names of a module prefaced with Test and other naming that provides they perform a test, performance, or related testing functionality.<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight go\"><code><span class=\"k\">package<\/span> <span class=\"n\">awesomeLib<\/span>\n\n<span class=\"k\">import<\/span> <span class=\"s\">\"testing\"<\/span>\n\n<span class=\"k\">func<\/span> <span class=\"n\">TestGetKnownResult<\/span><span class=\"p\">(<\/span><span class=\"n\">t<\/span> <span class=\"o\">*<\/span><span class=\"n\">testing<\/span><span class=\"o\">.<\/span><span class=\"n\">T<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n    <span class=\"n\">got<\/span> <span class=\"o\">:=<\/span> <span class=\"n\">GetKnownResult<\/span><span class=\"p\">()<\/span>\n    <span class=\"k\">if<\/span> <span class=\"n\">got<\/span> <span class=\"o\">!=<\/span> <span class=\"s\">\"known\"<\/span> <span class=\"p\">{<\/span>\n        <span class=\"n\">t<\/span><span class=\"o\">.<\/span><span class=\"n\">Error<\/span><span class=\"p\">(<\/span><span class=\"s\">\"Known result not received, test failed.\"<\/span><span class=\"p\">)<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>02:26 - Running the standard <code>go test<\/code> to execute the test. To run tests for all files within this module, such as if we've added multiple directories and other files, would be <code>go test .\/...<\/code>.<br>\n02:36 - Using Goland to run the tests with singular or multiple tests being executed. With Goland there are other capabilities to show test coverage, what percentage of functionality is covered by tests, and other various code metrics around testing, performance, and other telemetry.<\/p>\n\n<p>That's it, now the project is ready for elaboration and is setup for a TDD, BDD, or implement and test style approach to development.<\/p>\n\n<p>For JavaScript, Go, Python, Terraform, and more infrastructure, web dev, and coding in general I stream regularly on Twitch at <a href=\"https:\/\/twitch.tv\/adronhall\">https:\/\/twitch.tv\/adronhall<\/a>, post the VOD's to YouTube along with entirely new tech and <em>metal<\/em> content at <a href=\"https:\/\/youtube.com\/c\/ThrashingCode\">https:\/\/youtube.com\/c\/ThrashingCode<\/a>.<\/p>\n\n<p>For more blogging, I've got <a href=\"https:\/\/compositecode.blog\">https:\/\/compositecode.blog<\/a> and the <a href=\"https:\/\/compositecode.blog\/thrashing-composite-code-newsletter\/\">Thrashing Code Newsletter<\/a>, sign up for it <a href=\"https:\/\/compositecode.blog\/thrashing-composite-code-newsletter\/\">here<\/a>!<\/p>\n\n","category":["go","tutorial","testing","showdev"]},{"title":"Top 5 Ways to get the coding basics down!","pubDate":"Mon, 20 Sep 2021 20:51:49 +0000","link":"https:\/\/dev.to\/adron\/top-5-ways-to-get-the-coding-basics-down-g7f","guid":"https:\/\/dev.to\/adron\/top-5-ways-to-get-the-coding-basics-down-g7f","description":"<p>Another question came up during a recent Twitch stream that I wanted to elaborate on.<\/p>\n\n<blockquote>\n<p>How to get the basics down?<\/p>\n<\/blockquote>\n\n<p>I elaborated in the video, check it out too.<\/p>\n\n<ol>\n<li>Get a physical book to have an order to learning a language. If not a book, at least a set course of material to step through a little bit at a time. Then take a small part of the book and work through what it shows, but elaborate yourself on it. An example: Cover the first chapter on a new language, learn the data types and then actually sit down and write out some code and get them to print out, take some input that is converted form one type to another, and other exercises. Make them up yourself. This ingrains the specifics in one's mind to be able to quickly write them out in the future while you're coding.<\/li>\n<li>As I stated in the video, along with other details (watch the video for the details) write something that will import and data and export data from text files. Change the format of the data being written and read in those text files. Then do it again with something else, switching back and forth between something like XML, JSON, or some other format. This will familiarize one with data manipulations that are so often needed but also just the syntax and control structures of a language.<\/li>\n<li>Choose a library or two to pull in as a dependency and work with that library. An example might be a library that generates random data. Or another example might be a library that simplifies HTTP verb actions or routes for URL's. There are many out there for any language and its respective stack. This helps increase familiarity with available libraries, but also how they're structured and how you might structure libraries. In addition, you'll get a better understanding of the dependency requirements of any particular language stack.<\/li>\n<li>Choose some of the intricate parts or features of a particular language you're working with and try it out. But don't stop there, elaborate on the particular example you build. For example, try out C#'s anonymous function and see what you can do with them. How do they or don't they connect to an object? In Go you might try out Go Routines and get familiar with communication between routines. C++ you may try out pointers and try to come up with some tricky ways to do things with pointers.<\/li>\n<li>Choose a domain and find data about it, and then display that data either to standard out or some other way. Maybe display that data on a web page. But find something you're interested in, or might be interested in, gather some data around it and import that data into a database or into the application you're building itself and parse it, print it out, and work through variations on doing this.<\/li>\n<\/ol>\n\n<p><iframe width=\"710\" height=\"399\" src=\"https:\/\/www.youtube.com\/embed\/unJVv9gnosg\">\n<\/iframe>\n<\/p>\n\n<p>For JavaScript, Go, Python, Terraform, and more infrastructure, web dev, and coding in general I stream regularly on Twitch at <a href=\"https:\/\/twitch.tv\/adronhall\">https:\/\/twitch.tv\/adronhall<\/a>, post the VOD's to YouTube along with entirely new tech and <em>metal<\/em> content at <a href=\"https:\/\/youtube.com\/c\/ThrashingCode\">https:\/\/youtube.com\/c\/ThrashingCode<\/a>.<\/p>\n\n<p>For more blogging, I've got <a href=\"https:\/\/compositecode.blog\">https:\/\/compositecode.blog<\/a> and the <a href=\"https:\/\/compositecode.blog\/thrashing-composite-code-newsletter\/\">Thrashing Code Newsletter<\/a>, sign up for it <a href=\"https:\/\/compositecode.blog\/thrashing-composite-code-newsletter\/\">here<\/a>!<\/p>\n\n","category":["beginners","introduction","programming","practice"]},{"title":"Looking for Code Organization Advice","pubDate":"Wed, 28 Jul 2021 17:02:34 +0000","link":"https:\/\/dev.to\/adron\/looking-for-code-organization-advice-2hh4","guid":"https:\/\/dev.to\/adron\/looking-for-code-organization-advice-2hh4","description":"<p>A few questions regarding how you organize your code base:<\/p>\n\n<ul>\n<li>How do you like to organize your JavaScript, TypeScript, or GraphQL code base?<\/li>\n<li>Have you written, or know of a post or documentation that details how you like to organize you JavaScript, GraphQL, and\/or TypeScript?<\/li>\n<\/ul>\n\n<p>Thanks for your thoughts and ideas!<\/p>\n\n","category":["discuss","javascript","typescript","graphql"]},{"title":"Losses & Gains, Tracking Task Switching & Thrashing","pubDate":"Sat, 24 Jul 2021 17:26:58 +0000","link":"https:\/\/dev.to\/adron\/losses-gains-tracking-task-switching-thrashing-27i4","guid":"https:\/\/dev.to\/adron\/losses-gains-tracking-task-switching-thrashing-27i4","description":"<p>I take measurements and review statistical data on a range of topics to an extensive degree. However last year, pandemic year 2020, I dug into a few metrics to better tell the story about the damage task switching does to getting deliveries out the door. I wanted to answer one specific question, ideally with a measurable number.<\/p>\n\n<blockquote>\n<p>How many projects, tasks, and other deliverables don't get delivered because of task switching via corporate attention deficit hyper-action disorder?<\/p>\n<\/blockquote>\n\n<h2>\n  \n  \n  CADHAD\n<\/h2>\n\n<p>If you've never heard of Corporate Attention Deficition Hyper-Action Disorder, welcome to the latest term I'm going to coin for use in this article. Possibly, I'll use it in future articles, and refer back this one and for that reason let's define CADHAD.<\/p>\n\n<blockquote>\n<p><strong>CADHAD<\/strong> - With a silent <em>h<\/em> this acronym stands for <strong>C<\/strong>orporate <strong>A<\/strong>ttention <strong>H<\/strong>yper-<strong>A<\/strong>ction <strong>D<\/strong>isorder. Being specific, it's the activity, anti-pattern, and syndrome of making activities within a business environment that routinely lead to the completion of other activities getting canceled, forgotten, or outright deleted. Usually after a thorough effort put into these actions being cancelled, forgotten, or deleted and through the switching, or thrashing of effort, extensive costs are spent over effectively having people do nothing.<\/p>\n<\/blockquote>\n\n<h2>\n  \n  \n  CADHAD Metrics\n<\/h2>\n\n<p>Alright, back to answering the question <em>\"How many projects, tasks, and other deliverables don't get delivered because of task switching via corporate attention deficit hyper-action disorder?\"<\/em>.<\/p>\n\n<p>Here are a few metrics to get us started.<\/p>\n\n<h3>\n  \n  \n  Actions Assigned, Started &amp; Completed\n<\/h3>\n\n<div class=\"table-wrapper-paragraph\"><table>\n<thead>\n<tr>\n<th>Date<\/th>\n<th>Started<\/th>\n<th>Completed<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>January<\/td>\n<td>76<\/td>\n<td>11<\/td>\n<\/tr>\n<tr>\n<td>February<\/td>\n<td>123<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>March<\/td>\n<td>13<\/td>\n<td>11<\/td>\n<\/tr>\n<tr>\n<td>April<\/td>\n<td>16<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>May<\/td>\n<td>11<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>June<\/td>\n<td>17<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>July<\/td>\n<td>6<\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<td>August<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>September<\/td>\n<td>43<\/td>\n<td>43<\/td>\n<\/tr>\n<tr>\n<td>October<\/td>\n<td>37<\/td>\n<td>29<\/td>\n<\/tr>\n<tr>\n<td>November<\/td>\n<td>57<\/td>\n<td>51<\/td>\n<\/tr>\n<tr>\n<td>December<\/td>\n<td>27<\/td>\n<td>23<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n\n<h3>\n  \n  \n  Projects Assigned, Started &amp; Completed\n<\/h3>\n\n<p>To note, this is projects assigned to and at least 95% of the tasks assigned during the month for that project being completed equates to the project being marked complete for the month. If it's less than that I leave it marked as incomplete. For example, if I get pulled off of tasks for project A and get put on tasks for project B, and because of that neither all the tasks for A or B get completed, that's 2 projects started or continud for the month and zero finished.<\/p>\n\n<p>Another important caveat, if a company is efficiently organizing their projects and efficiently utilizing their labor resources - i.e. their programmers - than this would be a 1 to 1 number, anything less than that means there are significant restarts and changes occuring that are significantly damaging effective utilization of people and resources. <strong><em>The TLDR, without a 1 to 1 metric the company is effectively burning cash.<\/em><\/strong><\/p>\n\n<div class=\"table-wrapper-paragraph\"><table>\n<thead>\n<tr>\n<th>Date<\/th>\n<th>Started<\/th>\n<th>Completed<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>January<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>February<\/td>\n<td>6<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>March<\/td>\n<td>6<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>April<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>May<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>June<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>July<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>August<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>September<\/td>\n<td>4<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>October<\/td>\n<td>4<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>November<\/td>\n<td>4<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>December<\/td>\n<td>5<\/td>\n<td>5<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n\n<p>Alright, so here are two sets of data. Let's talk about what each tells us about the story of thrashing. The first part of the year, January through August of 2020 I was at one company - we'll call it \"Databases R' Us\" and the second part of the year I'll call the company what it is, which is <a href=\"https:\/\/hasura.io\">Hasura<\/a>.<\/p>\n\n<h2>\n  \n  \n  A Story of Thrashing\n<\/h2>\n\n<p>At Databases R' Us I had joined a team that had numerous projects and tons of actions to get completed. Initially in January was a reset month, and it was, contrary to what the metrics for January tell us, a really productive month. No new projects were started, just preparation by closing up and finished actions or deleting actions. Which even though it doesn't tell us a lot it does show one thing, there were a lot of actions that were entirely dropped. Of the 76 only 11 were wrapped up and completed. The reason, the previous months had left the team with a lot of <em>technical debt<\/em> that effectively just got ignored and the actions associated with paying that debt just got deleted.<\/p>\n\n<p>The next month, Feburary starts to paint more of a picture of the significant levels of thrashing that were occurring. New projects were setup and planning had been done, totalling a massive 123 actions and 6 projects. I was ready to go, the team was pumped in that first week. However by the end of the month one can see that the level of thrashing immediately led to a massive failure of projects and actions to be completed. A caveat I have to add, is this is measuring a systemic failure, which is important to note because I <em>could<\/em> be messing up things myself but as we'll see later I can also deliver robust solutoins when the systemic failures aren't dragging projects and actions into the dustbin of oblivion. February was a rough period of time for the systemic completion of projects and actions that needed done. At month end, a miserable zero projects could be considered to have had their actions completed, and only 11 overall actions were wrapped up.<\/p>\n\n<p>March rolled in and things improved, thank goodness, I needed the morale boost to be honest! 3 of 6 projects where brought to completion with their respective tasks completed. Bring the actions down to a very reasonable 13 actions to complete led to 11 being completed. An excellent ratio for task completion.<\/p>\n\n<p>The next four months brough actions and projects into a varied mix of misdirections and failures mixed in with a few successes. Overall the subsequent 4 months Databases R' Us improved efficiency of systemic delivery to about 50% or so. Not good, but much better than the January and February time frame where everything was a vast systemic failure that largely led to teams delivering on things that effectively didn't get <em>delivered<\/em> to product or customers.<\/p>\n\n<p>August wrapped up my work with Databases R' Us with final delivery of a project and my departure. A fun time, and a great example of systemic wins and systemic failures around a company delivering or not.<\/p>\n\n<h2>\n  \n  \n  Enter Hasura\n<\/h2>\n\n<p>I joined Hasura in October, taking a month in September to knock out some of my own personal projects and action activity. As you can see, of the things I planned and started with eventual completion I knocked it out of the park that month. In October, starting with Hasura that streak continued. October had a solid score of 4 projects started, 4 completed and 37 actions started and 29 brought to completed. Not perfect, but really good for just starting out at a new company - when so much time actions linger a bit longer just because one is still setting up their accounts and other requisite but not company useful work toward product or services advancement.<\/p>\n\n<p>November and December continued that streak, 4 of 4 and 5 of 5 projects respectively. Even though December is often a really dead month for advancement of projects and actions to complete, in 2020 there were a solid bunch that I got into and knocked out. It provided me an excellent win upon new years! Even the actions completion ratio was really good.<\/p>\n\n<h2>\n  \n  \n  Lagniappe Comments\n<\/h2>\n\n<p>2020 was a strange year, considering the pandemic changes and related characteristics of life itself this year. To compound the intricate complications of 2020 my son was born and I took a chunk of leave in the September and October time frames. Even with this major life event occurring I was still able to - even while taking care of a vast array of baby duties - contribute and knock out work and contribute systemically on a number of level to various projects. So much so, aside from the obvious leave, I'm proud that I went to bat at work at near 100% level even in light of all the pandemic and newborn complexities!<\/p>\n\n<p>Additionally these were new metrics I had decided to measure and the implications behind them are still a bit hard to describe just from the numbers. Even though it does show the story of the year, it doesn't really dig deep into where and how the task switching - AKA thrashing - occurred or the end result losses from that outcome. Only that it merely happened. This is something where I need to figure out further metrics that could show how, why, where, when, and what occurred that led to these metrics.<\/p>\n\n<p>At some point I'd love to work on enriching this story through further data collection and figuring out the who, what, where, when, why, and how of the stories the data is meant to tell. Even more so, I'd love to work with others to brainstorm and figure out how to determine what telemetry should be used to provide this richer insight. If you're interested, I'm available via the Twitters <a class=\"mentioned-user\" href=\"https:\/\/dev.to\/adron\">@adron<\/a>\n and also you can directly mesage me <a href=\"https:\/\/compositecode.blog\/contact\/\">here<\/a>.<\/p>\n\n<h2>\n  \n  \n  Summary\n<\/h2>\n\n<p>The wrap up is, the year definitely involved some significant thrashing that led to projects derailed and action items deferred, deleted, or otherwise thrashed on and left as waste. But the year also led to some striking counterbalances to that with 100% of projects getting worked on and delivered, with an excellent ratio of actions getting completed.<\/p>\n\n<h2>\n  \n  \n  References\n<\/h2>\n\n<ul>\n<li>\n<a href=\"https:\/\/compositecode.blog\/2013\/02\/28\/systems-thinking-measuring-things-and-really-cultural-change-is-free-and-why-your-measurement-are-likely-screwing-up-your-business\/\">Systems Thinking, Measuring Things and Really, Cultural Change is Free and Why Your Measurement are Likely Screwing Up Your Business<\/a> this is a talk about not measuring, not running metrics, or specifically being careful about measuring the right things and not incurring significant expenses measuring the wrong things that misrepresent the real story behind something. A consideration I always take into account when determining metrics to measure something, and whether I even should be measuring the thing in question.<\/li>\n<li>\n<a href=\"https:\/\/ieeexplore.ieee.org\/abstract\/document\/8784641\">Task Scheduling Algorithm for Heterogeneous Real-time Systems Based on Deadline Constraints<\/a> is a post that isn't related the human task switching, as this post you've just read above is, but it is fascinating how this correlates with human task switching in a similar way.<\/li>\n<li>\n<a href=\"https:\/\/blog.rescuetime.com\/context-switching\/\">Context Switching: Why jumping between tasks is kiling your productivity (and what you can do about it)<\/a> is a good post. The bar chart midway through the article is excellent for showing graphically much of what is described in my post above.<\/li>\n<\/ul>\n\n","category":["productivity","discuss"]},{"title":"Utilizing 3rd Places My Way for the Best Outcomes","pubDate":"Thu, 15 Jul 2021 07:45:53 +0000","link":"https:\/\/dev.to\/adron\/utilizing-3rd-places-my-way-for-the-best-outcomes-3n7p","guid":"https:\/\/dev.to\/adron\/utilizing-3rd-places-my-way-for-the-best-outcomes-3n7p","description":"<p><strong><em>NOTE 1:<\/em><\/strong> <em>This is my POV on 3rd Places and very much <a href=\"https:\/\/dictionary.cambridge.org\/us\/dictionary\/english\/ymmv\">YMMV<\/a>. I'm NOT telling anybody this is how or what they need to do to be successful, it's merely ideas you can borrow or steal! So enjoy!<\/em><\/p>\n\n<p><strong><em>NOTE 2:<\/em><\/strong> <em>Yes, this is a long post, get ready for a long haul. However, if you're looking for ideas about 3rd places or just curious then this post will be worth the read!<\/em> \ud83d\udc4d\ud83c\udffb<\/p>\n\n<p>Recently I wrote about \"<a href=\"https:\/\/compositecode.blog\/2021\/07\/13\/my-lessons-learned-on-learning\/\">My Lessons Learned on Learning<\/a>\". One of the key parts of learning, but also getting things done for me, is to frequently visit 3rd places. What's a 3rd place? I'll elaborate.<\/p>\n\n<blockquote>\n<p>3\ufe0f\u20e3<em>rd Place<\/em> - (per <a href=\"https:\/\/en.wikipedia.org\/wiki\/Third_place\">Wikipedia<\/a>) In community buildings, the third place is the social surroundings separate from the two usual social environments of home and the workplace. Examples of third places would be environments such as churches, cafes, clubs, public libraries, bookstores or parks.<\/p>\n<\/blockquote>\n\n<h2>\n  \n  \n  Three Other Key Definitions\n<\/h2>\n\n<p>There are three other definitions that should be understood in detail. These definitions are necessary to get the full context of what I have to write about 3rd places, and also to have an accurate grasp of what I mean when I write <em>work<\/em>, <em>workplace<\/em>, and <em>home<\/em> in relation to 3rd places.<\/p>\n\n<blockquote>\n<p><em>Work<\/em> is activity that is done on behalf of staying alive. Work could be farming a field or going hunting. In my context it would mean creating some type of service or product, or partaking on some type of activity. One more caveat is that this activity would be related to <em>getting paid<\/em>.<\/p>\n\n<p><em>Workplace<\/em> is a place where poeple have traditionally gone to do <em>work<\/em>. However it is a place that is often associated with <em>work<\/em> where <em>work<\/em> often doesn't get done. A <em>workplace<\/em> is what I call a designated place often paid for by an employer that a person goes to in order to <em>work<\/em> for that employer. That's it, nothing more nothing less, that is the core definition of <em>workplace<\/em> for me.<\/p>\n<\/blockquote>\n\n<p>NOTE: <em>Workplace<\/em> <a href=\"https:\/\/www.dictionary.com\/browse\/imho\">IMHO<\/a> should not be, and I attempt to not conflate it with one's personal <em>workspace<\/em>, <em>personal office<\/em>, or <em>home office<\/em>. Very, very different places.<\/p>\n\n<blockquote>\n<p><em>Home<\/em> is where the heart is, it's where you rest your head at night and get sleep. It's where you may eat some of your meals. It's where you hopefully feel safe and confortable and can relax! Everybody, I hope, knows their home to be this!<\/p>\n<\/blockquote>\n\n<h2>\n  \n  \n  Effective 3rd Spaces\n<\/h2>\n\n<p>Now that I've dug into the nitty gritty of 3rd spaces, at least for my context in these articles, now the valuable part. How does one use 3rd spaces, and how does one make good use of the trips to and from 3rd spaces? There is so much context and value in the trips to, between, and from third spaces as much as use of the space while you're visiting 3rd spaces.<\/p>\n\n<p>The following details how I use 3rd spaces and how I utilize the trips between those spaces. This way I get, and <a href=\"https:\/\/dictionary.cambridge.org\/us\/dictionary\/english\/ymmv\">YMMV<\/a>, the most out of 3rd space use, but also, as extra I'll detail how many of these practices I follow also work to help me and also not fall into the asshole problem person category for the 3rd places!<\/p>\n\n<p>The following covered 3rd spaces are the most common 3rd spaces I use: coffee shops, passenger trains, city transit, Seattle &amp; Portland parks, and my personal office.<\/p>\n\n<h3>\n  \n  \n  Use Of Spaces\n<\/h3>\n\n<p>The space that one needs for doing <em>work<\/em> or even just projects for themselves to creatively problem solve, to learn, or otherwise work toward accomplishing a goal varies. Each of the spaces I use are usually pretty good for many of my projects, and all are exceptionally good for getting <em>work<\/em> done in various ways.<\/p>\n\n<h4>\n  \n  \n  \u2615\ufe0f Coffee Shops (Tea Shops, Beer Halls, etc) \ud83c\udf75 \ud83c\udf7a\n<\/h4>\n\n<p><em>Coffee shops<\/em>, probably the most frequent 3rd place I visit by an order of magnitude have several factors that dictate their usefulness. A few questions always dictates whether a coffee shop is going to be a good 3rd place;<\/p>\n\n<ul>\n<li>Is the coffee (tea, beer, etc) good?<\/li>\n<li>Do they have decent snacks and food?<\/li>\n<li>Are the staff cool, friendly, and ok with <em>loiterers<\/em>?<\/li>\n<li>Is there power that is readily available to plug into?<\/li>\n<li>Is there good wifi amidst the volume of people?<\/li>\n<li>What is the <em>busy-ness<\/em> of the business? Crowded?<\/li>\n<li>Can I easily not fall into being an asshole? (see mitigation below)<\/li>\n<li>What's the combination of all the above?<\/li>\n<\/ul>\n\n<p>With a good mix of the following, I have frequented multiple coffee shops each day to finish out a solid work day. But just <em>working<\/em> at coffee shops is one things, there is something else they're exceptionally good for - meeting other folks! During the work day I routinely coordinate which coffee shop to be at, with who I might schedule a meeting with to discuss a wide range of things; software architecture, business ideas, or other prospects.<\/p>\n\n<p><strong>Asshole alert and mititgation practices!<\/strong> One thing about coffee shops is that they are businesses, usually local private businesses. In that sense they have to make money for staff, to keep the lights on and the wifi connected, and doing so means turning seats and selling product. Thus, don't loiter and take up seats or defer the selling of products. If you do, you are indeed being one of those assholes that has led to the death of more than a few coffee shops! But it's simple to not be an asshole. Simply insure you're paying for product, and if things get extra busy and they're hitting that stride at making some cash, don't disturb that and prospectively move along. Thanks, much appreciated! \ud83d\udc4d\ud83c\udffb<\/p>\n\n<p>There are so many great ways to not be an asshole at a coffee shop, and yet reap great benefits from studying and <em>working<\/em> at a coffee shop I'll have a complete stand alone post just on this topic in the near future. Especially post-pandemic since we're all flooding back to 3rd places!<\/p>\n\n<h4>\n  \n  \n  \ud83d\ude86 Passenger Trains \ud83d\ude82 \ud83d\ude85\n<\/h4>\n\n<p>Next up is a favorite 3rd place which combines not only a 3rd place but also traveling to and from other 3rd places, <em>passenger trains<\/em>! I currently live in Seattle, for the second time of living in Seattle, but in the northwest have mostly lived in Portland. One of the beautiful aspects of living in either of these cities is the intercity rail service called the <a href=\"https:\/\/www.amtrakcascades.com\">Amtrak Cascades<\/a>.<\/p>\n\n<p>Because of this service I have only ever driven between these cities in a car 6 times out of the 900+ trips I've made between these cities since I've lived in the Pacific Northwest!<\/p>\n\n<p>Some of the strengths of passenger rail service like <a href=\"https:\/\/www.amtrak.com\/\">Amtrak<\/a>, <a href=\"https:\/\/www.soundtransit.org\/ride-with-us\/stations\/sounder-train-stations\">Sounder<\/a>, <a href=\"https:\/\/www.caltrain.com\/main.html\">Caltrain<\/a>, and others throughout the western United States include;<\/p>\n\n<ul>\n<li>The trains range in being spacious to extremely spacious to work in. On most of the trains, even the commuter trains, there are seat back trays or pull out tables to work on combined with electrical sockets and wifi for some routes. The accomodations, depending on the train, range from coach seats, business &amp; first class, roomettes, and bedrooms as regular options.<\/li>\n<li>The cities connected are forward thinking, progressive, beautiful, livable, and if done right stunningly convenient cities. With the more innovative and advanced businesses of the United States, still to this day leading technical innovation in the world (maybe not for much longer, but for now it still holds). This provides a lot of reasons to take trips between these cities for <em>work<\/em> and for pleasure. The lagniappe is, the trains put you <strong><em>directly<\/em><\/strong> into the center of these cities!<\/li>\n<li>Albeit the US doesn't have trains that tend to be on time, these trains on the west coast are generally on time plus\/minus a few minutes except for the Coast Starlight, and even that train isn't <em>that<\/em> off schedule these days. So even though you can't set your watch by modern US rail service like that of the previous centuries, you an at least expect to show up <em>mostly<\/em> on time! This makes connections and other related <em>trips<\/em> to 3rd places manageable and business friendly!<\/li>\n<\/ul>\n\n<p><strong>Asshole alert and mititgation practices!<\/strong> When taking the train there are a number of things that will put you in the asshole category and I can barely get to the top few here, so like <em>coffee shops<\/em> I'll have a follow up article for a longer list. But there two, one that I'm going to put here and I know it's Amtrak (and Caltrain, Sounder, &amp; all others) supported.<\/p>\n\n<p>Don't disturb the staff running the train. Amtrak and other passenger trains may be late, some of the food might not be good, the cars might be warmer or colder than you like. You may want to drink so many beers (cuz you can <em>technically<\/em>) that you fall down in a drunken stupor and cause a medical emergency. You may get screamo and yell at the staff. Every single person on the train ceases to care about your problem then, and we all await your imminent detraining event when the police show up and remove your jack ass self. So please, do <strong><em>NOT<\/em><\/strong> turn into this asshole and delay the entire roster of folks trying to get from point A to point B!<\/p>\n\n<p>This next one is a personal - and I know most people's - peve about some folks that have a lack of situational awareness and a mouth breathing problem. If you <em>talk loudly<\/em> in the northwest it's best to remove yourself from the passenger car and head off to the Bistro, Diner, or Lounge Car to talk. You're epicly annoying and most northwesterners won't tell you, I however am from the south and wasn't taught to stand idly by while you mouth breath loud utterances around from a lack of situational aweareness like an asshole. Even more so when you're falgrantly downing your beers, I will instigate getting you kicked off the train. Uplevel that situational awareness and don't be <em>that asshole<\/em> while on the train. Thanks, much appreciated! \ud83d\udc4d\ud83c\udffb<\/p>\n\n<h4>\n  \n  \n  \ud83d\ude83 City Transit \ud83d\ude8c \u26f4\n<\/h4>\n\n<p>Ok, some city transit is horrible as a 3rd place. Most buses are a no go because combined with the poor state of most roads (like in Seattle) one can't do all that much on them. Limiting their use. But other modes are spectacularly effective, for example;<\/p>\n\n<p><em>Seattle Ferries<\/em> are one of the most relaxing, wonderful, and convenient ways to travel across vast expanses of water while comfortably <em>working<\/em> or just relaxing. They are great for trips to 3rd places as well as being excellent 3rd places themselves. I've even gone and sat on a ferry, then gotten off (cuz they usually make ya at one end or the other) and then just reboarded, just to enjoy the trip while <em>working<\/em>.<\/p>\n\n<p><em>Light Rail (<a href=\"https:\/\/trimet.org\/max\/\">MAX<\/a>, <a href=\"https:\/\/www.soundtransit.org\/ride-with-us\/routes-schedules\/link-light-rail?direction=0&amp;at=1626246000000&amp;view=table&amp;route_tab=schedule&amp;stops_0=1_99604%2C1_99913&amp;stops_1=1_99914%2C1_99605\">LINK<\/a>, etc)<\/em> is one of my favorites too for short hauls back and forth between areas but also as a mode that - when not too busy - is great to just get into a comfortable corner seat and watch the views go by while <em>working<\/em> on various things. There aren't electrical sockets or wifi, but nothing a good charge and tethering won't fix these days.<\/p>\n\n<p>More on transit as a displacement vehicle between 3rd places below. Suffice to say though, some transit can indeed be the 3rd place itself!<\/p>\n\n<p><strong>Asshole alert and mititgation practices!<\/strong> The biggest thing with transit usage, when using it as a 3rd place, is similar to the above - if it's busy just displace again. Don't sit on a bus or tram or light rail vehicle or the ferries (which are never that packed fortunately) if it's packed then move along. Don't take up space by people trying to use the transit for its intended purpose of going from place A to place B. Thanks, much appreciated! \ud83d\udc4d\ud83c\udffb<\/p>\n\n<h4>\n  \n  \n  \ud83c\udfde Seattle &amp; Portland Parks \ud83c\udf32 \ud83c\udf3f\n<\/h4>\n\n<p>Almost every <em>Seattle &amp; Portland Park<\/em> is most epic and enjoyable as a 3rd place to relax and <em>work<\/em> in. Again, with the advent of usable tethering and battery life in laptops, combined with a little wifi in some parks, these spaces can be some of the most enjoyable and amazing places to get some <em>work<\/em> done while enjoying your best life!<\/p>\n\n<p>Often there are benches or other amenities in parks that are good, but there are also park benches along with picnic tables that really multiply the usefulness of using a park as a place to <em>work<\/em> and think creatively. Combine that with more than a few natural characteristics, such as in Seattle there are rocks down along the shore. Albeit risky, a climb down across the rocks can lead to a comfortable and close to the water seat.<\/p>\n\n<p>Recently I took a ride (more on this trip type below) to the waterfront in downtown Seattle. Spent a couple hours working right on the waters' edge, and got a significant amount of <em>work<\/em> done along with enjoying that view and scenary extensively. I even cut together a narrative of that trip here, included for you to view at your convenience. \ud83e\udd19\ud83c\udffb<\/p>\n\n<p><iframe width=\"710\" height=\"399\" src=\"https:\/\/www.youtube.com\/embed\/NcbB-Tk5R30\">\n<\/iframe>\n<\/p>\n\n<p><strong>Asshole alert and mititgation practices!<\/strong> I'm gonna just assume you're smart enough not to litter, burn down, desecrate, graffiti, or otherwise mess up a park. So on to one of the lesser known <em>asshole<\/em> park activities. Take for example, if you're <em>working<\/em> in a park that's fairly occuppied then don't take loud conference calls. This also, just like littering, desecration, and graffitying natural lands shouldn't <em>need<\/em> to be mentioned, but it does sometimes escape us. Be aware, work on that situational awareness, and don't wreck other people's zen. Thanks, much appreciated! \ud83d\udc4d\ud83c\udffb<\/p>\n\n<h4>\n  \n  \n  \ud83c\udfe3 My Personal Office \ud83c\udfe4\n<\/h4>\n\n<p>No <strong>asshole alert and mititgation practices<\/strong> for this one because of obvious reasons!<\/p>\n\n<p>One of the things that I learned years ago while working remotely was that it is indeed really ideal to have a 99.99999% reliable location away from <em>home<\/em> that can act as a <em>workplace<\/em> for <em>work<\/em> as well as projects or other things that might come up. If you get an office with public space for conferene rooms and such even better! Sometimes, one can even write off some of these costs or even charge it back to the employer if you've worked that out in your contract!<\/p>\n\n<p>A personal office provides that space that isn't at risk of being disturbed by assholes, you can ensure the wifi or internet connection is good, the door is open based upon your need at any time, and generally removes all of the risk of relying on other 3rd places! The downsides are almost always just the cost of having said 3rd place.<\/p>\n\n<h3>\n  \n  \n  Displacing To &amp; From\n<\/h3>\n\n<p>Almost all of us have spent inordinate amounts of time traveling back and forth - for Americans largely by driving - to 3rd places. That is one way that someone could get between places, but I opt not to drive places. So much so, I stopped owning a car from a lack of need over 11 years ago now. One of the beauties of the northwestern cities of Eugene, Salem, Portland, Seattle, Bellingham, and a few I've forgotten. These cities provide numerous opportunities to make the <em>trips<\/em> between 3rd places without a car. I've made great use of this <em>amenity<\/em> in the northwest. So why make use of this amenity? Here's my list and of course <a href=\"https:\/\/dictionary.cambridge.org\/us\/dictionary\/english\/ymmv\">YMMV<\/a>.<\/p>\n\n<p>Getting from 3rd place to 3rd place, with a toddler or grown ass adults, or all alone I make it enjoyable, <em>work<\/em> productive, and entertaining for myself. Whatever the modal option, I try to make it so that I get multiple uses out of the trip.<\/p>\n\n<p>One method I use is combining multiple trips into one trip via <em>trip chaining<\/em>. An example would be; going to a park to work, stopping for a meeting, catching pizza with a team to discuss architecture, having a design meeting, and then getting groceries on the route home. This is a great example of <em>trip chaining<\/em> that, in a place like Seattle or Portland is really easy with lots of options to mix and match however you like!<\/p>\n\n<p>The other characteristic of the trip is while I'm moving toward the destination am I also getting something else accomplished? If I'm cycling am I getting some exercise? Am I runnig some additional errands on the way? Am I riding with some others? Am I going to be able to work on the modal option, such as taking the bus, tram, light rail, or ferry? Is the trip as much a 3rd place as the 3rd place I'm going to? I never like to take a trip that isn't multipurpose in function. Since I don't drive daily, those trips have all pretty much ceased to exist for me. It's a great feeling to get things done, even when getting things done, to get evven more things done. It's true multi-tasking like we wished our brains could enable us to do!<\/p>\n\n<p>Overall, here are the modal option that I specifically use for my day to day trips to and from 3rd spaces...<\/p>\n\n<p><em>Pedestrian Movement!<\/em> This is simply walking. If there is a reasonable way to walk to most of the 3rd places and related activites I need to undertake then it is the option I'll choose. It's the cheapest, one of the healthiest, and generally convenient ways to move about the world. It's spectacular that it is our <em>default<\/em> mode of transport on this fancy planet of ours.<\/p>\n\n<p><em>Biking<\/em> from place to place is great where the city is designed and developed well (if biking aint your thing, skip to the next modal option). This includes almost any city with reasonably urban and original city platting (i.e. the cities with grids) areas in the United States. Which for city specific things, if you live urban or in what are the old <em>streetcar<\/em> suburbs, is the fastest and likely the most efficient way from point A to point B. Parking is rarely a problem, owning several bikes for each <em>trip type<\/em> is cheap over time by comparison to other modal options. The only thing more environmentally friendly is walking, so you can rest easy in the ethical realm!<\/p>\n\n<p>A few options to make things ridiculously easy, involves a few bikes and bike options I have.<\/p>\n\n<ul>\n<li>Everyday hauler of things, <a href=\"https:\/\/transitsleuth.com\/2021\/07\/14\/bike-collection-gear-all-city-space-horse-disc\/\">Space Horse<\/a>. This bike provides point to point travel with the possibility of over 100lbs of carry weight on frame via panniers. Adding my backpack and I easily get into the 140 lbs range if needed. The reasoning however is it provides the ability to carry more groceries than the average American buys at Costco (i.e. a LOT of food) all the while loaded up with laptop plus hammock and everything else I'd need to hang out in a 3rd place and get things done comfortably! Even with all that carry capacity, I can easily pop off the panniers while loaded and rack load onto a bus or light rail if need be for that \"I got lazy now\" trip home!<\/li>\n<li>Zippy get there and back, <a href=\"https:\/\/transitsleuth.com\/2021\/07\/14\/bike-collection-gear-all-city-macho-man-disc-aka-pop-rocket\/\">Pop Rocket<\/a>. This bike I use for quick trips, it's real light and maneuverable, where I'll just carry my backpack or I just need to show up and won't really need to haul anything. Easy to also combine with transit if I wanted to say, skip a hill or just felt like watching videos, or need to whip out the laptop because heaven forbid I got paged while on pager duty!<\/li>\n<li>Boldly Bendy Brompton Bike. This bike I use when I want to be able to bring it into and out of locations. It has been my go to bike when I record meetups like <a href=\"https:\/\/youtu.be\/CN2Ndrb9IX4\">\"Adam Dymitruk: Event Modeling &amp; James Nugent: Events and Distributed Consensus\"<\/a>, <a href=\"https:\/\/youtu.be\/_iSQob1hF48\">\"Dave Remy, Event Sourcing Primer: Building source systems using the event sourcing pattern\"<\/a> and <a href=\"https:\/\/youtu.be\/j1lExd3skLc\">\"Robin Moffatt, Apache Kafka and KSQL in Action: Let\u2019s Build a Streaming Data Pipeline!\"<\/a> for example. I have a front mount bag and a back rack that is perfect for everything I need. All while being able to be folded up and brought into the meeting location or onto a bus or other mode if necessary. To boot, I've used this bike for it's intended purpose too such as when I took the <a href=\"https:\/\/compositecode.blog\/2019\/06\/25\/trip-report-accelerate-2019-in-washington-dc-i-mean-national-harbor\/\">trip to DC<\/a> for <a href=\"https:\/\/compositecode.blog\/2019\/06\/25\/trip-report-accelerate-2019-in-washington-dc-i-mean-national-harbor\/\">DataStax's Accelerate<\/a> user conference. Riding into and out of International in DC was a stellar experience and that continued everyday of the conference as I road across the Woodrow Wilson Memorial Bridge to the conference center from Alexandria, Virginia. An absolutely stellar experience traveling between 3rd places.<\/li>\n<li>\n<a href=\"https:\/\/transitsleuth.com\/2021\/07\/14\/bike-collection-gear-surly-bill-trailer\/\">Surly Trailer<\/a>. Ok, sometimes you have to go above and beyond a mere bike frame and need to haul some big stuff. This trailer I purchased years ago and, like the nerd that I am have kept track of various metrics. One of those metrics is the fact I've carried multiple metric tons over the lifespan of this trailer. From a multile hundred pound Ikea load to moving from house A to house B in Ballard, I've done a lot with this trailer. It attaches with a quick screw on and screwing off so I don't need any <em>special<\/em> hardware.<\/li>\n<li>Future Bike (i.e. that I don't own <em>yet<\/em>). The <a href=\"https:\/\/www.urbanarrow.com\">Urban Arrow<\/a> is great for carrying even more groceries than listed above, for carrying a child <em>and<\/em> groceries, or for carrying an adult and groceries with a child sitting on their lap. It's all up to me! Yay for options! All with that extra electric power to get those multiple hundred pounds up and down the hills of Seattle.<\/li>\n<\/ul>\n\n<p>All those bikes and gear combined add up to as many or more options than one generally has with an automobile in the city, at half the cost of a little Honda Fit, with the ability to routinely make <em>better time<\/em> to lcoations in the city than folks driving! I've literally decimated schedules in San Francisco, Seattle, Portland, Vancouver BC, New York City, Los Angeles, Oakland, and other cities with a transit + bike trip option. Easily getting 10-500% more out of a busy day with meetings in different parts of the city. Arguably, when in NYC, PDX, and SEA I have had days that literally would not have been possible to schedule if driving. But were no problem with a bike. Now of course you add the auto-dependent suburbs and you'll be debilitated, unable to acheive anything like I've described here because of the poorly zoned layout of the space. So I just highly suggest avoiding the auto-dependent suburbs if you want 3rd spaces - and especially the trip between 3rd spaces - to work most efficiently for you.<\/p>\n\n<p>Next up, <em>passenger trains<\/em> freakin' rule for movement between 3rd spaces. In addition, they are a 3rd place unto themselves, and can provide extensive focus to get <em>work<\/em> done as well as to recharge. At least, for folks like me with that ADHD it's one modal option that can serve multiple purposes like that.<\/p>\n\n<p>One other thing that works great on trains, if one can manage to coordinate this, is to have meetings with other coders or cohort via the Bistro, Diner, or Lounge car. These are great spaces to have meetings, enjoy life at the same time, and really do that <em>ideation<\/em> thing I always hear about!<\/p>\n\n<p><em>Ferries<\/em> are a choice I'd really like to utilize more, albeit I don't usually head off to the islands to get <em>work<\/em> done or have meetings. However, thanks to some creative minds there have been conferences in Bremerton, meetings in Bainbridge, and other organization <em>work<\/em> that gets done on some of the other islands. So combining the ferries with other modes, chainging the 3rd places together, can create some immensely useful, enjoyable, and productive <em>work<\/em> time.<\/p>\n\n<h2>\n  \n  \n  Summary\n<\/h2>\n\n<p>That's my big list of ways to utilize 3rd places, and the travel to and from those 3rd places, to get things done for <em>work<\/em>. But not just <em>work<\/em>, I utilize this time to combinge rest, relaxation, and efficiency of modal splits to get things done for myself as well! I hope the list is somewhat useful to at minimum, light some ideas in mind in how to improve your own enjoyment while getting things done for <em>work<\/em> and for yourself. Cheers!<\/p>\n\n"},{"title":"My Lessons Learned on Learning","pubDate":"Wed, 14 Jul 2021 05:24:23 +0000","link":"https:\/\/dev.to\/adron\/my-lessons-learned-on-learning-b4h","guid":"https:\/\/dev.to\/adron\/my-lessons-learned-on-learning-b4h","description":"<p><strong><em>NOTE:<\/em><\/strong> <em>This is my experience and very much <a href=\"https:\/\/dictionary.cambridge.org\/us\/dictionary\/english\/ymmv\">YMMV<\/a>. I'm NOT telling anybody this is how or what they need to do to be successful learning, it's merely ideas you can borrow or steal! Enjoy!<\/em><\/p>\n\n<p>I had just, after a couple years of intense music studies, shifted into computer science at college and learned something very important about myself. I signed up for Computer Programming 1, the most beginner of beginner classes on computer programming.<\/p>\n\n<p>The class started and very early in the first few weeks we'd studied control structures and variables. We were in the midst of writing our first program and I'd gone into my ADHD induced dozed off state, while mind you being wide awake with eyes wide open. However as I sat there, my eyes did start to shut. In a mere moment I relaxed and fell sideways. I awoke in the process of falling, grasped the desk with my hands, as if it was anchored to the ground. However it was too late, the energy of my fall exceeded the lack of weight in the desk, and I uprooted it with a screech of the metal desk feet on the lanoleum tile floor.<\/p>\n\n<p>BANG, the desk hit the ground and I, now laying 90 degrees of sitting upright with my desk gripped in my hands and me riding it into the floor like a pilot in a plane. Fortunately, being a long haired metal head with plenty of <em>meh<\/em> I wasn't embarrassed so much as confused. I announced, \"I'm fine!\" and got up to a few smirks and smiles from classmates. One of the students spouted, \"that's Adron for ya\" as she turned to face to the front of the class again. The teacher asked if I was, \"ok\". I responded, with the second free lesson of the day, \"I'm fine just got a little bored and distracted.\"<\/p>\n\n<p>The teacher smirked and shook her head at me. She then contineud with the class as I set my desk upright and sat back down to continue too.<\/p>\n\n<h2>\n  \n  \n  The Lessons\n<\/h2>\n\n<p>first and foremost ADHD will thrash me into boredom and I will entirely phase out when being \"taught <em>at<\/em>\" vs be \"informed while I learn\" or \"learning together\". You see, I simply don't do classroom style learning, I teach myself and then work with people to move past stumbling blocks. It's a wonderful way to learn.<\/p>\n\n<p>second lesson was that, one shouldn't spout of that they're <em>bored<\/em> in class. It's just not cool. Be polite, state things constructively and people will help you.<\/p>\n\n<h2>\n  \n  \n  Benefits of The Teacher\n<\/h2>\n\n<p>However amidst all of this fracas that I caused, the teacher noticed these things that I had yet to truly learn. She notified me after class that I needed to schedule a time to meet at my earliest convenience. I did and later the next week we met.<\/p>\n\n<p>At this meeting she, in blunt directness said, \"I know you've very likely got ADHD but you're doing great with the class. I also bet you don't do well with structured teachings, which is why I'm going to give you the rest of the semester's assignments and let you have at them.\"<\/p>\n\n<p>I was blown away, confused, and impressed at her introspection and reading of me. She added to this though, the third and most valuable lesson of this entire class. This lesson was more valuable than anything I'd learned in college or life up to this point. It was something I knew, without knowing that it was something I could put into words. She said, \"if you're like me, and I suspect you are, I'm not going to hold you to attending <em>every<\/em> class. Make sure you come in for the tests though, and try to come most of the time, but mainly just get the work done. In addition, get up every hour or so and change the place you're working, or just walk around. It'll prevent dozing off.\"<\/p>\n\n<p>She added one more thing, \"Oh, also, don't be the accidental asshole, no need to say you're bored in my class. Just keep that to yourself you already have fans and friends in the class regardless of you knowing it, no need to give me shit about your boredom.\"<\/p>\n\n<h1>\n  \n  \n  The Lesson Trio\n<\/h1>\n\n<p>Through this these three lessons were reinforced, I'll call them:<\/p>\n\n<ol>\n<li>Learning Together Alone - My ability to learn, fast and effectively, is dictated by my ability to hone in on specifics, put those into memory while taking in the abstractions of the ideas at hand. If any questions come up, joining forces or asking a teacher complete this process for me. No classrooms, no needing to sit and be told things that I could easily read 2-10x faster, no need to have concepts pushed at me in a specific dogmatic path.<\/li>\n<li>Be Constructive - Again, just like traveling from point A to point B, we're all just trying to go somewhere, and we're all working at this learning thing. Work together, not at odds with each other, everything is better then!<\/li>\n<li>Take Breaks &amp; 3rd Place Displace - When learning, especially with ADHD, you have to break your own super power of hyper-focus as much as you have to battle that of absolute, uncontrollable, and forced distraction. If you can get one under control, you can get them both to work in your favor! Using 3rd places to your advantage, like coffee shops or parks, to do work are extremely effective. Add in a break every 45 minutes or so and you can create an amazingly productive, powerful, and efficient workflow to learn and to simply get things done!<\/li>\n<\/ol>\n\n<p>My respect for my teacher just shot through the roof. Not only was she no bullshit, she read me like a book, but she also just pointed out what I needed - these obvious things that I would have otherwise likely missed for many more years.<\/p>\n\n<p>I took these lessons to heart and started what would become my frequent use and displacement from coffee shops. In addition it taught me that to be truly efficient and effective, I need chunks of time but also need to break up those time chunks with something more significant than looking away from the screen. I need the option to get up and walk away, take a hike, ride a loop around a lake. Something, anything more than merely sitting there and <em>pondering<\/em> that I'm taking a break.<\/p>\n\n<p>That brings me to my next blog entry \"Magic 3rd Places\", that I'll have posted soon. I'll delve into much deeper detail about how I use 3rd places, what 3rd places really are and how I keep my impact to others and myself to a minimum while making use of displacing around 3rd places frequently.<\/p>\n\n"}]}}