Skip to content

Conversation

@andimarek
Copy link
Member

No description provided.

@andimarek andimarek requested a review from bbakerman January 22, 2019 01:58
}
{{< / highlight >}}

The reason whey they are not valid, is because the fields are different: in the first two examples the arguments differ and the third query actually has two different fields under the same key.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whey == why

Fragments are designed to be written by different parties (for example different components in a UI) which should not know anything about each other. Requiring that every field can only be declared once would make this objective unfeasible.

But by allowing it as long as the fields are the same allows fragments to be authored in an independent from each other.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But by allowing fields merging, as long as the fields are the same, allows fragments to be authored in an independent from each other.

Copy link
Member

@bbakerman bbakerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff!

@andimarek andimarek merged commit 15bf14b into master Jan 22, 2019
@andimarek andimarek deleted the merged-fields-blog branch January 23, 2019 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants