Merged
Conversation
hwillson
approved these changes
Jan 24, 2019
Member
hwillson
left a comment
There was a problem hiding this comment.
This all looks great @cheapsteak - thanks very much for working on this!
Member
|
@cheapsteak Let's leave this un-merged for now, just until we know the official launch date of the Apollo Client local state changes. Thanks again! |
benjamn
reviewed
Feb 25, 2019
| // is being used. | ||
|
|
||
| const supportsApolloClientLocalState = | ||
| typeof apolloClient.getTypeDefs === "function"; |
Member
There was a problem hiding this comment.
@hwillson Just a note that apollographql/apollo-client@d3931b8 may have broken this logic (which is fine as long as we make the logic work again before we ship apollo-client@2.5.0).
Member
There was a problem hiding this comment.
With this commit, the new way to get the client typeDefs will be apolloClient.typeDefs: apollographql/apollo-client@adfd9c0
Contributor
32b6113 to
4333c28
Compare
benjamn
reviewed
Feb 26, 2019
f4339ca to
ac35b34
Compare
justinanastos
approved these changes
Feb 26, 2019
To work with the new Apollo Client local state changes, this commit adjusts devtool querying to use Apollo Client itself, instead of building a custom link chain.
ac35b34 to
75d24e4
Compare
The version we were using before couldn't `parse` the `ObjectTypeExtension` type.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
99.9% of this was done by Hugh, really appreciated the extremely thorough comments
I just moved a few lines around and double checked that it's working against our full stack tutorial (which uses AC local state) and pupstagram (which uses link-state)
I did find that running link-state mutations doesn't work (in the case of pupstagram, running the
toggleLikedPhotomutation results in agetCacheKey is not a functionerror), but it's broken the same way in the currently published version of devtools as well, so it's likely that it hasn't worked in the pastI'm not sure if there's much else worth saying here. The meat of the changes is in
links.js, and Hugh's comments do a great job of explaining what and why