Created
August 13, 2020 08:12
-
-
Save ramyak-mehra/97e229a62537fd06d5e7c25e1ccf4ebf to your computer and use it in GitHub Desktop.
Its about Graphql Tips
This file contains hidden or 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
| 1. Use fragments for avoiding boiler plate code | |
| { | |
| leftComparison: hero(episode: EMPIRE) { | |
| ...comparisonFields | |
| } | |
| rightComparison: hero(episode: JEDI) { | |
| ...comparisonFields | |
| } | |
| } | |
| fragment comparisonFields on Character { | |
| name | |
| appearsIn | |
| friends { | |
| name | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment