<?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 Michele Korell on Medium]]></title>
        <description><![CDATA[Stories by Michele Korell on Medium]]></description>
        <link>https://medium.com/@michele.korell?source=rss-b21afc842ec4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ghyFwOXrxWCb-kdBYyIwUA.jpeg</url>
            <title>Stories by Michele Korell on Medium</title>
            <link>https://medium.com/@michele.korell?source=rss-b21afc842ec4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 19:54:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@michele.korell/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[GraphQL operations behind Stitching]]></title>
            <link>https://medium.com/@michele.korell/graphql-operations-behind-stitching-f2dcc9df0158?source=rss-b21afc842ec4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2dcc9df0158</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[fhir]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[node-js-development]]></category>
            <dc:creator><![CDATA[Michele Korell]]></dc:creator>
            <pubDate>Fri, 08 Feb 2019 01:52:09 GMT</pubDate>
            <atom:updated>2019-02-08T07:20:38.905Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-2OyQMFTMrdlXBwN0eB3w.png" /></figure><p>Recently, I was working on FHIR implementation based on GraphQL. If we look this healthcare standard, we can see that GraphQL implementation are not usual but supported. After developing for some time, we created a micro services architecture where our nodes fetch data using schema stitching. After made some tricky tips like:</p><ul><li>manipulating AST tree</li><li>change some parts of our query</li><li>inject new variables in AST at other place</li></ul><p>We had to create four resources and put the reference of all of them in a fifth resource using the reference “hasMember[ ]”. The complexity front-end was growing, so we decided to simplify the call from front end and take only the parameters that we had to store.</p><p>For the following GraphQL schema:</p><pre># types<br>type Resource {<br>  id: String<br>  hasMember: Reference<br>}</pre><pre>#mutation<br>mutation addResources(ref: String, bpb: Int ...) Resource;<br></pre><p>We had to inject at backend the four linked Resources. Actually act on AST tree is to complicate even with transformers to inject kind of query. Finally, the simplest way on server was to execute new separate query. Due to delegation, on this server we have a remote executable schema.</p><p>In the following code we can see an example of schema delegation:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3d5f469b0ce65ec7dbeba16daff8426f/href">https://medium.com/media/3d5f469b0ce65ec7dbeba16daff8426f/href</a></iframe><p>In this case our class execute a delegateToSchema for the “ResourceCreate”. After that we decide to extend the local schema with “addResources” mutation. But we can’t directly call “ResourceCreate”, because local mutation and remote mutation are completely different. The solution that I found to do the trick was by calling :</p><pre>graphql(schema, query);</pre><p>So, to route my local query we add to the resolver the function call and inside we can do how much actions that we need on remote endpoints.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/86b32cee120aa5e3640d1ce2cf100ab9/href">https://medium.com/media/86b32cee120aa5e3640d1ce2cf100ab9/href</a></iframe><p>When all operation are done, I put my objects together and send back to front-end by resolving on my local GraphQL server.</p><p>Happy coding!</p><p>This is my first article, i hope this can help someone like me that didn’t found a lot of articles about manipulating GraphQL into back-end!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2dcc9df0158" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>