Boštjan Cigan
Jul 25, 2017 · 1 min read

Hi Jonas,

Thank you for your contributions on Medium regarding GraphQL. I have a small question regarding resolving an “outside” GraphQL API.

Lets say that I have a schema and part of that schema needs to be resolved in an outside API like the Github GraphQL API. How would one approach that problem? Because in the resolvers on your server you need to specify what is returned, while in this case I would want to send the “subquery” to the Github API.

I don’t want to have two separate queries (so one for the Github API and one for the extra data I want to return).

What is the best approach for this? So with REST you just have two separate calls and join them in one object, while combining a response from several GraphQL APIs isn’t clear to me.

Thank you for any insights you have on this!

    Boštjan Cigan

    Written by

    Technical Lead @ Result, Professor @ Erudio Izobraževalni Center, Mentor @Thinkful and Instructor @SmartNinjaOrg