-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update data source tutorial to use more dependable API example #31
Comments
An example xkcd response: {
"month": "10",
"num": 1905,
"link": "",
"year": "2017",
"news": "",
"safe_title": "Cast Iron Pan",
"transcript": "",
"alt": "If you want to evenly space them, it's easiest to alternate between the Arctic and Antarctic. Some people just go to the Arctic twice, near the equinoxes so the visits are almost 6 months apart, but it's not the same.",
"img": "https://imgs.xkcd.com/comics/cast_iron_pans.png",
"title": "Cast Iron Pan",
"day": "20"
} That's a pretty straightforward schema with nothing fancy in the field resolvers. We’d basically build the link if it’s empty: link: data => data.link || `https://xkcd.com/${data.num}/`, |
In progress here: gramps-graphql/gramps#46 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It turns out the IMDB API is pretty unreliable, which is a bummer. This makes it a bad choice for an example data source.
We should revamp the tutorial to use a more reliable API. Requirements are:
I'm currently leaning toward the xkcd API, which is small, reliable, and familiar to many developers.
The text was updated successfully, but these errors were encountered: