Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepopulate records table with empty QUERY_ROOT (#92) #177

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

palpatim
Copy link
Contributor

Issue #, if available:

#92

Description of changes:

Prepopulated both AWSSQLiteNormalizedCache and InMemoryNormalizedCache with an empty QUERY_ROOT record to allow optimistic updates of empty caches. Works around an Apollo behavior that is arguably a bug, but that I'm reluctant to change for fear of unintended side effects in the rest of the handling. See discussion on #92.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@palpatim palpatim added AppSync contribution Community contribution PRs labels Feb 12, 2019
@palpatim palpatim self-assigned this Feb 12, 2019
@palpatim palpatim requested a review from rohandubal February 12, 2019 22:42
@palpatim palpatim merged commit aeaf284 into master Feb 12, 2019
@palpatim palpatim deleted the palpatim/gh92-optimistic-update-empty-cache branch February 12, 2019 22:59
palpatim added a commit that referenced this pull request Feb 14, 2019
- Add tests to verify query behavior against different cache-miss conditions,
  including cache-misses resulting from prepopulating caches with an empty
  QUERY_ROOT in #177.
palpatim added a commit that referenced this pull request Feb 14, 2019
- Add tests to verify query behavior against different cache-miss conditions,
  including cache-misses resulting from prepopulating caches with an empty
  QUERY_ROOT in #177.
palpatim added a commit that referenced this pull request Feb 14, 2019
- Added tests to verify query behavior against different cache-miss conditions,
  including cache-misses resulting from prepopulating caches with an empty
  QUERY_ROOT in #177.
palpatim added a commit that referenced this pull request Feb 14, 2019
- Added tests to verify query behavior against different cache-miss conditions,
  including cache-misses resulting from prepopulating caches with an empty
  QUERY_ROOT in #177.
palpatim added a commit that referenced this pull request Feb 14, 2019
- Added tests to verify query behavior against different cache-miss conditions,
  including cache-misses resulting from prepopulating caches with an empty
  QUERY_ROOT in #177.
palpatim added a commit that referenced this pull request Feb 15, 2019
* Resolve cache-miss behavior for AppSync-modified Apollo client

- Added tests to verify query behavior against different cache-miss conditions,
  including cache-misses resulting from prepopulating caches with an empty
  QUERY_ROOT in #177.

* Manually added optionalString to StarWarsAPI.HeroNameQuery selection set

Added optionalString to verify that a null optional field will not cause an
improper cache miss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution Community contribution PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants