-
-
Save dz/ca616426dab69c33bf44b7e05d9222d6 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
entry(id: 1234) { | |
ledeImage { | |
river: ratio(...), | |
hero_oneup: ratio(...), | |
image_above: ratio(...) | |
} | |
} | |
# The API knows to fetch from various database sources, | |
# and returns full names vs usernames according to community rules, | |
# but leaves the formatting as HTML, and comma-joining up to the client |
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
entry(id: 1234) { | |
bylines { | |
name | |
url | |
} | |
} | |
# The API knows to fetch from various database sources, | |
# and returns full names vs usernames according to community rules, | |
# but leaves the formatting as HTML, and comma-joining up to the client |
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
entry(id: 1234) { | |
byline # <a href="/authors/alice">Alice Author</a>, <a href="/users/connie">Connie Contributor</a>, <a href="http://freddy.name/">Freddy Freelancer</a> | |
} | |
# The API knows how to fetch and format the full byline, | |
# merging together the various db sources for you, | |
# and respecting community rules on username vs full name. | |
# The client doesn't have to do anything but drop this into a template. |
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
entry(id: 1234) { | |
author { | |
firstName | |
lastName | |
username | |
profileUrl | |
} | |
contributors { | |
firstName | |
lastName | |
username | |
profileUrl | |
} | |
additionalByline # <a href="http://freddy.name/">Freddy Freelancer</a> | |
} | |
# the api provides data in its raw format, as represented in the database. | |
# the client decides how to format author names based on community settings, | |
# create <a> tags, and comma join all of this together |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment