<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Peggy Rayzis on Medium]]></title>
        <description><![CDATA[Stories by Peggy Rayzis on Medium]]></description>
        <link>https://medium.com/@peggyrayzis?source=rss-c827782c6410------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pJshYXSGJn5tlnEeZjEHLA.jpeg</url>
            <title>Stories by Peggy Rayzis on Medium</title>
            <link>https://medium.com/@peggyrayzis?source=rss-c827782c6410------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 13:32:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peggyrayzis/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Ready for takeoff: The new Apollo blog]]></title>
            <link>https://medium.com/apollo-stack/ready-for-takeoff-the-new-apollo-blog-42f11450c57c?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/42f11450c57c</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Wed, 15 Apr 2020 17:25:52 GMT</pubDate>
            <atom:updated>2020-04-15T17:25:52.139Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1J_9Rmh7LlGD8exaspGZTA.png" /></figure><h3>Ready for takeoff: the new Apollo blog</h3><h4>We’re leaving Medium for a Gatsby and WordPress powered site</h4><p>Blogging is an important way we help developers build great apps at Apollo. It’s how we share GraphQL best practices, spread awareness about new Apollo features, and connect with our awesome community of developers.</p><p>In four years, our blog has grown from a small company blog into a valuable learning resource for thousands of developers worldwide. We’d like to give a big thank you to all the community contributors who made this possible by publishing articles on our blog. Sharing your knowledge is what has made this blog successful.</p><p>We’re excited to announce that the Apollo blog has a new home at <a href="https://www.apollographql.com/blog/"><strong>apollographql.com/blog</strong></a>! 🚀 Rest assured, we’ve migrated all of our articles over to <a href="https://www.apollographql.com/blog/">the new site</a>, so you don’t have to worry about missing your favorites.</p><h4>From Medium to Gatsby</h4><p>When we first started the Apollo blog in 2016, publishing on Medium was a natural choice because it allowed us to reach developers that may have not otherwise heard of us. It worked! Over the years, we amassed an audience of over 26,000 subscribers who enjoy learning about Apollo.</p><p>While we want our articles to reach as many developers as possible, that goal shouldn’t come at the expense of our readers. In recent months, we’ve been disappointed with Medium’s pop-ups and paywall that distract from the reading experience and restrict developers from accessing our content.</p><p>Instead, we decided to move off Medium in favor of creating <a href="https://www.apollographql.com/blog/">our own blog</a> with Gatsby, WordPress, and Netlify. Gatsby enables us to use React for our site’s frontend while querying WordPress at build time, resulting in a blog that’s fast, consistent with other Apollo sites like <a href="https://www.apollographql.com/docs/">the docs</a>, and easy to publish.</p><p>Our blog is <a href="https://github.com/apollographql/blog">open source</a>, so please file an issue if you have any feedback. Additionally, be on the lookout for a deep dive into how we built the Apollo blog from lead Developer Experience engineer <a href="https://medium.com/u/e9878a0ec91c">Trevor Blades</a>!</p><h4><strong>Contribute to our blog</strong></h4><p>We love community contributions to our blog, and we encourage you to <a href="https://www.apollographql.com/docs/community/blog-post-contributions/"><strong>submit a proposal</strong></a> if you have an idea you’d like to share.</p><p>Posting to the Apollo blog is an excellent way to get involved in the GraphQL community, gain exposure, and become a better technical writer. I know this from experience, since posting <a href="https://blog.apollographql.com/reducing-our-redux-code-with-react-apollo-5091b9de9c2a">my first article</a> to the Apollo blog eventually led to me joining the team. One thing that impressed me about my first experience contributing that still rings true today was how supportive the Apollo team was during the writing process.</p><p>Whether you’re new to technical blogging or an experienced writer, we’re here for you through every step of the way. Even if your idea isn’t fully formed, we’ll work with you to scope it down, shape it, and come up with an outline. Once you have a draft, we’ll help you edit it so it’s clear and concise. Finally, we’ll spotlight your post on our blog homepage and share it with thousands of developers on social media.</p><p>Blogging is one of the most effective ways to teach others while leveling up your own skills. What are you waiting for? <a href="https://www.apollographql.com/docs/community/blog-post-contributions/">Submit a proposal</a> and let us know what you think about the <a href="https://www.apollographql.com/blog/">new Apollo blog</a>. Happy reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42f11450c57c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/ready-for-takeoff-the-new-apollo-blog-42f11450c57c">Ready for takeoff: The new Apollo blog</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A new Apollo docs experience]]></title>
            <link>https://medium.com/apollo-stack/a-new-apollo-docs-experience-5645b9d56260?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/5645b9d56260</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[gatsby]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Fri, 29 Mar 2019 17:09:46 GMT</pubDate>
            <atom:updated>2019-03-29T17:09:46.426Z</atom:updated>
            <content:encoded><![CDATA[<h4>We rebuilt our docs, now powered by Gatsby themes!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vIn5MILVlF0YrL1jnnfFFg.png" /><figcaption>The new Apollo docs site 😍</figcaption></figure><p>As developers, we constantly interact with documentation. It’s what welcomes us to a project for the first time, it’s a trusted companion that guides us toward celebrating our first “Hello World,” and it’s the first place we turn when we’re frustrated with a bug or curious about a new feature.</p><p>Good documentation is at the heart of crafting an excellent developer experience, which is why we’re making a big investment in improving our docs at Apollo. Today, we’re excited to share the first big milestone on our journey: <strong>Apollo’s </strong><a href="https://www.apollographql.com/docs/"><strong>new docs site</strong></a><strong> built with Gatsby! </strong>🚀</p><h3>From Hexo to Gatsby</h3><p>Previously, our docs site was built with Hexo, a static site generator, and shared its theme with Meteor. Although we love our Meteor roots, the shared theme was becoming difficult for our team to maintain and evolve over time.</p><p>We wanted to migrate to React so we could share UI across all Apollo sites and add interactive elements to our docs. While I wouldn’t normally advocate for a rewrite, our team decided it was necessary in order to modernize our stack. Both our <a href="https://www.apollographql.com/">homepage</a> and the <a href="https://www.apollographql.com/">GraphQL Summit site</a> are built with <a href="https://www.gatsbyjs.org/">Gatsby</a>, so it was an easy choice for our new docs infrastructure.</p><h4>Gatsby themes</h4><p>With nearly 200 repositories in the <a href="https://github.com/apollographql">Apollo organization on GitHub</a>, it’s important that each project’s documentation lives alongside the code. When we first heard about <a href="https://www.gatsbyjs.org/blog/2018-11-11-introducing-gatsby-themes/">Gatsby’s new themes feature</a>, Apollo engineer <a href="https://medium.com/u/e9878a0ec91c">Trevor Blades</a> quickly built a proof-of-concept that confirmed it would be perfect for our needs.</p><p>Gatsby themes allow you to easily compose UI, configuration, and functionality across multiple sites. Themes are distributed as npm packages, and we use them for sharing versioning logic, constructing the left-hand navigation, common layout components, and more. Not only are Gatsby themes awesome for building docs sites, they’re also great for quickly spinning up derivative sites like <a href="https://principledgraphql.com/">Principled GraphQL</a>, which was built by extending <a href="https://github.com/apollographql/gatsby-theme-apollo/">gatsby-theme-apollo</a>.</p><p>We’ve been really happy with themes so far, and can’t wait to explore them further. Thank you to <a href="https://medium.com/u/8cb9e0fea905">Christopher Biscardi</a> and the rest of the Gatsby team for all their support along the way! 🤗</p><h3>Focusing on discoverability</h3><p>When designing our new UI, we wanted to focus on making our content more discoverable. Previously, our layout displayed too much information on the left sidebar, which made it difficult to find what you were looking for without scrolling. Apollo designer <a href="https://medium.com/u/12880b6da5ba">Jess Marina</a> rose to the challenge and created a cleaner layout and navigation structure to solve this pain point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qMxAIHgR4Zl-EhvZHjwwqg.png" /><figcaption>Before: Our old docs site was difficult to navigate.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHw4Hd3yInup9hNXskFR3w.png" /><figcaption>After: The content on our new docs site is easier to discover and read.</figcaption></figure><h4>Cleaner navigation 🗺</h4><p>For our new docs site, we removed article details from the left sidebar and added a navigation panel to the right of the screen to show users all the topics that would be covered on a page. We also made each section on the left sidebar expand and contract so users could zero in on the pages that are relevant to them.</p><h4>Prominent search 🕵️‍♀️</h4><p>Since our docs site spans a large breadth of content, we wanted to improve the search experience. We moved the search bar to a more prominent location, redesigned the search menu, and added a keyboard command to trigger search.</p><h3>Looking to the future</h3><p>We’re happy with the progress we’ve made toward improving the <a href="https://www.apollographql.com/docs/">Apollo docs</a> experience, but our work isn’t done yet! Over the next few months, we will be working on a refactor of our information architecture in order to help developers find what they’re looking for faster. Before embarking on this project, we will conduct user testing and publicize a plan to the Apollo community for feedback. If you’re interested in contributing, check out our <a href="https://spectrum.chat/apollo/docs">Docs channel on Spectrum</a> to learn more.</p><p>With our new infrastructure, we’ll also be able to support <a href="https://mdxjs.com/">MDX</a>, which will allow us to render React components alongside markdown in the same file. We’re super excited about the creative possibilities MDX will enable, especially with integrating more interactive elements into our docs. Some ideas we’ve started to explore include: interactive code blocks that compile TypeScript to JavaScript, expansion panels with step-by-step instructions, and embedding GraphiQL for running queries.</p><p>We can’t wait to see what the future holds for Apollo docs, and we hope you enjoy exploring the new site! If you have any feature requests or feedback on the site, please let us know by filing an issue in the <a href="https://github.com/apollographql/gatsby-theme-apollo">Gatsby theme repo</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F698465%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2F698465%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/d355523a1d568c7b2c271e9fe3cc4c56/href">https://medium.com/media/d355523a1d568c7b2c271e9fe3cc4c56/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5645b9d56260" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/a-new-apollo-docs-experience-5645b9d56260">A new Apollo docs experience</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GraphQL Summit 2019 Call for Proposals]]></title>
            <link>https://medium.com/apollo-stack/graphql-summit-2019-call-for-proposals-1d4df757fc0f?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d4df757fc0f</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Wed, 20 Mar 2019 18:28:19 GMT</pubDate>
            <atom:updated>2019-03-20T21:09:10.132Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtJiYexoxrFDoS1ayEUoXw.jpeg" /><figcaption>This could be you! Apply to speak at GraphQL Summit 2019</figcaption></figure><h4>Speak at the world’s largest GraphQL developer conference!</h4><p>We’re excited to welcome the GraphQL community back to San Francisco, CA for this year’s <a href="https://summit.graphql.com/">GraphQL Summit</a> at the Hyatt Regency on October 29–31, 2019. With over 1,200 developers expected to attend, this year’s edition will be bigger, better, and spookier than ever. 👻</p><p>At Summit, you’ll hear new ideas and learn best practices from GraphQL leaders, meet maintainers of open source GraphQL projects, and connect with passionate GraphQL developers from all around the world. For a taste of what to expect, check out last year’s <a href="https://www.youtube.com/playlist?list=PLpi1lPB6opQzSqSuIkDbIL7f73EXcjB_7">conference YouTube playlist</a>.</p><h3>Speak at Summit</h3><p>If you have ideas to share, we want to hear them! <a href="https://goo.gl/forms/JCYgExtTQM5FkuuG2"><strong>Our Call for Proposals is now open until May 24.</strong></a></p><h4>What we’re looking for</h4><p>Developers come to Summit to get inspired and take back knowledge they can share with their teams. We love talks that have a unique point of view, teach the audience something new, and push the GraphQL community forward.</p><p>GraphQL Summit welcomes developers of all experience levels and backgrounds. It’s important to us that our speaker lineup reflects a diverse balance of races, genders, and backgrounds, and we encourage underrepresented groups in tech and first-time speakers to apply. If you would like feedback on your proposal, we’re available to help at <a href="/service/mailto:speakers@graphql.com">speakers@graphql.com</a>.</p><h4>Themes</h4><p>This year’s event will be larger than ever, so we’ve organized our content program into themes to help attendees discover what’s relevant to them. We’ve included suggested talk topics for each theme in the <a href="https://goo.gl/forms/4kHKDvIbRYwumhc53">CFP</a>, but please don’t limit yourselves to our list. Let your creativity shine through! ✨</p><ul><li><strong>The GraphQL stack:</strong> How should today’s product teams think about integrating GraphQL into their stack? These talks should share practical knowledge that developers can use right away.</li><li><strong>Deep dives:</strong> Technical talks on GraphQL servers, clients, or the specification itself that appeal to an advanced/expert level audience.</li><li><strong>Spooky stories:</strong> Name a difficult challenge you faced and how you solved it. Did you take down your production GraphQL API and live to tell the tale? Let us know what you learned from that experience!</li><li><strong>GraphQL infrastructure:</strong> Talks for the architects, backend developers, and DevOps folks who keep our GraphQL APIs running smoothly.</li><li><strong>Creative uses of GraphQL:</strong> Have you used GraphQL in an unusual way? We want to hear about it!</li><li><strong>Community:</strong> This theme celebrates the GraphQL community and shows people how to get involved.</li></ul><h3>Join our featured speakers</h3><p>At GraphQL Summit, you’ll learn best practices and hear new ideas from a diverse group of GraphQL leaders from around the world. We’re excited to announce our first round of featured speakers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R8w22QkSCNiXRoA1us8z6A.png" /><figcaption>GraphQL Summit 2019 featured speakers</figcaption></figure><h4><a href="https://twitter.com/briebunge">Brie Bunge</a></h4><p>Brie is a Software Engineer at Airbnb. After an <a href="https://twitter.com/skevy/status/1093666338873126912">awesome talk at JSConf HI</a> on adopting TypeScript at scale, we’re thrilled to have Brie share her TypeScript expertise at Summit this year!</p><h4><a href="https://twitter.com/codebeast">Christian Nwamba</a></h4><p>Christian is a Senior Developer Advocate at Microsoft. Through his excellent talks on <a href="https://youtu.be/kGeTwLlq7r4">GraphQL vs. REST</a> and well-written fullstack <a href="https://pusher.com/tutorials/instagram-clone-part-2">tutorials</a>, Christian has inspired developers worldwide to learn GraphQL. We’re honored to have him speak at Summit!</p><h4><a href="https://twitter.com/sugarpirate_">Lauren Tan</a></h4><p>Lauren is an Engineering Manager at Netflix. Whether she’s <a href="https://youtu.be/y3uXazpAdwo">teaching type systems at React Rally</a> or exploring the strongly typed graph <a href="https://www.no.lol/2018-10-28-exploring-the-strongly-typed-graph/">on her blog</a>, Lauren’s content is always engaging, which is why we can’t wait to see her speak at Summit!</p><h4><a href="https://twitter.com/simona_cotin">Simona Cotin</a></h4><p>Simona is a Senior Developer Advocate at Microsoft. We’re eagerly anticipating her Summit talk, but in the meantime, check out her amazing talks on <a href="https://youtu.be/8m28hVaESaE">serverless GraphQL</a> or <a href="https://medium.freecodecamp.org/why-graphql-is-the-key-to-staying-out-of-technical-debt-7915f8f59a9">her newly released GraphQL video series</a>!</p><p>You could be next! If you’d like to join our featured speakers on stage, please <a href="https://goo.gl/forms/JCYgExtTQM5FkuuG2"><strong>submit a proposal to our CFP</strong></a>.</p><h3>Early Bird tickets on sale</h3><p>If you’re interested in attending GraphQL Summit, we recommend <a href="https://graphql-summit-2019.eventbrite.com/?aff=CFP">purchasing your ticket soon</a> to lock in the best price! There are a limited number of Early Bird passes available, and we sold out of our previous tiers much faster than we anticipated.</p><p>We will reimburse your ticket cost if you’re selected to speak. We will also open up discounted Community passes for GraphQL open source contributors soon, in addition to a diversity scholarship program for underrepresented groups in tech at the end of May.</p><p>We hope to see you at <a href="https://summit.graphql.com/">GraphQL Summit 2019</a> and look forward to reading <a href="https://goo.gl/forms/6BmPPQeZQVKGb6Sl2">your talk proposals</a>! 🎉 To connect with other developers attending the conference, check out our <a href="https://spectrum.chat/apollo/events">Spectrum channel</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F698465%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2F698465%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/d355523a1d568c7b2c271e9fe3cc4c56/href">https://medium.com/media/d355523a1d568c7b2c271e9fe3cc4c56/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d4df757fc0f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/graphql-summit-2019-call-for-proposals-1d4df757fc0f">GraphQL Summit 2019 Call for Proposals</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing React Apollo 2.1]]></title>
            <link>https://medium.com/apollo-stack/introducing-react-apollo-2-1-c837cc23d926?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/c837cc23d926</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[apollo]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Thu, 22 Mar 2018 20:31:49 GMT</pubDate>
            <atom:updated>2018-03-23T14:14:20.535Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HNxkwPyB0QoZ3qwrpSotGA.jpeg" /><figcaption>Blast off with our new Query components! 🚀</figcaption></figure><h4>A new render prop API, improved docs, and more!</h4><p>The wait is over! We’re super excited to announce <strong>React Apollo 2.1</strong>, a huge step forward in improving how you develop React applications with GraphQL. It features a new render prop API and <a href="https://dev-blog.apollodata.com/whats-next-for-react-apollo-4d41ba12c2cb">much stronger TypeScript support</a>, along with upgraded docs. It’s also 100% backwards compatible!</p><p>From the very beginning, React Apollo was designed to make building React apps with Apollo Client a delightful and intuitive experience. For a long time, this meant connecting data to your UI with higher order components. With React Apollo 2.1, using GraphQL data in your React app is now easier than ever thanks to our brand new components: Query, Mutation, and Subscription.</p><p>We’ve been working with these components exclusively for the past three months and have been amazed not only by how much they’ve improved our productivity, but also by how fun they are to build. Read on to learn more! 🚀</p><h3>Data fetching with Query</h3><p>Fetching data in a simple, declarative way is one of the core features of Apollo Client. We’re excited to improve upon that feature with our new Query component, which uses the render prop pattern to update your UI with your GraphQL data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c74fe3dfb8e97dda1a7f0fba764b49e0/href">https://medium.com/media/c74fe3dfb8e97dda1a7f0fba764b49e0/href</a></iframe><p>To create a Query component, just pass a GraphQL query to the query prop and provide a function as its child that returns the UI you want to render. This function, commonly referred to as a <a href="https://reactjs.org/docs/render-props.html">render prop function</a>, is called with your GraphQL query’s loading and error state, in addition to your data when it arrives. For a full list of properties on the render prop function, check out our <a href="https://www.apollographql.com/docs/react/essentials/queries.html#api">updated API overview</a>.</p><p>The render prop API allows for much greater flexibility than our old graphql higher order component, unlocking features such as dynamically choosing a query based on props and easily composing multiple queries. While the higher order component API is still useful, we think the new API more accurately reflects how developers are building React apps today.</p><h3>Updating data with Mutation</h3><p>If you thought fetching data with the Query component was cool, just wait until you try updating data with the new Mutation component! Mutation also uses the render prop pattern to pass down a function to trigger a mutation from your UI, in addition to the state of your mutation and any results.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e25f8a312864a2cf81a7e472cefde06/href">https://medium.com/media/9e25f8a312864a2cf81a7e472cefde06/href</a></iframe><p>In this example, toggleTodo is our mutate function that tells Apollo Client to fire off the mutation. We also receive information about its loading and error state, as well as any data returned. This is a vast improvement over creating mutation containers with the graphql higher order component because you no longer have to manually track the state of your mutation. We’ve also provided onError and onCompleted props to the Mutation component if you’d like to register any callbacks.</p><h3>Simplifying local state with ApolloConsumer</h3><p>React Apollo 2.1 introduces a new component, the ApolloConsumer, that allows you to easily access your Apollo Client instance directly via the render prop function. You can think of the ApolloConsumer component as similar to the Consumer component from the <a href="https://github.com/reactjs/rfcs/blob/master/text/0002-new-version-of-context.md">new React context API</a>.</p><p>One of the benefits of the ApolloConsumer component is that it drastically reduces the amount of code you need to write in order to perform simple local mutations with apollo-link-state. For one-off mutations like writing a string to the cache, there’s no need to set up a resolver or a GraphQL mutation! In your ApolloConsumer render prop function, just call writeData directly from your Apollo Client instance.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/24876beadb753c3f37b85ddcf5361bc7/href">https://medium.com/media/24876beadb753c3f37b85ddcf5361bc7/href</a></iframe><p>You can also use the ApolloConsumer component for <a href="https://www.apollographql.com/docs/react/essentials/queries.html#manual-query">firing queries manually</a> in response to a user action, like a button click, or for prefetching data.</p><h3>New docs &amp; tutorials</h3><p>With the React Apollo 2.1 release, we’re thrilled to finally share our revamped <a href="https://www.apollographql.com/docs/react/">docs site</a>, now with search and more tutorials! All of our docs improvements were specifically built with the community in mind, thanks to all the feedback you’ve shared with us on Twitter and Slack.</p><p>Not only did we refactor the code samples to Query and Mutation components, we also refactored the left-hand navigation to make core features like pagination and local state management more discoverable. In case you already know what you’re looking for, we reenabled search across all Apollo docs, thanks to <a href="https://medium.com/u/54c8047f8f10">Jesse Rosenberger</a>.</p><p>For this release, we wanted to ensure that the getting started experience with Apollo Client was approachable and interactive, so we built a new essentials section from the ground up. The <a href="https://www.apollographql.com/docs/react/essentials/get-started.html">Apollo essentials</a> section covers everything you need to start building your first Query and Mutation components quickly without overwhelming you with information. They feature tutorials on <a href="https://dev-blog.apollodata.com/zero-config-graphql-state-management-27b1f1b3c2c3">Apollo Boost</a>, Query components, Mutation components, and <a href="https://dev-blog.apollodata.com/the-future-of-state-management-dd410864cae2">Apollo Link State</a> accompanied by interactive examples on <a href="https://codesandbox.io/">CodeSandbox</a>.</p><p>We know that many of you will be migrating to the new render props API incrementally, so we’ve made the <a href="https://www.apollographql.com/docs/react/api/react-apollo.html#graphql">old docs</a> for the graphql higher order component available within the React Apollo API section.</p><h3>Contributors</h3><p>We’d like to thank <a href="https://medium.com/u/2e2136fb7ed0">Kevin Ross</a>, <a href="https://medium.com/u/b016d103ae51">Dirk-Jan Rutten</a>, and <a href="https://medium.com/u/82263c594756">Leonardo A Garcia C</a>, who tirelessly worked to help write, test, and improve the new render props API. We’re really happy with how flexible the Query, Mutation, and Subscription components are, and we can’t wait to see what all of you build with them!</p><p>For the past two months, many of our community members were brave enough to test out the beta version of React Apollo 2.1. We’d like to give a shoutout to all our early testers, especially content creators such as <a href="https://medium.com/u/86a55cd7983b">Wes Bos</a> and <a href="https://medium.com/u/b384aa92a080">Sara Vieira</a>, for your invaluable feedback on how to refine and teach the new components.</p><p>Finally, I’d like to give a special thanks to all of the Apollo team members who were involved in shipping this release, especially <a href="https://medium.com/u/fd3d3dea3cd3">James Baxley III</a> for his leadership over the project. It’s been awesome to see your vision for React Apollo evolve over the past two years.</p><h3>What’s next 🚀</h3><p>Our work isn’t done yet! We’re constantly looking to iterate upon the best way to build React apps with GraphQL. Here’s a sneak peek of some of the things on our mind that should be coming to React Apollo in the future:</p><ul><li>Today, you can manually fire queries either for prefetching or in response to a user action by creating an ApolloConsumer component, but you have to handle your own loading and error state. Soon, we’re looking to make <strong>manually firing queries</strong> a first-class feature in the Query component by adding a new delay prop and load action to the render prop function.</li><li>We’re eagerly anticipating the release of React 16.3 and its awesome features like the new context API. Once it arrives, we will release a new major version of React Apollo that’s 100% compatible with <strong>async strict mode</strong> and all of the latest features.</li><li>Beyond React 16.3, we can’t wait to start experimenting further with <a href="https://dev-blog.apollodata.com/a-first-look-at-async-react-apollo-10a82907b48e">integrating React Suspense into React Apollo</a>. We’ve already released a first proof of concept, and are curious to see where it goes!</li></ul><p>As always, we would love to hear your feedback about React Apollo 2.1 and the direction of the project. We hope you love it as much as we do! ❤️</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F64a355%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F64a355&amp;image=https%3A%2F%2Fucarecdn.com%2F83c581fe-a404-4dd3-b60c-ad9f5cb4b6ef%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2636327dd804c0413fe8ac3f5884859/href">https://medium.com/media/e2636327dd804c0413fe8ac3f5884859/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c837cc23d926" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/introducing-react-apollo-2-1-c837cc23d926">Introducing React Apollo 2.1</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A first look at Async React + Apollo]]></title>
            <link>https://medium.com/apollo-stack/a-first-look-at-async-react-apollo-10a82907b48e?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/10a82907b48e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[apollo-client]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[apollo]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Thu, 01 Mar 2018 20:43:58 GMT</pubDate>
            <atom:updated>2018-03-12T20:16:24.897Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*p4i9kWzWCEcKhHuywOo0lw.png" /></figure><h4>The suspense was killing us, so we built async React Apollo!</h4><p>Like many members of the React community, the Apollo team eagerly woke up at 5:00 AM to catch <a href="https://medium.com/u/a3a8af6addc1">Dan Abramov</a>’s talk on the future of React at <a href="https://www.facebook.com/react/videos/1552821821462886/">JSConf Iceland</a>. With big mugs of coffee in hand, we glued ourselves to our laptops and watched as Dan explained how React async rendering would allow us to adapt our applications to our users’ many devices and networks.</p><p>Showcasing two outstanding demos, Dan illustrated some of async React’s new features such as <strong>time slicing</strong> and <strong>suspense</strong>. We couldn’t wait to get our hands dirty with these new features, so we started experimenting with what it would take to make Apollo Client async-ready. Thanks to <a href="https://medium.com/u/fd3d3dea3cd3">James Baxley III</a>, we shipped a prerelease of React Apollo 3.0 that’s 100% strict mode compliant, which is essential in order for your library to be async compatible.</p><p>Read on to learn how we made React Apollo async compatible and built an <a href="https://medium.com/u/6025bd347b9a">Andrew Clark</a> inspired demo with GraphQL and Apollo! 🚀</p><h3>The suspense was killing us</h3><p>Optimizing fetching GraphQL data in your React app is something we’re constantly working on improving. That’s why we were thrilled to learn about React’s latest feature, suspense! Suspense lets you pause rendering a component while it’s loading async data. Here’s a step-by-step breakdown from Andrew about how it works:</p><h3>Andrew Clark on Twitter</h3><p>Here&#39;s how suspending works: - in the render method, read a value from the cache.</p><p>Let’s look at how Dan implemented data fetching with suspense in the I/O demo from his talk:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEA_ONb7mkwZaZ6j0Ab5pw.png" /><figcaption>Fetching data in render! 😮</figcaption></figure><p>Under the hood, the createFetcher function uses React’s new cache implementation called <a href="https://github.com/facebook/react/tree/master/packages/simple-cache-provider">simple-cache-provider</a> in order to suspend the request from within the render method. With React Apollo, we can mimic this functionality by suspending the result of our GraphQL query.</p><p>To turn on this feature in our Query component, it’s as easy as passing a new asyncMode prop. No other changes necessary!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/935737d09302734ecf7a967b525425e3/href">https://medium.com/media/935737d09302734ecf7a967b525425e3/href</a></iframe><p>How did we implement asyncMode? The snippet below is from our getQueryResult function inside React Apollo, which is called in the Query component’s render method. If we’re in async mode and we’re loading, which means the request isn’t found in Apollo’s cache, we <strong>throw</strong> the promise that will eventually resolve to the result of our query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-zxFfhRyPQb6ExUlD4Syw.png" /><figcaption>Throw promises in the air like you just don’t care! 🙌</figcaption></figure><p>Why are we throwing a promise here? 🤔 While this pattern might feel out of your comfort zone the first time you try it, it’s what allows React to suspend rendering until the promise is resolved. This unlocks the ability to handle loading state in a more thoughtful way by bubbling up the pending promise to a parent placeholder component. If the request time exceeds a threshold, the placeholder component can render a fallback UI until the request completes. This feature works similarly to <a href="https://reactjs.org/blog/2017/07/26/error-handling-in-react-16.html">error boundaries</a> created with componentDidCatch.</p><p>Suspense is also what allows React to pause low-priority updates like data fetching while continuing to render high-priority updates like entering text into a search input. Once the promise eventually resolves with our GraphQL result, React will continue rendering where it left off. You can think of pausing and resuming rendering as creating a branch and rebasing that branch onto master, as Dan eloquently explained in his talk.</p><h3>Tying it all together</h3><p>Once we shipped a prerelease of async React Apollo, we couldn’t wait to give it a spin in an example app. Luckily, wrapping REST endpoints with a <a href="https://github.com/apollographql/movie-database-graphql">GraphQL server</a> is our specialty, and with the power of GraphQL-specific caching built into <a href="https://www.apollographql.com/engine">Apollo Engine</a>, the app is blazing fast!</p><p>If you’d like to skip to the code, you can check out our example below on CodeSandbox. Warning: the React API that powers deferred state updates is unstable, so proceed with caution!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodesandbox.io%2Fembed%2Fgithub%2Fapollographql%2Fapollo-react-async-demo%2Ftree%2Fmaster%2F&amp;url=https%3A%2F%2Fcodesandbox.io%2Fs%2Fgithub%2Fapollographql%2Fapollo-react-async-demo%2Ftree%2Fmaster%2F&amp;image=https%3A%2F%2Fcodesandbox.io%2Fapi%2Fv1%2Fsandboxes%2F9yokprw694%2Fscreenshot.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codesandbox" width="1000" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/eeefad3774ec162b58b73a11a461b67b/href">https://medium.com/media/eeefad3774ec162b58b73a11a461b67b/href</a></iframe><p>Aside from setting the asyncMode flag on your Query component, you’ll notice not much has changed with how you build Apollo apps in an async React world vs. how you build them today. We want to help you take advantage of all the cool features async React has to offer without making you rewrite your entire application. Our goal is to bring you the best developer experience possible by empowering you to easily build performant, fluid applications with React and GraphQL.</p><h3>What’s next 🚀</h3><p>Our work isn’t done yet. We’re just scratching the surface of all the creative ways async rendering will enable us to build better user experiences with React and GraphQL.</p><p>One new feature we’re super excited to explore further is the <a href="https://github.com/facebook/react/tree/master/packages/simple-cache-provider">simple-cache-provider</a>. We think it will inspire new ways of thinking about the Apollo Client cache and future developments to help improve performance. We’re especially interested in testing out the <a href="https://github.com/facebook/react/tree/master/packages/simple-cache-provider">simple-cache-provider</a> low-level APIs that Dan mentioned in his talk. It’s possible that we could eventually hook into these APIs to normalize your GraphQL result before React’s commit phase.</p><p>If you’d like to give async React Apollo a spin, npm i react-apollo@canary and make sure to show us what you’ve built. The API is highly likely to change, especially as the React team starts to refine async APIs, so please don’t use it in production. That being said, we’d love to hear what you think and can’t wait to see how React Apollo 3.0 evolves.</p><p>A special thanks to the React team for their feedback on our post and for giving us early access to some of the new features! 👏 We look forward to collaborating further to ensure that all Apollo apps can fully benefit from all of async React’s exciting new features. If you are interested in helping us integrate Apollo with async React, come join us on Apollo Slack!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F64a355%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F64a355&amp;image=https%3A%2F%2Fucarecdn.com%2F83c581fe-a404-4dd3-b60c-ad9f5cb4b6ef%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2636327dd804c0413fe8ac3f5884859/href">https://medium.com/media/e2636327dd804c0413fe8ac3f5884859/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10a82907b48e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/a-first-look-at-async-react-apollo-10a82907b48e">A first look at Async React + Apollo</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zero-config GraphQL state management]]></title>
            <link>https://medium.com/apollo-stack/zero-config-graphql-state-management-27b1f1b3c2c3?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/27b1f1b3c2c3</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Thu, 15 Feb 2018 20:36:15 GMT</pubDate>
            <atom:updated>2018-03-29T17:45:50.279Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RuEeeHYNlKYBl_R9TwzMCA.png" /><figcaption>The newest limited edition Apollo Boosts 💁</figcaption></figure><h4>Meet apollo-boost, the easiest way to start using Apollo Client</h4><p>Recently, there have been a lot of exciting developments happening in the GraphQL client space. Some of these new clients, such as <a href="https://github.com/FormidableLabs/urql">urql</a> and <a href="https://github.com/arackaf/micro-graphql-react">micro-graphql-react</a>, were partially born from the idea that Apollo should be easier to get started with, especially for beginners. We’ve taken this constructive feedback to heart — that&#39;s why today, we’re announcing <a href="https://github.com/apollographql/apollo-client/tree/master/packages/apollo-boost">apollo-boost</a>, an easy-to-use booster kit for Apollo Client with our recommended configuration. 🚀 We’re really hyped about making GraphQL easier to learn with Apollo Boost and can’t wait to hear what you all think!</p><p>As of today, here’s how simple it is to get started with Apollo Client:</p><pre>import ApolloClient from &#39;apollo-boost&#39;;</pre><pre>const client = new ApolloClient();</pre><p>The longer you work on an open source project, the tougher it is to put yourselves in the shoes of someone who’s discovering the project for the first time. As library authors, we want to work harder at this. Our main goal is to make GraphQL more approachable and powerful for everyone. For us, building Apollo Boost was an awesome chance for us to focus on empathy, and we’re really happy with the outcome. 🤗</p><p>I encourage all of you to take a step back and practice empathy building your software too. At the same time, continue to provide valuable feedback toward the open source projects you love.</p><h3>Back to our roots</h3><p>From the beginning, the Apollo team has always strived to design tools that were simple to get started with, so you could send your first query right away. While Apollo Client 2.0’s modular architecture unlocked new possibilities for experienced users to customize their cache and network stack, it also deviated somewhat from our original goal of simplicity. First impressions are everything, and it’s important to us that beginners feel comfortable working with GraphQL. That’s why we’re returning back to our roots with apollo-boost!</p><p>If you’ve been with us since the 1.0 days, you’ll notice that the ApolloClient exported from apollo-boost looks familiar. With Apollo Boost, you no longer have to manually connect your cache and network stack to the client. We’ve already set up InMemoryCache and HttpLink for you by default. No heavy lifting required. 💪</p><h3>Get started</h3><p>Creating a client with Apollo Boost requires zero config to get started. We’ve included some packages that we think are essential for building an Apollo app, like apollo-link-error and apollo-link-state. You can activate these features by specifying a few options on the ApolloClient constructor and we’ll set them up for you behind the scenes.</p><p>Let’s dive in! First, you’ll want to install the following packages. We’re going to install the new <a href="https://dev-blog.apollodata.com/whats-next-for-react-apollo-4d41ba12c2cb">React Apollo 2.1 beta</a> so we can take advantage of Query components.</p><pre>npm i apollo-boost react-apollo@beta graphql -S</pre><p>Next, create your client and hook it up to your app by passing it to the ApolloProvider exported from react-apollo.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a33eb5ef6f73ffcf1f945baf49af24a9/href">https://medium.com/media/a33eb5ef6f73ffcf1f945baf49af24a9/href</a></iframe><p>Now that our app is up and running, let’s make our first query:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/185ca50d56635fc739a6506c7be5bb6b/href">https://medium.com/media/185ca50d56635fc739a6506c7be5bb6b/href</a></iframe><p>That’s it! If you need more customization, there are only six optional config properties you can pass to the Apollo Boost client:</p><ul><li>uri: Your GraphQL endpoint (defaults to /graphql)</li><li>fetchOptions: Static fetch options for every request</li><li>request: A function called every request that receives the operation. Here, you can implement authentication easily by dynamically setting headers on the context.</li><li>onError: An error handler function (our default logs out errors for you)</li><li>clientState: Your local state config for <a href="https://www.apollographql.com/docs/link/links/state.html">apollo-link-state</a></li><li>cacheRedirects: Functions for redirecting queries to another entry in the cache (previously called cache resolvers)</li></ul><h4>Advanced migration</h4><p>If you’re looking to integrate custom links into your Apollo Link stack that aren’t already included in Apollo Boost, migration is simple. Apollo Boost exports some of the building blocks of Apollo Client, like HttpLink and InMemoryCache, for you so you don’t have to reinstall all of the individual packages. In the future, we’d love to have an eject feature that writes your client setup for you automatically.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9050da876f06eff2044ffc59f23e5bf9/href">https://medium.com/media/9050da876f06eff2044ffc59f23e5bf9/href</a></iframe><h3>🔥 New 🔥</h3><p>In addition to Apollo Boost, we’ve also made some improvements to the docs, along with a new example app on CodeSandbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wkzOCXWu_aSvEhhMtZudHA.png" /><figcaption>Choose your favorite pup!</figcaption></figure><ul><li><a href="https://codesandbox.io/s/r5qp83z0yq"><strong>Pupstagram</strong></a><strong>:</strong> Our new example app 🐶 (aka what I wish my Instagram feed was). It features Apollo Boost, local state management with apollo-link-state, and more! For the GraphQL server, check out our <a href="https://launchpad.graphql.com/nx9zvp49q7">Launchpad</a>.</li><li><a href="https://www.apollographql.com/docs/react/essentials/get-started.html"><strong>Quick Start</strong></a><strong>:</strong> Go from zero to your first queries &amp; mutations in less than 10 minutes with Apollo Boost.</li><li><a href="https://www.apollographql.com/docs/react/why-apollo.html"><strong>Why Apollo</strong></a><strong>:</strong> Wondering why we normalize our cache? Need a document to convince your team to switch to Apollo Client? It’s all right here.</li></ul><p>With the release of Apollo Boost, we’ve sunset the apollo-client-preset proof of concept which served as inspiration. For backwards compatibility, everything that was included in the old preset is included in apollo-boost. Simply change your import and you should be good to go! Thanks to everyone who helped test out apollo-client-preset.</p><h3>Inspiration</h3><p>Apollo Boost was largely inspired by the simplicity of <a href="https://formidable.com/blog/2018/introducing-urql/">urql</a>, the newest GraphQL client on the block. We’d like to give a big thank you to <a href="https://medium.com/u/e50c25098d37">Ken Wheeler</a> and the team at Formidable Labs for challenging us to rethink how we could improve the developer experience for our users. We’re grateful for the opportunity to learn from your work.</p><p>It’s super exciting to see newcomers popping up in the GraphQL ecosystem because we all get to build upon each other’s successes. I firmly believe that competition is healthy for open source projects to keep innovating. As long as more developers are getting hyped about GraphQL and how it can improve their team’s productivity, we welcome anyone entering the space.</p><p>Finally, we’d also like to thank all of you! Our team loves hearing honest feedback from the community, whether it’s positive or constructive. If you have any ideas on how we can make your experience with Apollo better, just drop us a message on Twitter or Slack.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F64a355%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F64a355&amp;image=https%3A%2F%2Fucarecdn.com%2F83c581fe-a404-4dd3-b60c-ad9f5cb4b6ef%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2636327dd804c0413fe8ac3f5884859/href">https://medium.com/media/e2636327dd804c0413fe8ac3f5884859/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27b1f1b3c2c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/zero-config-graphql-state-management-27b1f1b3c2c3">Zero-config GraphQL state management</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The future of state management]]></title>
            <link>https://medium.com/apollo-stack/the-future-of-state-management-dd410864cae2?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd410864cae2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Thu, 21 Dec 2017 21:42:00 GMT</pubDate>
            <atom:updated>2018-04-06T09:19:53.123Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YfE1f2lBr0hnpcRESiUy1w.png" /><figcaption>Querying an application’s state in Apollo DevTools</figcaption></figure><h4>Managing your local data in Apollo Client with apollo-link-state</h4><p>When an application grows in size, its state often grows in complexity. As developers, we’re not only tasked with juggling data from multiple remote servers, but also with handling local data resulting from UI interactions. To top it off, we have to store all of this data in a way that’s easily accessible from any component in our application.</p><p>Thousands of developers have told us that Apollo Client excels at managing remote data, which equates to roughly <strong>80%</strong> of their data needs. But what about local data (like global flags and device API results) that make up <strong>the other 20%</strong> of the pie?</p><p>Historically, Apollo users managed that 20% in a separate Redux or MobX store. This was a doable solution for Apollo Client 1.0, but when Apollo Client 2.0 migrated away from Redux, syncing local and remote data between two stores became trickier. We often heard from our users that they wanted to encapsulate all of their application’s state inside Apollo Client and maintain <strong>one source of truth</strong>.</p><h3>Building upon a solid foundation</h3><p>We knew we had to solve this problem, so we asked ourselves: What would it look like to manage state in Apollo Client? First, we thought about what we liked about Redux — features like its dev tools and binding state to components via connect. We also thought about some of our pain points with Redux, like its boilerplate and its do-it-yourself approach to core features like asynchronous action creators, caching, and optimistic UI.</p><p>To create our ideal state management solution, we wanted to build upon what makes Redux great while addressing some criticisms of it. We also wanted to leverage the power of GraphQL to request data from multiple sources in one query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHTs1iOH247NQLEOxXzHFw.png" /><figcaption>An architecture diagram of the data flow in Apollo Client</figcaption></figure><h3>Learn once, GraphQL anywhere</h3><p>One common misconception about GraphQL is that it’s coupled to a specific server implementation. In fact, it’s much more flexible than that. It doesn’t matter if you’re requesting from a <a href="https://github.com/iheanyi/go-grpc-graphql-simple-example">gRPC server</a>, <a href="https://github.com/apollographql/apollo-link-rest">REST endpoint</a>, or your <a href="https://github.com/apollographql/apollo-link-state">client-side cache</a> — GraphQL is a <strong>universal language for data</strong> that’s completely agnostic of its source.</p><p>This is why GraphQL queries and mutations are a perfect fit for describing what’s happening with our application’s state. Instead of dispatching actions, we use GraphQL mutations to express state changes. We can access our state by declaratively expressing our component’s data requirements with a GraphQL query.</p><p>One of the biggest advantages of GraphQL is that we can aggregate data from multiple sources, both local and remote, in one query by specifying GraphQL directives on our fields. 🎉 Let’s find out how!</p><h3>State management with Apollo Client</h3><p>Managing your local data in Apollo Client is made possible by <a href="https://www.apollographql.com/docs/link/">Apollo Link</a>, our modular network stack that allows you to hook into the GraphQL request cycle at any point. To request data from a GraphQL server, we use HttpLink, but to request local data from our cache we need to install a new link: apollo-link-state.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5996ad95969f3162c845fca8cebfbc66/href">https://medium.com/media/5996ad95969f3162c845fca8cebfbc66/href</a></iframe><p>To create your state link, use the withClientState function and pass in an object with resolvers, defaults, and your Apollo cache. Then, concatenate your state link to your link chain. Your state link should come before your HttpLink so local queries and mutations are intercepted before they hit the network.</p><h4>Defaults</h4><p>Your defaults are an object representing the initial state that you would like to write to the cache upon creation of the state link. While not required, it’s important to pass in defaults to warm the cache so that any components querying that data don’t error out. The shape of your defaults object should mirror how you plan to query the cache in your application.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d67c19b67853bceb6fe56cc638c014a/href">https://medium.com/media/4d67c19b67853bceb6fe56cc638c014a/href</a></iframe><h4>Resolvers</h4><p>When we manage state with Apollo Client, our Apollo cache becomes our single source of truth for all the local and remote data in our application. How do we update and access the data in the cache? That’s where our resolvers come in. If you’ve worked with graphql-tools on the server, the type signature of resolvers on the client are identical:</p><pre>fieldName: (obj, args, context, info) =&gt; result;</pre><p>No worries if this is unfamiliar to you, the two most important things to note here are that your query or mutation variables are passed in as the second argument and the cache is automatically added to the context for you.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa41635ffdb2420f6af5ff37701a88c3/href">https://medium.com/media/fa41635ffdb2420f6af5ff37701a88c3/href</a></iframe><p>To write data to the root of the cache, we call cache.writeData and pass in our data. Sometimes what we’re writing to the cache depends on the data that was previously there, like in our mutation addTodo above. In that case, you can use cache.readQuery to read from the cache before you perform a write. If you would like to write a fragment to an existing object in the cache, you can optionally pass in an id, which corresponds to the object’s cache key. Since we’re using the InMemoryCache, the key is __typename:id.</p><p>apollo-link-state supports asynchronous resolver functions, which is useful for performing async side effects like accessing device APIs. However, we don’t recommend calling REST endpoints in your resolvers. Instead, use <a href="https://github.com/apollographql/apollo-link-rest">apollo-link-rest</a>, which has its own @rest directive.</p><h4>@client directive</h4><p>When we trigger a mutation from our UI, Apollo’s network stack needs to know whether to update the data on the client or the server. apollo-link-state uses an @client directive to specify client-only fields. Then, apollo-link-state calls the resolvers for those fields.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ef2b199209ff179bb4e71c59813659c/href">https://medium.com/media/9ef2b199209ff179bb4e71c59813659c/href</a></iframe><p>Queries look very similar to mutations. If you are performing any asynchronous actions in your query, Apollo Client will track loading and error states for you. For React, you’ll find these states on this.props.data, along with numerous helper methods for refetching, pagination, and polling.</p><p>One exciting feature is that you can request from multiple data sources in one query! 😍 In this example, we’re requesting a user from our GraphQL server in addition to the visibilityFilter in the Apollo cache.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80a5f25b0205c0ff696c188bdc78354e/href">https://medium.com/media/80a5f25b0205c0ff696c188bdc78354e/href</a></iframe><p>For more examples and tips for integrating apollo-link-state into your application, head on over to our <a href="https://www.apollographql.com/docs/link/links/state.html">updated docs page</a>.</p><h3>Roadmap to 1.0</h3><p>Even though apollo-link-state is stable enough to use in your application today, there are some features we’d like to tackle soon:</p><ul><li><strong>Client-side schema:</strong> Right now, we don’t have support for type validation against a client-side schema. This is because including the graphql-js modules for constructing and validating a schema at runtime would dramatically increase your bundle size. Instead, we hope to move schema construction to build time with support for introspection so you can still take advantage of all the cool features in GraphiQL.</li><li><strong>Helper components:</strong> Our goal is to make state management in Apollo as seamless as possible. We’d like to write some React components to reduce some of the verbosity for performing common tasks like passing a variable into a mutation while still implementing it as a mutation under the hood.</li></ul><p>If these problems sound interesting to you, come join us on <a href="https://github.com/apollographql/apollo-link-state">GitHub</a> or the #local-state channel on <a href="http://apollographql.com/slack">Apollo Slack</a>. We’d love to have you on board to help shape the next generation of state management! 🚀</p><figure><a href="https://www.apollographql.com/engine?utm_source=medium&amp;utm_medium=social&amp;utm_campaign=engine-feat-201804"><img alt="" src="https://cdn-images-1.medium.com/max/950/1*zHlANoouusZ92unyBjkL5A.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd410864cae2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/the-future-of-state-management-dd410864cae2">The future of state management</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS AppSync, powered by Apollo]]></title>
            <link>https://medium.com/apollo-stack/aws-appsync-powered-by-apollo-df61eb706183?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/df61eb706183</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[apollo]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Wed, 29 Nov 2017 19:39:42 GMT</pubDate>
            <atom:updated>2017-11-29T19:39:42.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6JddphzzdGQqnyZvOOQVsA.png" /><figcaption>The AWS team previewing AppSync at reInvent</figcaption></figure><h3>AWS AppSync, built with Apollo</h3><h4>A first look at Amazon’s newest GraphQL product</h4><p>Yesterday at reInvent, <a href="https://aws.amazon.com/blogs/aws/introducing-amazon-appsync/">Amazon launched AppSync</a>, a new GraphQL service featuring real-time updates and built-in offline support. Managed in the AWS console, AppSync’s GraphQL layer aggregates data from other AWS products such as ElasticSearch and DynamoDB. In your application, you query your GraphQL API with the AppSync Client, available for web and native.</p><p>The AppSync announcement got a lot of love from the developer community, and it’s easy to see why people are excited about GraphQL! Architecting your application with GraphQL enables you to build complex features quickly by simply describing your data requirements and letting your GraphQL layer take care of the rest. Companies like <a href="https://open.nytimes.com/the-new-york-times-now-on-apollo-b9a78a5038c">the New York Times</a>, <a href="https://dev-blog.apollodata.com/courseras-journey-to-graphql-a5ad3b77f39a?_ga=2.74751445.653517459.1511971836-1820713705.1508389092">Coursera</a>, and <a href="https://dev-blog.apollodata.com/changing-the-architecture-of-express-com-23c950d43323">Express</a> have led the way by powering their most important applications with GraphQL.</p><p>Naturally, we were curious to learn more about AppSync. Once we dug into the open-source code, we were excited to see that the AppSync Client implementations are based on the same MIT-licensed Apollo technology you know and love: <a href="https://github.com/apollographql/apollo-client">Apollo Client 2.0</a>, <a href="https://github.com/apollographql/apollo-ios">Apollo iOS</a>, and <a href="https://github.com/apollographql/apollo-codegen">Apollo Codegen</a>! Read on to learn how different components of these Apollo projects power some of the coolest features of the AppSync platform.</p><h3>Leveraging Apollo Client’s extensibility</h3><p>Last month, we officially released <a href="https://dev-blog.apollodata.com/apollo-client-2-0-5c8d0affcec7">Apollo Client 2.0</a> at GraphQL Summit 2017. In addition to making it smaller and faster, one of our main goals was to also make it much more modular. You now have the ability to plug in your own cache and tailor your network stack to your application’s requirements with <a href="https://www.apollographql.com/docs/link/">Apollo Link</a>.</p><p>It turns out that Apollo Client 2.0’s modular architecture was a huge win for developers looking to customize their GraphQL client, because that’s exactly how the AWS team was able to build <a href="https://github.com/awslabs/aws-mobile-appsync-sdk-js/blob/254930e3de1211c20bbac3efadf571008826bc32/packages/aws-appsync/src/client.js">AppSync Client</a>!</p><figure><a href="https://github.com/awslabs/aws-mobile-appsync-sdk-js/blob/254930e3de1211c20bbac3efadf571008826bc32/packages/aws-appsync/src/client.js"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H-kRiLcPhirYQ537zDCpUA.png" /></a><figcaption>AWS AppSync leverages the modular architecture of Apollo Client</figcaption></figure><p>In only a few weeks, the AWS team was able to make complex features like offline support and authentication a reality by extending the Apollo InMemoryCache and using Apollo Link to customize their network interface. We think this is a testament to the extensibility of Apollo Client and hope their example inspires more teams to experiment with personalizing their GraphQL client. Let’s dive into how AWS accomplished this.</p><h4>Apollo Link enables offline support</h4><p>To achieve offline support, the AWS team created a <a href="https://github.com/awslabs/aws-mobile-appsync-sdk-js/blob/254930e3de1211c20bbac3efadf571008826bc32/packages/aws-appsync/src/link/offline-link.js">custom Apollo Link</a> that takes a Redux store augmented by <a href="https://github.com/redux-offline/redux-offline">redux-offline</a> for persistence. This link also queues up any pending mutations and calls to refetch queries when the device is offline and stores them in a Redux subtree to be executed when the device goes back online. Since the AppSync Client is based on Apollo Client, you still get the benefit of optimistic UI responses even if the device is offline when the mutation is fired.</p><h3>AWS re:Invent on Twitter</h3><p>Using AWS SDK for Mobile development will give you Automatic offline support out of the box @saligramkarthik #reInvent</p><p>We’re also working on improving the offline experience to create easy persistence that isn’t dependent on Redux and advanced features such as applying a timeout to the offline mutation queue to avoid potential conflicts. If you’d like to learn more about these initiatives, come <a href="https://github.com/apollographql/apollo-cache-asyncstorage/issues/6">join the party</a> on the apollo-cache-asyncstorage repo! 🎉 We’d love to hear your input and welcome any contributions.</p><h4>Real-time data with GraphQL subscriptions</h4><p>One AppSync feature that generated a lot of buzz is its emphasis on real-time data. Under the hood, AppSync’s real-time feature is powered by GraphQL subscriptions. While Apollo bases its subscriptions on WebSockets via <a href="https://github.com/apollographql/subscriptions-transport-ws">subscriptions-transport-ws</a>, subscriptions in GraphQL are actually flexible enough for you to base them on another messaging technology. Instead of WebSockets, AppSync’s subscriptions use MQTT as the transport layer.</p><p>The AWS team even <a href="https://github.com/awslabs/aws-mobile-appsync-sdk-js/blob/254930e3de1211c20bbac3efadf571008826bc32/packages/aws-appsync/src/link/subscription-handshake-link.js">wrote their own Apollo Link</a> to execute subscriptions over MQTT, which we think is a really cool use case. If you’d like to integrate real-time features into your application in only a few lines of code with Apollo Link, <a href="https://www.apollographql.com/docs/react/features/subscriptions.html#subscriptions-client">please check out our example</a> which serves queries &amp; mutations over HTTP and subscriptions over WebSockets. We’d also like to hear from you on the <a href="https://github.com/apollographql/subscriptions-transport-ws">subscriptions-transport-ws</a> repo if you have any suggestions on how to improve our transport layer.</p><h3>Native client with Apollo iOS &amp; Apollo Codegen</h3><p>Another cool feature of AWS AppSync is that it’s compatible with different platforms. It works with JavaScript and also with native platforms written in Swift. One of our main goals for Apollo is that you can use it with any type of architecture, which is why we collaborated with the community on <a href="https://github.com/apollographql/apollo-ios">Apollo iOS</a> and <a href="https://github.com/apollographql/apollo-android">Apollo Android</a>. It’s exciting to see AppSync builds on that foundation to power their <a href="https://github.com/awslabs/aws-mobile-appsync-sdk-ios/tree/3fbd248440115d1b913fabc9290eb9d7d4bc9a9b/AWSAppSyncClient/Apollo/Sources/Apollo">native client</a>!</p><figure><a href="https://github.com/awslabs/aws-mobile-appsync-sdk-ios/tree/3fbd248440115d1b913fabc9290eb9d7d4bc9a9b/AWSAppSyncClient/Apollo/Sources/Apollo"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FlStKWxJaO4x-Oc4vGFyFA.png" /></a><figcaption>AppSync’s iOS client is based on Apollo iOS</figcaption></figure><p>To generate Swift types from AppSync’s GraphQL layer, AWS uses a <a href="https://github.com/awslabs/aws-appsync-codegen/tree/6c5ddf4e589813695d4bdcca665776d4614205c7">customized version of Apollo Codegen</a>. <a href="https://github.com/apollographql/apollo-codegen">Apollo Codegen</a> is a build tool that uses your GraphQL schema and queries to output types for a variety of different language targets: Flow, TypeScript, Java, Scala, and Swift.</p><p>We’re constantly working with the community to continuously improve the language targets; for example, <a href="https://medium.com/u/2ab2eb7f698c">Lewis Chung</a> from Coursera <a href="https://github.com/apollographql/apollo-codegen/pull/296">published a revision</a> to the Flow &amp; TypeScript targets just this week! If you’re interested in generating static types from GraphQL and would like to strengthen the generated code or support additional targets like Reason, please reach out! We’d love to welcome you on board.</p><h3>A bright future 🚀</h3><p>AWS AppSync is an excellent example of how teams can create innovative products quickly by using the Apollo family of tools. We’re so excited to see that Apollo works well as an extensible platform for developing customized GraphQL client tooling.</p><p>With our solid foundation in place, we can’t wait to see more people build upon the Apollo platform to push the GraphQL ecosystem forward! If you’re interested in collaborating with us to create the next generation of GraphQL tooling, <a href="https://www.apollographql.com/docs/community/">learn more</a> on our contributor site. We’d love to hear from you! 🤗</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F64a355%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F64a355%2F&amp;image=https%3A%2F%2Fucarecdn.com%2F83c581fe-a404-4dd3-b60c-ad9f5cb4b6ef%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/31f4836948a9fc1a46f3f7f0769b75d9/href">https://medium.com/media/31f4836948a9fc1a46f3f7f0769b75d9/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df61eb706183" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/aws-appsync-powered-by-apollo-df61eb706183">AWS AppSync, powered by Apollo</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apollo Client 2.0: Beyond GraphQL APIs]]></title>
            <link>https://medium.com/apollo-stack/apollo-client-2-0-beyond-graphql-apis-888807b53afe?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/888807b53afe</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[apollo]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Tue, 14 Nov 2017 19:27:15 GMT</pubDate>
            <atom:updated>2017-11-14T19:27:15.101Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YTCO6wvrTyAUdQoKo-gLug.png" /></figure><h4>Learn how to manage all your app data with Apollo in my talk from GraphQL Summit 2017</h4><p>Apollo Client 1.0 was all about taking data from your GraphQL server and attaching it to your UI components. That’s a really important aspect of building an application that we’ve made faster, simpler, and more powerful in Apollo Client 2.0. But with the newly released version, you can actually use GraphQL to do much more than just load data from a server. You can use the same query language to manage your client-side data and even fetch from non-GraphQL APIs!</p><p>This is exactly what I explored in my talk at this year’s <a href="http://summit.graphql.com/">GraphQL Summit</a>. Check out the video below, or if videos aren’t your jam, keep on reading to learn how Apollo Client 2.0 can simplify managing all of your application’s data, including local &amp; REST data.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FeHjP2WFt0zU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DeHjP2WFt0zU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FeHjP2WFt0zU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/87bbb13bf7093a215b7b71d53f5ed684/href">https://medium.com/media/87bbb13bf7093a215b7b71d53f5ed684/href</a></iframe><h3>A solid foundation</h3><p>Over the past year, <a href="https://github.com/apollographql/apollo-client">Apollo Client</a> has seen astounding growth, with over 2.5 million downloads on npm &amp; nearly 5,000 stars on GitHub. I think a lot of this success can be attributed to the fact that Apollo removes a ton of front-end complexity for React, Angular, and Vue developers alike. All you have to do is describe exactly the data you want from your server with GraphQL, bind it to your component, and let Apollo Client take care of the rest.</p><p>The benefits of building your application with Apollo extend far beyond the ability to easily retrieve data from a GraphQL server. With Apollo Client, you no longer have to worry about fetching data, transforming the response, normalizing, and caching it. Features that normally require significant coding, such as optimistic UI updates, pagination, and prefetching data, become trivial to execute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_sKgCdObEd1x0cmGAU16NQ.png" /><figcaption>A diagram explaining the data flow in Apollo Client</figcaption></figure><h3>What’s new with Apollo Client 2.0</h3><p>How did we improve upon an already solid foundation with Apollo Client 2.0? The newest version is 2–5x faster, 40% smaller, and most users can upgrade by changing <a href="https://www.apollographql.com/docs/react/2.0-migration.html#basic">only 5 lines of code</a>. The main difference is our revamped modular architecture that paves the way for the future of GraphQL — things like streaming data, custom directives, and individualized caching.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ugaFalqX7fprLqPTLnb-ww.png" /><figcaption>An overview of Apollo Client 2.0’s new modular architecture</figcaption></figure><h4>Cache</h4><p>We know caching is never one size fits all, so with Apollo Client 2.0 you can now easily swap out our default in-memory cache with your own implementation. We’ve already started to see community members build their own with great success, like the team at Convoy did with their <a href="https://github.com/convoyinc/apollo-cache-hermes">graph-based cache Hermes</a>. I’m super excited to see the community get creative with their Apollo Client caches in the upcoming weeks; for example, I’d love to see an integration for React Native AsyncStorage or MobX. If you have an idea, please don’t hesitate to get in touch by pinging me on Twitter<a href="http://twitter.com/peggyrayzis"> @peggyrayzis</a>!</p><h4>Network stack</h4><p>Our new interface for personalizing your network stack is called <a href="https://www.apollographql.com/docs/link/">Apollo Link</a>. Links are powerful because they allow you to hook into the request cycle at any point to manipulate how you process &amp; retrieve your data. They’re backed by Observables, instead of promises, so you can return multiple results from one operation.</p><p>With only a few lines of code, you can create your own links and compose them together to fully manage your data flow from beginning to end. Here, we’re using the ApolloLink.split utility method to branch our request by serving subscriptions over WebSockets and queries &amp; mutations over HTTP. The first argument to a link gives you full access to your query, which enables you to determine how to retrieve your data and what happens with the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GDMbcu8be9mHdCDgAGi7VA.png" /><figcaption>An example of Apollo Link composition using split</figcaption></figure><p>If we can hook into the request cycle at any point with Apollo Link, then we can start to get really creative with how we process and retrieve our data. The last half of my talk dives into some experimental features that are now possible because of Apollo Link. Let’s get weird! 😜</p><h3>Unlocking a universe of possibilities</h3><p>Remember our diagram from earlier in the post where data was loaded from a GraphQL server? What if we could switch that GraphQL server out with <em>something else</em>? Since Apollo Link allows you to determine where you’re retrieving your data from based on a GraphQL operation, <strong>you can theoretically request data from anywhere</strong>. As long as the data coming back is JSON or an object, you should be able to query your source using GraphQL and get back whatever you want.</p><p>Apollo Link opens up the door to unlimited possibilities. What if we could query local data in your application and store it in Apollo Client? This includes things like network status, routing, or anything you currently use Redux or MobX for. By integrating your client-side data into Apollo Client, you get the same awesome features like built-in caching and ease of querying with GraphQL, without having to set up and maintain a second store.</p><h4>Client-side state management</h4><p>This is exactly what we’re proposing with <a href="https://github.com/apollographql/apollo-link-state">Apollo Link State</a>, our solution for managing client-side data entirely in Apollo Client. Thanks to <a href="https://medium.com/u/fd3d3dea3cd3">James Baxley</a>, Apollo Link State is already out, and although it’s in a very early stage, we’re excited about its potential! To set it up in your application, you will pass a resolver map to your state link that determines how you’ll read &amp; write your local data to the cache. If you’ve worked with <a href="https://www.apollographql.com/docs/graphql-tools/resolvers.html#Resolver-map">graphql-tools</a> before, the API will look familiar. The main difference here is that the cache is added to the context so you can manipulate it directly like you would a database on the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vxex3hXlvlvDvJ4CQGhkPg.png" /><figcaption>What a resolver map could look like in Apollo Link State</figcaption></figure><p>What would our query requesting local data look like? By annotating a client-side field with the @client directive, the state link will be able to process the operation and tell it to resolve from the cache.</p><p>We can also query data from a REST endpoint in a similar way. By marking a field with the @rest directive, we can hit our REST endpoint and store exactly the data we request in Apollo Client side by side with our local and GraphQL server data. A contributor has already started working on a <a href="https://github.com/n1ru4l/graphql-schema-generator-rest">similar implementation</a> and we hope to have an official version of Apollo Link REST out soon. Eventually, you’ll be able to combine all of these directives and request from multiple data sources in one query! 😍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Is30UY_h-KNAAb1Zt1FSRg.png" /><figcaption>Using @client and @rest directives to request data from anywhere</figcaption></figure><p>Now that Apollo Link enables us to request data from anywhere, we can use Apollo Client to manage <strong>all</strong> of our application’s data. No more action creators, reducers, or maintaining a separate store! All you need to do is write queries with GraphQL and let Apollo Client take care of the rest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CkQE19RaFwpwKZ60SN96ew.png" /><figcaption>Apollo Client 2.0 is your universal data solution</figcaption></figure><p>Whether you’re requesting data from a REST endpoint, your application, or a GraphQL server, Apollo Client 2.0 is truly a universal data solution. The new modular architecture is flexible and extensible, so you can tailor your network stack and cache implementation to your application’s needs. Since Apollo Client is decoupled from the view layer, React, Angular, and Vue developers can all benefit from these advancements.</p><h3>Get started 🚀</h3><p>If you would like to test out Apollo Client 2.0, here are some example projects to get you started:</p><ul><li><strong>React:</strong> <a href="https://codesandbox.io/s/jvlrl98xw3">https://codesandbox.io/s/jvlrl98xw3</a></li><li><strong>Angular:</strong> <a href="https://github.com/kamilkisiela/apollo-angular-ssr">https://github.com/kamilkisiela/apollo-angular-ssr</a></li><li><strong>Vue:</strong> <a href="https://codesandbox.io/s/3vm8vq6kwq">https://codesandbox.io/s/3vm8vq6kwq</a></li></ul><p>We’d love to welcome you to our community and are eager to hear your feedback on the latest version of Apollo Client. <a href="https://www.apollographql.com/docs/community/">Here’s how to get involved</a>!</p><p><em>For more awesome GraphQL content, keep an eye on our YouTube channel to see more talks from GraphQL Summit 2017. Make sure to </em><a href="http://youtube.com/apollographql"><em>subscribe</em></a><em> so you don’t miss a beat! </em>😊</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F64a355%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F64a355%2F&amp;image=https%3A%2F%2Fucarecdn.com%2F83c581fe-a404-4dd3-b60c-ad9f5cb4b6ef%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/31f4836948a9fc1a46f3f7f0769b75d9/href">https://medium.com/media/31f4836948a9fc1a46f3f7f0769b75d9/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=888807b53afe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/apollo-client-2-0-beyond-graphql-apis-888807b53afe">Apollo Client 2.0: Beyond GraphQL APIs</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I cancelled my ReactiveConf talk]]></title>
            <link>https://medium.com/@peggyrayzis/why-i-cancelled-my-reactiveconf-talk-3a463bf14bd8?source=rss-c827782c6410------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a463bf14bd8</guid>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Peggy Rayzis]]></dc:creator>
            <pubDate>Wed, 01 Nov 2017 18:21:09 GMT</pubDate>
            <atom:updated>2017-11-15T06:13:54.903Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQCBbHeDm8CcB5sBTDITrw.jpeg" /></figure><p>What would you do if conference organizers themselves committed a Code of Conduct violation against you?</p><p>This was the precise situation I found myself in recently the night before I was scheduled to speak at ReactiveConf, a React community conference hosted in Bratislava. I’d already travelled halfway across the world to attend, put weeks of work into a talk and slides I was excited to present, and was missing a company onsite for the team I’d just joined.</p><p>ReactiveConf’s <a href="http://confcodeofconduct.com/">Code of Conduct</a> states that <strong>“harassment includes … sexual images in public spaces”</strong>, and makes a point to remind event sponsors <strong>“to not use sexualized images… or otherwise create a sexualized environment”</strong>. That is why it was a shock to receive my speaker gift just before the speakers’ dinner at the end of day one, only to see that the conference organizers had photoshopped my face onto a sexualized image of Wonder Woman without my consent, printed it out, and framed it. On top of that, this was the image they had intended to display on the big screen before my talk to 1000+ attendees, as they had already done for speakers earlier that day.</p><h3>An uphill battle</h3><p>As a woman in the tech industry, being taken seriously is already difficult enough. I’ve been sexually harassed at a conference, have received lewd comments on my published talk videos, and regularly have to field questions from men asking if I know how to code. That’s why it was so hurtful and alienating to receive this image from the very people who are tasked with creating a supportive and professional environment at the event. <br> <br>By portraying me in a sexual way to attendees, this would have opened the door to additional harassment, and added yet another hurdle I’d have to overcome in order to be perceived as a competent professional. The fact that nowhere along the way did ReactiveConf organizers recognize how this gift could actually be harmful, to me, demonstrated a complete lack of empathy for women in tech. That’s not an organization I want to associate myself or my employer, Meteor Development Group (MDG), with.</p><p>Not only is the photo itself problematic, but also the fact that ReactiveConf never asked for my consent. I was never informed that ReactiveConf was planning on altering my photo for the event, nor did I see the superhero picture until after day one of the conference had ended. None of the organizers <em>explicitly</em> asked for my permission to display the picture on the big screen. <strong>Had I presented my talk on day 1, I would have been completely blindsided as I walked on stage</strong>, which is what happened to a colleague of mine who was also unhappy with his picture.</p><p>Speaking at a conference is already a monumental investment of mental, emotional, and physical effort, right up until the plane ride home. The will to continue investing any more energy into an event whose organizers had showed so little consideration for their speakers vanished as soon as I received the gift. After consulting with trusted members of my team, I decided to withdraw and leave the situation immediately.</p><p>Cancelling my talk was not a decision MDG and I took lightly. I know many of the attendees were disappointed by my withdrawal; however, I wasn’t willing to stay at ReactiveConf at the expense of my values and feeling additional discomfort.</p><h3>The aftermath</h3><p>Just when I thought the situation couldn’t get any worse, it did. To date, I still have not received a sincere apology, public or private, from the ReactiveConf team. They received a firm but considerate email from a teammate who was able to let them know I was withdrawing while I was in transit without cell service. Instead of respecting my decision or acknowledging the role their decisions played, they resorted to shaming me on Twitter:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BKw3JjteGIOmq51e94nsiQ.png" /></figure><p>On the <a href="https://reactiveconf2017.slack.com/">conference Slack</a>, ReactiveConf organizers have attempted to cover up what happened by claiming that we speakers gave them permission to release our images. This is completely false.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*40IHmQ701oWPl1vWNPBC6g.png" /></figure><p><strong>The facts are simple:</strong> the ReactiveConf team never asked the speakers for permission to photoshop our images. We did not see the pictures before they were printed, and many of us did not see them before they were tweeted and displayed on the big screen.</p><p>But the exact ordering of events aside, their response has continued to demonstrate disrespect and an inability to take any responsibility for their decision-making. They have implied that I should not have been offended because it was not their intent to offend, and that I owed <em>them</em> further explanation and discussion. Nowhere was there an understanding that I might not have been ready to go into more detail about how upsetting I found the situation, or that withdrawing came at great personal expense as well given the effort I’d already put into speaking. <br> <br>Their response only confirmed that I had made the right call.</p><h3>A silver lining</h3><p>A big thank you goes out to all my colleagues and friends who have defended me publicly and offered to help over the past couple days. Your support means the world to me. ❤️</p><p>Throughout this situation, MDG has stood by my side every step of the way. From helping me find last-minute travel arrangements and navigate communication with the organizers, to welcoming me with open arms at GraphQL Summit, everyone on the team has been nothing short of amazing. I feel very fortunate to be a part of an organization who isn’t afraid to stand up for what’s right, even if it may be unpopular or controversial.</p><p>At MDG, we value transparency and think incidents like this one are a good opportunity to provide feedback. Hopefully, conference organizers can learn from what happened at ReactiveConf to make event experiences better for everyone.</p><h3>Takeaways</h3><p>In the future, I will be more selective with where I choose to devote my energy &amp; time. There were several red flags leading into ReactiveConf, such as <a href="https://medium.com/@jevakallio/why-i-will-not-be-speaking-at-reactiveconf-6e106b3816a5">the lightning talk debacle</a> and their refusal to book my travel arrangements in a timely manner, that should have clued me into how I would be treated when I arrived.</p><p><strong>Speakers,</strong> trust your gut. If you get bad vibes early on, you should reconsider whether you want to invest in that event. Additionally, if you are harassed by the conference staff, please don’t feel guilty for standing up for yourself and withdrawing from the conference. We need to call out bad behavior when we see it in order to prevent incidents like these from becoming the norm.</p><p><strong>Organizers,</strong> please remember that your speakers are vital to the success of your event. We devote countless hours of our free time, often without pay, in order to ensure that your attendees have a great experience. Please reciprocate our efforts by treating us with respect. Respect our image by asking for permission before altering and publishing a speaker’s photo. Respect our time by booking travel arrangements and reimbursing expenses promptly. If something goes wrong, apologize gracefully and respect the speaker’s decision if they no longer wish to participate in your event.</p><p><strong>Attendees, </strong>research conferences before you decide to attend. If you care about the well-being of the people who travel to present there, then vote with your wallet and support events that work to create a respectful and professional atmosphere for attendees and speakers alike. If your company regularly sponsors conferences, make sure they are sponsoring events whose organization aligns with their corporate values.</p><p>It may not be easy, but let’s all work together to ensure a better conference experience for everyone.</p><p>If you would like to see the talk on Apollo Client 2.0 that I was scheduled to present at ReactiveConf, you’re in luck! Check out the video from GraphQL Summit 2017, <a href="http://gqlsummit-more-than-gql.surge.sh/#/">the slides</a>, and <a href="https://dev-blog.apollodata.com/apollo-client-2-0-beyond-graphql-apis-888807b53afe">the accompanying blog post</a>. 😊</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FeHjP2WFt0zU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DeHjP2WFt0zU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FeHjP2WFt0zU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1ee3f6f9e5a17e00235d2e8de704373/href">https://medium.com/media/c1ee3f6f9e5a17e00235d2e8de704373/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a463bf14bd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>