Last active
April 1, 2016 16:47
-
-
Save helfer/d792560f2ef668a5bf0e1a2be62e6032 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rp from 'request-promise'; | |
{ | |
Query: { | |
person(obj, { id }){ | |
return rp(`https://some-backend.com/person/${id}`) | |
.then( res => JSON.parse(res) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment