<?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[Mighty Maker - Medium]]></title>
        <description><![CDATA[Ideas and Resources for Mighty Makers - Medium]]></description>
        <link>https://medium.com/mighty-ideas?source=rss----9dc0bc2fa625---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Mighty Maker - Medium</title>
            <link>https://medium.com/mighty-ideas?source=rss----9dc0bc2fa625---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:02:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/mighty-ideas" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GraphQL and Apollo Part Five: Resolvers]]></title>
            <link>https://medium.com/mighty-ideas/graphql-and-apollo-resolvers-fa0ad72bb144?source=rss----9dc0bc2fa625---4</link>
            <guid isPermaLink="false">https://medium.com/p/fa0ad72bb144</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[apollostack]]></category>
            <dc:creator><![CDATA[Timothy Voice]]></dc:creator>
            <pubDate>Thu, 23 Mar 2017 20:26:57 GMT</pubDate>
            <atom:updated>2017-04-11T12:17:38.414Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is part five of a five part intro to GraphQL and Apollo. If you haven’t already, start with part one </em><a href="https://ideas.mightymaker.io/graphql-and-apollo-intro-360a67fddd3b#.7y7h5cyr4"><em>here</em></a><em>. I hope by the end of it you feel comfortable with the foundational concepts of GraphQL as well as some practical knowledge about building a GraphQL server. If you have feedback, leave a comment!</em></p><p>If you’ve been following along, you’ll now know how to <a href="https://ideas.mightymaker.io/graphql-and-apollo-queries-170e1e17ac38?source=---------2">construct query</a> and <a href="https://ideas.mightymaker.io/graphql-and-apollo-mutations-90589bc8647f#.6yqnlpllo">mutation operations</a>, setup a server, and <a href="https://ideas.mightymaker.io/graphql-and-apollo-schemas-17445b6ed9fc?source=---------0">generate a schema</a>. But there is one very key component missing, the <em>resolvers</em>.</p><p>In a sentence:</p><p><em>GraphQL resolvers are a set of application specific functions that interact with your underlying datastores according to the query and mutation operations described in your schema.</em></p><p>It doesn’t matter what datastore you are using. It could be a NoSQL, MySQL, Redis, or anything else. It could be a datastore that you own and maintain, or a 3rd party API that you connect to. Resolvers provide massive flexibility because they are simply JavaScript functions that perform an action and return a value. Let’s see one in action:</p><p>In our previous section on schemas, we created a RootQuery that returned a user type:</p><pre>type RootQuery {<br>    user(name: String) : User,<br> }</pre><p>But this wont do anything by itself; we need to connect it to the database somehow. We use resolvers to define how that happens.</p><pre>RootQuery: {<br>   user(root, { name }) {<br>     //  return a user from monogDB via name<br>     <strong>return</strong> User.findOne({ name });<br>   },<br> },</pre><p>Resolvers are simply JavaScript functions, so there are a lot of application specific decisions you need to make: database, ORM, etc. For simplicity sake, we’re leaving that out, but you can see that our resolve function accepts a name argument that it then passes down to our MongoDB query. Our resolver then returns the user document that it found (or null if it didn’t find anything).</p><p>We could also, for instance, use a query and resolver to retrieve data that we don’t own. Let’s say that in addition to the user info we store, we want to add that users’s latest tweet to the User type. We’d add a Tweet type and include it in our User type like so:</p><pre>type User {<br>   name: String,<br>   birthday: String,<br>   tweet: Tweet,<br> }</pre><pre> type Tweet {    <br>  tweet: String,<br> }</pre><p>Now we need to tell GraphQL how to <em>resolve </em>the Tweet type in the User:</p><pre>import rp from &#39;request-promise&#39;</pre><pre> RootQuery: {<br>    user(root, { name }) {<br>      //  return a user from monogDB via name<br>      <strong>return</strong> User.findOne({ name });<br>    },<br>  },<br> User: {<br>    tweet(root, { twitterHandle }) {<br>      <strong>const</strong> tweetUrl = //constructed twitter url endpoint<br>      rp(tweetUrl)<br>       .then((err, res) =&gt; {<br>          <strong>const</strong> tweets = res.body<br>          // return only the latest tweet&#39;s text<br>          <strong>return</strong> tweets[0].text<br>       })<br>    }<br> }</pre><p>Our RootQuery stays the same, but we are adding a resolve that requests data from the twitter API using our user’s twitter handle. We’re using request-promise for simplicity, but of course how you create your request is up to you.</p><p>For me, this was the moment when I realize the full potential of GraphQL. I can graft together data from a multitude of sources, some that I own, and some from a 3rd party API, and deliver a clean, concise response without my client having to worry about managing a bunch of different requests.</p><p>Because <em>resolvers </em>are just functions, they can be made to return any data to your client using a single, simple query.</p><p>We’ve now covered just about everything you need to started with Apollo and GraphQL. I hope you feel comfortable enough to take it on yourself and explore what’s possible!</p><p><strong>Resources:</strong><br>Apollo Resolvers: <a href="http://docs.apollostack.com/graphql-tools/resolvers.html">http://docs.apollostack.com/graphql-tools/resolvers.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa0ad72bb144" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mighty-ideas/graphql-and-apollo-resolvers-fa0ad72bb144">GraphQL and Apollo Part Five: Resolvers</a> was originally published in <a href="https://medium.com/mighty-ideas">Mighty Maker</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GraphQL and Apollo Part Four: Schemas]]></title>
            <link>https://medium.com/mighty-ideas/graphql-and-apollo-schemas-17445b6ed9fc?source=rss----9dc0bc2fa625---4</link>
            <guid isPermaLink="false">https://medium.com/p/17445b6ed9fc</guid>
            <category><![CDATA[apollostack]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Timothy Voice]]></dc:creator>
            <pubDate>Thu, 23 Mar 2017 20:20:09 GMT</pubDate>
            <atom:updated>2017-03-23T20:28:37.580Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is part four of a five part intro to GraphQL and Apollo. If you haven’t already, start with part one </em><a href="https://ideas.mightymaker.io/graphql-and-apollo-intro-360a67fddd3b#.7fqd5iuij"><em>here</em></a><em>. I hope by the end of it you feel comfortable with the foundational concepts of GraphQL as well as some practical knowledge about building a GraphQL server. If you have feedback, leave a comment!</em></p><p>Now that we know how to construct a query and mutation, we’re going to introduce the Schema and Type System that forms the core of any GraphQL server. After reading through this you will understand what a <em>type</em> is in the GraphQL context, how to construct a schema using <em>types</em>, and how to expose that schema to queries from a client.</p><p>In a sentence:</p><p><em>A GraphQL schema is a collection of named types that define the shape, and relationships of the data that your server will return in response to a query.</em></p><p>A type is the fundamental unit of any GraphQL schema:</p><p><strong>Type</strong></p><pre>type User {<br>   name: String,<br>   birthday: String,<br> }</pre><p>Fairly straightforward and familiar to anyone who has worked with JSON before. The User object has a collection of fields that determine the shape of the data returned by our server to a valid query,</p><p>A field is the fundamental unit of a type and can have values that are Strings, Integers, Booleans, Floats, IDs, or references to another type in the system (more on that later), or even a custom scalar.</p><p>At minimum, a schema must include a root query type. The fields on this type will determine what queries the server responds to and what data the response will contain.</p><p><strong>Schema</strong></p><pre>​ <br> type User {<br>    name: String,<br>    birthday: String,<br> }<br> <br><strong> </strong>type RootQuery {<br>    user(name: String) : User,<br> }<br> <br> schema {<br>    query: RootQuery,<br> }</pre><p>The RootQuery type represents the entry point into the schema, so any query our client makes will need to start with a field of the RootQuery object i.e.</p><pre>{<br>    user(name: “Tim”)<br>        name,<br> }</pre><p>Would be a valid query against this particular GraphQL server, and would return:</p><pre>{<br>     user: {<br>         name: “Tim”, <br>     }<br> }</pre><p>Building on the above defined schema, let’s add another type that references our User type, an Organization.</p><pre>​ <br> type User {<br>    name: String,<br>    birthday: String,<br> }<br><strong> <br></strong> type Organization {     <br>    name: String,<br>    members: [User],<br> }<br> <br> type RootQuery {<br>    user(name: String) : User,<br>    organization(name: String) : Organization,<br> }<br> <br> schema {<br>    query: RootQuery,<br> }</pre><p>The Organization type contains a members field that in turn contains an array of users of the User type. We’ve also added a new field to our RootQuery that will allow for an organization query:</p><pre>{<br>     organization(name: “Mighty Maker”)<br>         name<br>         members<br>             name<br> }</pre><p>Which would return:</p><pre>{<br>     organization: {<br>         name: “Mighty Maker”,<br>         members: [{<br>             name: “Tim”, <br>         }],<br>     }<br> }</pre><p><strong>Conclusion</strong></p><p>GraphQL has a fairly intuitive way of setting up your type system and defining your schema. It allows you to define the types of data your server will respond to, and what kind of fields that data will contain. As you can see, it very closely represents the data that will be returned to the client, making it easy to think about your data in the form that it will ultimately be consumed.</p><p>For a quick reference, checkout this <a href="https://wehavefaces.net/graphql-shorthand-notation-cheatsheet-17cd715861b6#.f42o2nwz3">awesome GraphQL server cheatsheet</a>.</p><p>So now we know what a schema looks like, but we’re still missing a key section of the GraphQL story — Resolvers, or how your server gets the data. More on that in part five.</p><p><strong>Resources:</strong><br>Your First GraphQL Server: <a href="https://medium.com/the-graphqlhub/your-first-graphql-server-3c766ab4f0a2#.icngp4l4x">https://medium.com/the-graphqlhub/your-first-graphql-server-3c766ab4f0a2#.icngp4l4x</a><br>Apollo Schema: <a href="http://docs.apollostack.com/graphql-tools/generate-schema.html">http://docs.apollostack.com/graphql-tools/generate-schema.html</a><br>GraphQL Type System: <a href="http://graphql.org/docs/api-reference-type-system/">http://graphql.org/docs/api-reference-type-system/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17445b6ed9fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mighty-ideas/graphql-and-apollo-schemas-17445b6ed9fc">GraphQL and Apollo Part Four: Schemas</a> was originally published in <a href="https://medium.com/mighty-ideas">Mighty Maker</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GraphQL and Apollo Part Three: Mutations]]></title>
            <link>https://medium.com/mighty-ideas/graphql-and-apollo-mutations-90589bc8647f?source=rss----9dc0bc2fa625---4</link>
            <guid isPermaLink="false">https://medium.com/p/90589bc8647f</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[apollostack]]></category>
            <dc:creator><![CDATA[Timothy Voice]]></dc:creator>
            <pubDate>Thu, 23 Mar 2017 20:12:56 GMT</pubDate>
            <atom:updated>2017-03-23T20:28:18.240Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is part three of a five part intro to GraphQL and Apollo. You can read part one </em><a href="https://ideas.mightymaker.io/graphql-and-apollo-intro-360a67fddd3b#.7fqd5iuij"><em>here</em></a><em>, and part two </em><a href="https://ideas.mightymaker.io/graphql-and-apollo-queries-170e1e17ac38#.p44z8iiyz"><em>here</em></a><em>. I hope by the end of it you feel comfortable with the foundational concepts of GraphQL as well as some practical knowledge about building a GraphQL server. If you have feedback, leave a comment!</em></p><p>Today we’re going to look at the next part of the query equation — mutations.</p><p>In a sentence:</p><p><em>Mutations are GraphQL queries that perform a write and then fetch operation on the server, allowing you to create or mutate the underlying data.</em></p><p>There’s actually not a whole lot more to <em>mutations</em>. They look very similar to the queries we looked at before. Here’s an example:</p><pre>mutation {<br>   createUser(name: &quot;Timothy Voice&quot;, email: &quot;timothy@mightymaker.io&quot;) {<br>     id<br>     name<br>   }<br> }</pre><p>Instead of using the <em>query </em>key work (or omitting it entirely as default), we’re telling our server we want to perform a mutation operation.</p><p>Because mutations are write and <em>then</em> <em>fetch</em> operations (queries are just fetch operations), our mutation will return the data of the newly created user with the fields <em>id </em>and <em>name.</em></p><pre>{<br>   &quot;data&quot;: {<br>     &quot;createUser&quot;: {<br>       &quot;id&quot;: &quot;123&quot;,<br>       &quot;name&quot;: &quot;Timothy Voice&quot;<br>     }<br>   }<br> }</pre><p>The heavy lifting is done on the server, where you define the specific operation to be performed by your mutation. We’ll see this in action in the segment on GraphQL schemas and servers coming up next in part four.</p><p><strong>Resources:</strong><br>Apollo Mutations: <a href="http://docs.apollostack.com/apollo-client/mutations.html">http://docs.apollostack.com/apollo-client/mutations.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90589bc8647f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mighty-ideas/graphql-and-apollo-mutations-90589bc8647f">GraphQL and Apollo Part Three: Mutations</a> was originally published in <a href="https://medium.com/mighty-ideas">Mighty Maker</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GraphQL and Apollo Part Two: Queries]]></title>
            <link>https://medium.com/mighty-ideas/graphql-and-apollo-queries-170e1e17ac38?source=rss----9dc0bc2fa625---4</link>
            <guid isPermaLink="false">https://medium.com/p/170e1e17ac38</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[apollostack]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Timothy Voice]]></dc:creator>
            <pubDate>Thu, 23 Mar 2017 20:05:37 GMT</pubDate>
            <atom:updated>2017-03-24T02:43:47.360Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is part two of a five part intro to GraphQL and Apollo. You can read part one </em><a href="https://ideas.mightymaker.io/graphql-and-apollo-intro-360a67fddd3b#.7fqd5iuij"><em>here</em></a><em>. I hope by the end of it you feel comfortable with the foundational concepts of GraphQL as well as some practical knowledge about building a GraphQL server. If you have feedback, leave a comment!</em></p><p>In the second part of the GraphQL and Apollo series we’re going to look at queries — how your client gets data from your server.</p><p>In a sentence:</p><p><em>A GraphQL query consists of a query operation, containing a field set that declaratively tells a server what data to return to the client.</em></p><p>By far the best way to get started with GraphQL queries is to see one in action. For this we’ll be using the awesome GraphQL tool: GraphiQL. <a href="http://graphql.org/swapi-graphql/">There is a demo here</a> that you can play around with.</p><p>I’d recommend copying the example query below and seeing what you get.</p><p><strong>Example Query</strong></p><pre>{<br>   film(id: &quot;ZmlsbXM6MQ==&quot;) {<br>     id<br>     title<br>   }<br> }</pre><p>The response this query gives us is:</p><pre>{<br>   &quot;data&quot;: {<br>     &quot;film&quot;: {<br>       &quot;id&quot;: &quot;ZmlsbXM6MQ==&quot;,<br>       &quot;title&quot;: &quot;A New Hope&quot;<br>     }<br>   }<br> }</pre><p>The magic of GraphQL is obvious here. The data very closely resembles the response you’ll be getting back, which is a dream for those developing the client that consumes that data. They know exactly what they are getting (nothing more, nothing less) and also how it will be structured.</p><p>Let’s build our query one step at a time:</p><p>Here we have the film query operation which passes the server the id of the film we are looking for. The operation looks like a function, and that’s a good way of thinking about operators: <em>functions that return a value of a certain type, determined by the receiving server</em>.</p><pre>{<br>   film(id: &quot;ZmlsbXM6MQ==&quot;) {</pre><pre>   }<br> }</pre><p>Now, we wont actually get any data from the server without a selection set (we’ll get an error), so we need to add some fields to our query operation:</p><pre>{<br>   film(id: &quot;ZmlsbXM6MQ==&quot;) {<br>     id<br>     title<br>   }<br> }</pre><p>The fields dictate what data our query will return.</p><p>A really great feature of GraphQL queries is that they can be nested. Paste the below query into the GraphQL demo and you’ll get a list of all the characters in the film we asked for.</p><pre>{<br>   film(id: &quot;ZmlsbXM6MQ==&quot;) {<br>      id<br>      title<br>      characterConnection {<br>       characters {<br>         name<br>       }<br>     }<br>   }<br> }</pre><p>What’s clear now is that instead of hitting multiple REST endpoints, one for the film data and another for the character data, we just nest our query appropriately, and we get a predictably structured response with all the data we asked for.</p><p>One last thing about queries.</p><p>There will be times when you find yourself repeating fields in a query operation. Of course, we don’t want this. We want to be Super DRY. So GraphQL provides us with a handy concept called Fragments. Fragments are a way for you to compose the fields of a query into a reusable query fragment.</p><p>Example:</p><pre>{<br>   darth: person(id: &quot;cGVvcGxlOjQ=&quot;) {<br>      ... PersonFragment<br>   }<br>   luke: person(id: &quot;cGVvcGxlOjE=&quot;) {<br>      ... PersonFragment<br>   }<br> }</pre><pre> fragment PersonFragment on Person {<br>    id<br>    name<br> }</pre><p>Notice that we need to define what type (in this case Person) our fragment can apply to. We’re also aliasing our data which you can <a href="https://facebook.github.io/graphql/#sec-Field-Alias">read more about here</a>.</p><p>Now you understand what a query is, how it’s constructed, and some helpful features like nesting and fragments. You’ve also been introduced to GraphQL’s “Killer App”, GraphiQL. You will use this constantly. Hopefully you also see how powerful this particular way of querying data can be from a client developer perspective.</p><p>In part three, we’ll cover what a GraphQL and Apollo server looks like and how to build a functioning schema.</p><p><strong>Resources:</strong><br>http://graphql.org/docs/queries/</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=170e1e17ac38" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mighty-ideas/graphql-and-apollo-queries-170e1e17ac38">GraphQL and Apollo Part Two: Queries</a> was originally published in <a href="https://medium.com/mighty-ideas">Mighty Maker</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GraphQL and Apollo Part One: Intro]]></title>
            <link>https://medium.com/mighty-ideas/graphql-and-apollo-intro-360a67fddd3b?source=rss----9dc0bc2fa625---4</link>
            <guid isPermaLink="false">https://medium.com/p/360a67fddd3b</guid>
            <category><![CDATA[apollostack]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Timothy Voice]]></dc:creator>
            <pubDate>Thu, 23 Mar 2017 20:00:09 GMT</pubDate>
            <atom:updated>2017-03-23T20:27:58.679Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is part one of a five part intro to GraphQL and Apollo. I hope by the end of it you feel comfortable with the foundational concepts of GraphQL as well as some practical knowledge about building a GraphQL server. If you have feedback, leave a comment!</em></p><p><strong>What to GraphQL?</strong></p><p>Right off the bat, it’s important to understand that GraphQL as released by Facebook it not a library or even a tool in of itself. GraphQL is a <em>spec</em> released by Facebook that is used by Facebook and others as a guide for building implementations. It served as the primary document for my understanding of GraphQL and is a good, straightforward read. <a href="https://facebook.github.io/graphql/">Check it out here.</a></p><p>Because GraphQL is a spec, you will need to pick an implementation to use when building your server. Throughout this series, we’ll be using <a href="http://www.apollostack.com/">the Apollo Stack</a> because I’ve found it the best way to get up and running quickly with reduced boilerplate and some good documentation. There are others, including the <a href="https://github.com/graphql/graphql-js">Facebook reference implementation</a> as well as <a href="https://github.com/graphql/express-graphql">express-graphql</a>.</p><p>Conceptually, GraphQL is a thin layer on top of your application that manages the fetching of your data for your clients. It does not directly interact with you database; it’s not a query language like SQL is a query language. Instead, in GraphQL you write a schema that accepts queries. These are then passed to resolve functions that interact with your datastores.</p><p>We’ll go into each of those concepts individually, but for now it’s enough to think of GraphQL as a thin layer that sits between your application and your datastores, and replaces traditional REST endpoints with a single <em>/graphql</em> endpoint.</p><p><strong>Why GraphQL?</strong></p><p>So why take the time to explore GraphQL? Besides just plain curiosity, there are some real business cases for using GraphQL.</p><ul><li>Greatly reduced network requests</li><li>Maintainability</li><li>Product-centric workflow</li><li>Easy integration of multiple data sources</li></ul><p>In traditional REST APIs, you create an unique url endpoint for each CRUD function, and whatever custom operations your application needs to support. So for instance, if you had a view that displayed a user and their latests tweet you would have to fire off requests to your /users endpoint as well as your /tweets endpoint. In GraphQL, you fire off one requests to the /graphql endpoint and your server would construct a response object that contained both your user info, and their latests tweet.</p><p>Because we now only have one endpoint, gone are the days of versioning APIs, breaking client requests when an endpoint changes, or a growing pile of redundant or legacy endpoints that you have to maintain (hence the increased maintainability).</p><p>In GraphQL, the client declares what data it wants returned to it, and what shape that data should take. This makes it far easier to build and iterate on client design as you know precisely what data you are going to get from a query, nothing more, nothing less.</p><p>For me, the real magic of GrapQL is the ability to tie together a multitude of data sources, some I manage, and some I access through 3rd party APIs. I can easily integrate data from the APIs of twitter, facebook, and any other data source with my own stored data to add lot’s of value to my application and my users.</p><p><strong>How to GraphQL?</strong></p><p>Just to give you a taste of what a GraphQL query and response looks like:</p><pre>{<br>   film(id: &quot;ZmlsbXM6MQ==&quot;) {<br>     id<br>     title<br>     character(id: &quot;bVHXMDBI&amp;&quot;) {<br>         name<br>     }<br>   }<br> }</pre><p>The response this query gives us is:</p><pre>{<br>   &quot;data&quot;: {<br>     &quot;film&quot;: {<br>       &quot;id&quot;: &quot;ZmlsbXM6MQ==&quot;,<br>       &quot;title&quot;: &quot;A New Hope&quot;<br>       &quot;character&quot;: {<br>           &quot;name&quot;: &quot;Luke&quot;,<br>       }<br>     }<br>   }<br> }</pre><p>As you can see, you can create simple nested requests, that will return data that very closely resembles the query you sent.</p><p>Hopefully now you are a) interested in GraphQL, and b) ready to get to writing your own queries. We’ll cover that in <a href="https://ideas.mightymaker.io/graphql-and-apollo-queries-170e1e17ac38#.yxzp2x3qs">part two</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=360a67fddd3b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mighty-ideas/graphql-and-apollo-intro-360a67fddd3b">GraphQL and Apollo Part One: Intro</a> was originally published in <a href="https://medium.com/mighty-ideas">Mighty Maker</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>