-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Part 2/2 (see D2473427) - now that the compiler always adds `__typename` whenever the type is abstract, there is always sufficient information in a query & payload to determine the concrete type when creating a new record in the store: - if `__typename` is present in the payload, that's the type name - else `__typename` isn't present because the type here is guaranteed to be static - use the `parentType` metadata on the `id` field as the concrete type. Note that if `id` doesn't exist then this is a client-only record and the type is not required (because data about the record cannot be communicated with any other system). Reviewed By: @wincent Differential Revision: D2479202
- Loading branch information
1 parent
1a6f0c9
commit 1844dc9
Showing
13 changed files
with
404 additions
and
68 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.