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

Release 3.6.0 #9067

Merged
merged 237 commits into from
Apr 26, 2022
Merged

Release 3.6.0 #9067

merged 237 commits into from
Apr 26, 2022

Commits on Nov 16, 2021

  1. Add 3.6 changelog placeholder

    hwillson authored and benjamn committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    c0c3a8c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    600d239 View commit details
    Browse the repository at this point in the history
  3. Revert normalizeNonRelativeId changes in config/resolveModuleIds.ts.

    This reverts commit 60e18e9 from PR #8396.
    benjamn committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    df7be26 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'revert-normalizeNonRelativeId-from-pr-8396' into releas…

    …e-3.6.
    
    Merging into `release-3.6` before merging into `main` so we can do some
    additional testing with beta releases.
    benjamn committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    d3c328b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2b053c8 View commit details
    Browse the repository at this point in the history
  6. Use useSyncExternalStore() (#8785)

    * add use-sync-external-store
    
    * Initial work on using useSyncExternalStore
    
    * fix useLazyQuery tests
    
    * update use-sync-external-store version
    
    * update timings to useMutation tests
    
    * change the timing in a Mutation component test which changed for no ostensible reason
    
    * fix the hoc tests agane
    
    * bring back the bad boy code block by popular demand
    
    * update useSyncExternalStore to handle ssr
    
    * use published useSyncExternalStore types
    
    * update dependencies and add beta to react peer range
    brainkim authored Nov 16, 2021
    Configuration menu
    Copy the full SHA
    7f0d459 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1f72695 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b396b45 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a1c3de4 View commit details
    Browse the repository at this point in the history
  10. Mention PR #8785 in CHANGELOG.md.

    benjamn committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    7a4ec92 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2021

  1. Configuration menu
    Copy the full SHA
    59c8591 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1f29fab View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2021

  1. Configuration menu
    Copy the full SHA
    1936e5b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4426a80 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    efe61de View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2021

  1. Add direct dependency on [email protected] to fix Netlify npm failures.

    The specific failure is an integrity hash mismatch:
    
      5:44:05 PM: npm ERR! code EINTEGRITY
      5:44:05 PM: npm ERR! sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==
                           integrity checksum failed when using sha512: wanted sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==
                           but got sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==
    
    Example failed deployment (or see any of the recent failures in #9067):
    https://app.netlify.com/sites/apollo-client-docs/deploys/619d6dc222deda1694aa37a6
    
    Although the error doesn't mention the package name, I was able to grep
    for the expected hash in package-lock.json, which pointed to the `acorn`
    package. As you can tell from this commit's changes, the actual hash
    displayed above (ending in +z9yw==) happens to be the hash for
    [email protected], whereas the expected hash was that of [email protected].
    benjamn committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    38e3084 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f16820 View commit details
    Browse the repository at this point in the history
  3. Revert "Prevent npm@6-related Netlify failures on release-3.6 branch (#…

    …9112)"
    
    This reverts commit efe61de, which did
    not, in fact, prevent the Netlify failures. Instead, updating `acorn`
    seems to have been the ticket.
    benjamn committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    56db8c0 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2022

  1. Update dev dependency use-sync-external-store to version 1.0.0-rc.0.

    I relaxed the peer dependency version constraint to allow any
    1.0.0-compatible version, including betas and RCs.
    
    For local development of the Apollo Client library itself, I added
    use-sync-external-store to our devDependencies (like we do with react
    and react-dom), since I was seeing `npm i` fail to install
    node_modules/use-sync-external-store, perhaps because it is now an
    optional peer dep.
    benjamn committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    fd3b021 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2022

  1. Configuration menu
    Copy the full SHA
    5635437 View commit details
    Browse the repository at this point in the history
  2. Batch link can cancel operations that are in queue or in flight

    After an operation has been subscribed to, and so queued, it is possible
    to unsubscribe from it, and it will be removed from the queue.
    
    Unsubscribing will not impact the debounce, so other operations, if any, will
    not be delayed by an unsubscription.
    
    If a batch of operation is already in flight, and all operations are unsubscribed
    then the entire XHR will be cancelled. If only some operations are unsubscribed
    the XHR will be left untouched.
    PowerKiKi authored and benjamn committed Jan 11, 2022
    Configuration menu
    Copy the full SHA
    5cda727 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d098ea View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2022

  1. Restore BatchHandler field types.

    Since BatchHandler is an exported type, it seems appropriate to preserve
    its optional fields (with their expected types), then override those
    fields (next, error, complete) with non-optional versions in the
    QueuedRequest subtype. The field/types of QueuedRequest will end up the
    same either way.
    benjamn committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    c9477a3 View commit details
    Browse the repository at this point in the history
  2. Use Sets to track batched requests and their subscribers.

    Since ECMAScript Set and Map preserve the order of their keys (by order
    of first insertion), they can often be used to keep track of queues or
    LRU usage chains, while also supporting constant-time deletion of keys
    (no need for indexOf/splice).
    benjamn committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    33a340f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e17ccab View commit details
    Browse the repository at this point in the history
  4. Privatize and rename batcher.queuedRequests property.

    Since we're already changing the type of this pseudo-private property,
    it seems like a good idea also to privatize/rename it for real, so we
    can test the hypothesis "nobody is using this field directly" by
    trialing these changes in beta releases of Apollo Client v3.6.
    benjamn committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    3def764 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    51881d6 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2022

  1. Configuration menu
    Copy the full SHA
    5328dae View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2022

  1. Configuration menu
    Copy the full SHA
    915f34d View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Configuration menu
    Copy the full SHA
    e70e072 View commit details
    Browse the repository at this point in the history
  2. Remove unused BatchHandler properties

    Because those are never used inside this project, and they are very
    likely to break our indices based callback calls and throw an
    `server returned results with length...`.
    PowerKiKi committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    29fb39e View commit details
    Browse the repository at this point in the history
  3. Reduce usage of any

    PowerKiKi committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    fb04ca4 View commit details
    Browse the repository at this point in the history
  4. Avoid duplication in types

    PowerKiKi committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    98f9bc2 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2022

  1. New GraphQLWsLink for graphql-ws subscriptions library

    Apollo Client currently contains `WebSocketLink` in
    `@apollo/client/link/ws` which uses the `subscriptions-transport-ws`
    library. That library is no longer actively maintained, and there is an
    improved fork called `graphql-ws`.
    
    The two libraries use different protocols so a different client link is
    required for `graphql-ws`. (While the WebSocket protocol does allow for
    subprotocol negotiation, neither server implementation supports this in
    a practical way.)
    
    This PR adds a new link `GraphQLWsLink` in
    `@apollo/client/link/subscriptions`. Its constructor arguments are the
    same as the `createClient` function in `graphql-ws` (or it can take a
    `Client` object returned from that function), and you need to install
    the optional peer dep `graphql-ws` instead of
    `subscriptions-transport-ws`. Once you've created the link, it works
    exactly like the old `WebSocketLink`.
    
    This PR changes the main subscriptions doc page to mostly document the
    new link, with an extra section at the bottom for the old link.
    
    The core GraphQLWsLink code is based on MIT-licensed code from the
    README of the graphql-ws repository.
    
    Fixes #8345.
    Part of apollographql/apollo-server#6058
    glasser committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    f25a028 View commit details
    Browse the repository at this point in the history
  2. Update docs/source/api/link/apollo-link-ws.md

    Co-authored-by: Ben Newman <[email protected]>
    glasser and benjamn committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    a8ff094 View commit details
    Browse the repository at this point in the history
  3. Update docs/source/data/subscriptions.mdx

    Co-authored-by: Ben Newman <[email protected]>
    glasser and benjamn committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    a573c8e View commit details
    Browse the repository at this point in the history
  4. rename sink -> observer

    glasser committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    a10f48d View commit details
    Browse the repository at this point in the history
  5. Use ApolloError

    glasser committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    a1fcb6c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b453ced View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a3604e4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b344f00 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    11c0051 View commit details
    Browse the repository at this point in the history
  10. Add CHANGELOG

    glasser committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    4caf088 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2022

  1. Merge pull request #9369 from apollographql/glasser/graphql-ws

    New GraphQLWsLink for graphql-ws subscriptions library
    benjamn authored Feb 2, 2022
    Configuration menu
    Copy the full SHA
    d98f1de View commit details
    Browse the repository at this point in the history
  2. Merge pull request #9248 from PowerKiKi/batch-cancel

    Batch link can cancel operations that are in queue or in flight
    benjamn authored Feb 2, 2022
    Configuration menu
    Copy the full SHA
    cefd24c View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2022

  1. Temporarily revert useSyncExternalStore changes (#8785). (#9393)

    This reverts commit 7f0d459 (#8785)
    and follow-up commit 5328dae (move
    onCompleted and onError to the snapshot function).
    benjamn authored Feb 3, 2022
    Configuration menu
    Copy the full SHA
    c6ab364 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a884c6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f4ced80 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    47f1ca9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    63eb5a5 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2022

  1. Update to ts-invariant to version 0.10.0.

    Should help with issue #8218, thanks to @benmccann's work in
    apollographql/invariant-packages#254
    benjamn committed Feb 4, 2022
    Configuration menu
    Copy the full SHA
    65f37e2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    684ad58 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2022

  1. Configuration menu
    Copy the full SHA
    a474d57 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2022

  1. Configuration menu
    Copy the full SHA
    fb03bee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3bd51a7 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2022

  1. Configuration menu
    Copy the full SHA
    72bbd06 View commit details
    Browse the repository at this point in the history
  2. add simple regression test to show that useQuery result changes when …

    …the component re-renders
    jamesopti authored and benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    9c5f077 View commit details
    Browse the repository at this point in the history
  3. attempt a fix

    jamesopti authored and benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    777b7e9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c2c83f4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3b0bfb9 View commit details
    Browse the repository at this point in the history
  6. Hacky destructive result updates to achieve referential stability.

    I will revisit this approach to prevent repeated updates of unchanging
    result properties (like obsQueryFields).
    benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    c610bf0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    70b232f View commit details
    Browse the repository at this point in the history
  8. Collapse related if blocks.

    benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    abee68d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e6d1abf View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c67909f View commit details
    Browse the repository at this point in the history
  11. Delete result.partial only if it's defined but falsy.

    Removing result.partial when it's truthy defeats the whole purpose of
    this (questionably necessary) field.
    benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    94f11a6 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    df26f08 View commit details
    Browse the repository at this point in the history
  13. Avoid prematurely merging defaultOptions.watchQuery.

    Follow-up/refinement to PR #9210.
    
    Now that the createWatchQueryOptions function no longer defaults
    watchQueryOptions.fetchPolicy to "cache-first" unconditionally (instead
    defaulting to defaultOptions.watchQuery.fetchPolicy if defined), we can
    let the merging of defaultOptions happen as it normally does, when
    client.watchQuery(watchQueryOptions) is called later.
    benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    a4c14fc View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    25f6aa1 View commit details
    Browse the repository at this point in the history
  15. Ensure watchQueryOptions remain referentially stable.

    Using options as a useMemo dependency only happens to work here when
    options is undefined. If options is an object created fresh every time
    useQuery is called (as it often is), the useMemo version of this code
    would produce a new watchQueryOptions object on every call.
    benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    506bf5f View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    7f0e436 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    02548ee View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    e772cce View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    165e816 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    dd7eaca View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    ad842d9 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    6356882 View commit details
    Browse the repository at this point in the history
  23. Reuse state.obsQueryFields.

    benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    265a3ca View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    a536a25 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    5a32d59 View commit details
    Browse the repository at this point in the history
  26. Implement cached InternalState#toQueryResult method.

    This handful of test changes all seem defensible to me.
    benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    b507232 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    bd9dae5 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    dcdd7bc View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    2956b4e View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    dc3e23e View commit details
    Browse the repository at this point in the history
  31. Move useEffect ObservableQuery maintenance logic into useObservableQu…

    …ery.
    
    TODO Find a way to make this useEffect logic unnecessary.
    benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    3057abe View commit details
    Browse the repository at this point in the history
  32. Stop using resultRef and update the affected tests.

    These two tests are the ones I was talking about in (the message of) my
    earlier commit where state.resultRef was first introduced.
    
    After further consideration, updating the two affected tests and
    removing state.resultRef in favor of state.{result,previousData} makes
    the most sense to me, since the queries/clients/variables reported in
    the tests are no longer sometimes out of sync.
    benjamn committed Feb 25, 2022
    Configuration menu
    Copy the full SHA
    5ddacb8 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    d695d7c View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    7ca2db6 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    bbc99ab View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    3981bb3 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    bb2be9d View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    622f7c9 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    5634e19 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2022

  1. More implementation comments.

    benjamn committed Feb 26, 2022
    Configuration menu
    Copy the full SHA
    eff710f View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2022

  1. Configuration menu
    Copy the full SHA
    b4a4f1a View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2022

  1. Configuration menu
    Copy the full SHA
    d9c5cd2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6a5e417 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3e95d8a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2fe2925 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0f34843 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d280d73 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2022

  1. Merge pull request #9459 from apollographql/useQuery-internal-state-ref

    Refactor `useQuery` using `InternalState` class to simplify reasoning about state
    benjamn authored Mar 10, 2022
    Configuration menu
    Copy the full SHA
    46e101b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0926034 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    832ff6c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ca08ae7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1615823 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0bfe05e View commit details
    Browse the repository at this point in the history
  7. Mention PR #9223 in CHANGELOG.md.

    benjamn committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    1d5218f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ee74bec View commit details
    Browse the repository at this point in the history
  9. Merge pull request #9223 from apollographql/allow-passing-options-fun…

    …ction-to-useQuery
    
    Allow passing  function to `useQuery` for finer-grained `options` control
    benjamn authored Mar 10, 2022
    Configuration menu
    Copy the full SHA
    7df3d4e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2e138aa View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    98cb7b0 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    05d6deb View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    f783ea2 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ee48452 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e557dce View commit details
    Browse the repository at this point in the history
  16. Merge pull request #9222 from apollographql/provide-nextFetchPolicy-c…

    …ontext
    
    Provide more context to `nextFetchPolicy` functions
    benjamn authored Mar 10, 2022
    Configuration menu
    Copy the full SHA
    f018f5e View commit details
    Browse the repository at this point in the history
  17. Mention PR #9222 in CHANGELOG.md.

    benjamn committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    a5e065e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    3860b1f View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2022

  1. Configuration menu
    Copy the full SHA
    0249c8b View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2022

  1. Adjust fetchMore tests to use TypedDocumentNode and subscribeAndCount.

    Although these test updates may seem substantial, I believe this
    refactoring makes the tests more robust without changing what they test.
    To that end, it's important to note these tests are all passing at this
    point in the commit history, before any of the more substantive changes
    from PR #9504, and continue passing even after those changes are
    introduced, with relatively few additional test changes.
    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    8f7a3ed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c274f68 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a6ba39c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7e3dd93 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6177575 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6dccb8d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a1d4a82 View commit details
    Browse the repository at this point in the history
  8. A TODO to investigate.

    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    53a246b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e320eb5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c5b522d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3f7bce4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    857583c View commit details
    Browse the repository at this point in the history
  13. Remove nagging updateQuery deprecation warning.

    Now that fetchMore's updateQuery callback is implemented in terms of the
    supported/documented cache.updateQuery method, I feel better about
    allowing fetchMore to continue to take an updateQuery callback.
    
    Also, everyone with any ability to migrate from updateQuery to
    InMemoryCache field policies has presumably already done so, so this
    warning is less useful now than it was following the release of AC3.
    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    1b3406a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    f7dd5f4 View commit details
    Browse the repository at this point in the history
  15. Use reobserveCacheFirst in !diff.complete case, too.

    When `!diff.complete`, `oq.reobserveCacheFirst()` should behave exactly
    like `oq.reobserve()`, since the fetch policies `reobserveCacheFirst`
    modifies (`network-only` and `cache-and-network`) behave the same as the
    `cache-first` policy when cache results are incomplete.
    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    33e85c7 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    359ed59 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    521ec2d View commit details
    Browse the repository at this point in the history
  18. Mention PR #9504 in CHANGELOG.md.

    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    0548f29 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    cfc8cad View commit details
    Browse the repository at this point in the history
  20. Bring back cache.batch to ensure delivery of unchanged results.

    This reverts commits d5463be and
    0170f32, with a new test showing why
    the backup reobserveCacheFirst call in the finally block is important:
    sometimes the cache write doesn't change any data in the cache, so no
    broadcast happens, but we still need to deliver the final loading:false
    result for the fetchMore request.
    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    e5ed91a View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5036dc5 View commit details
    Browse the repository at this point in the history
  22. Merge pull request #9504 from apollographql/avoid-full-reobservation-…

    …after-fetchMore
    
    Avoid full reapplication of `cache-and-network` and `network-only` fetch policies after successful `fetchMore`
    benjamn authored Mar 29, 2022
    Configuration menu
    Copy the full SHA
    f6fb1ec View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    d0c3902 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    bc37c8a View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    ed9a638 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    bb084c9 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    df5b5dd View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    dc9679e View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    3a0d594 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    7ec37b8 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    ba0c509 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2022

  1. Configuration menu
    Copy the full SHA
    7e0e9e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8903456 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    17e22ec View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7fc6c89 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3546c9c View commit details
    Browse the repository at this point in the history
  6. Reuse useInternalState for useLazyQuery.

    This minimal initial commit should unlock further simplifications.
    benjamn committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    02a1e6d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a18e2e0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2302716 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4e77bca View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    72a805d View commit details
    Browse the repository at this point in the history
  11. Use reobserve rather than refetch for useLazyQuery exec function.

    This is the most important commit of the PR, since it fixes issue #9375.
    benjamn committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    f93e904 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    d26bdd4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    52ba67e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6cb2cdb View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ff0186d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    4be1901 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    71d8df4 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    345a156 View commit details
    Browse the repository at this point in the history
  19. Use manual wrapping rather than Function.prototype.bind.

    This tweak will allow us to move other behavior into the wrapped
    methods, like the EAGER_METHODS logic from useLazyQuery.
    benjamn committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    f164b1b View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    89af070 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    782642b View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    c3d1a83 View commit details
    Browse the repository at this point in the history
  23. Allow specifying WatchQueryOptions.initialFetchPolicy explicitly.

    Resolves #9564 (comment)
    
    I also renamed the initialPolicy field of NextFetchPolicyContext to be
    named initialFetchPolicy, for consistency.
    benjamn committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    da41ce8 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    c9a2c01 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    feb07db View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    9758586 View commit details
    Browse the repository at this point in the history
  27. Mention PR #9563 in CHANGELOG.md.

    benjamn committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    210aeda View commit details
    Browse the repository at this point in the history
  28. Merge pull request #9563 from apollographql/replace-useQuery-options-…

    …functions-with-options.defaultOptions
    
    Replace experimental `useQuery` options functions with simpler `options.defaultOptions` option
    benjamn authored Apr 4, 2022
    Configuration menu
    Copy the full SHA
    6285ee4 View commit details
    Browse the repository at this point in the history
  29. Mention PR #9564 in CHANGELOG.md.

    benjamn committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    ff43d78 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2022

  1. Merge pull request #9564 from apollographql/useLazyQuery-useInternalS…

    …tate
    
    Refactor `useLazyQuery` to reuse `useInternalState` and make
    execution function call `reobserve` instead of `refetch`
    benjamn authored Apr 5, 2022
    Configuration menu
    Copy the full SHA
    9b74293 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8cb8539 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2022

  1. Configuration menu
    Copy the full SHA
    a8fb387 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    51a2210 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2022

  1. add use-sync-external-store package to dependencies

    Brian Kim authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    426d96b View commit details
    Browse the repository at this point in the history
  2. Initial attempt at reapplying useSyncExternalStore

    brainkim authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    bdb6d0f View commit details
    Browse the repository at this point in the history
  3. Minimial useSyncExternalStore foothold.

    This partially reverts commit 6dd7bf1,
    though I plan to reapply most of those changes shortly.
    benjamn authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    75f2fd2 View commit details
    Browse the repository at this point in the history
  4. Move skip/standby/ssr stub result initialization to useOptions.

    Instead of overriding this.result in getCurrentResult when skip/standby
    or SSR are happening, we can initialize this.result to a stub result in
    useOptions, so getCurrentResult will return the stub.
    benjamn authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    07bb759 View commit details
    Browse the repository at this point in the history
  5. Actively reset internalState.result when skip/standby end.

    This commit could be folded into the previous commit (the one about
    moving this.result to useOptions), but it seemed worth memorializing as
    a bug I found in that commit.
    benjamn authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    0535c62 View commit details
    Browse the repository at this point in the history
  6. Attempt to let useSyncExternalStore call getCurrentResult.

    One small step for this.getCurrentResult()...
    benjamn authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    b48056f View commit details
    Browse the repository at this point in the history
  7. Fold useSubscriptionEffect into useSyncExternalStore subscribe callback.

    I believe this almost works, but something is not quite surviving in
    translation between the original useSubscriptionEffect useEffect and the
    useEffect where useSyncExternalStore does the subscribing.
    benjamn authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    a85da95 View commit details
    Browse the repository at this point in the history
  8. Memoize useSyncExternalStore subscribe callback with useCallback.

    Code comment explains my earlier useEffect translation mistake.
    benjamn authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    503fa71 View commit details
    Browse the repository at this point in the history
  9. Bump bundlesize limit to 29.3kB (now 29.26kB).

    benjamn authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    da82565 View commit details
    Browse the repository at this point in the history
  10. Add React 18 to peer dependencies

    Brian Kim authored and Brian Kim committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    866936e View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2022

  1. Fully resolve use-sync-external-store/shim module identifier.

    This seems to make some bundlers in some configurations happier, e.g.
    https://github.com/apollographql/react-apollo-error-template/
    benjamn committed Apr 14, 2022
    1 Configuration menu
    Copy the full SHA
    8788e6c View commit details
    Browse the repository at this point in the history
  2. Merge pull request #9596 from apollographql/brian-react-18

    Add support for React 18
    benjamn authored Apr 14, 2022
    Configuration menu
    Copy the full SHA
    9fd416d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c626652 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3c48a1d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5a3f033 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3d7fa34 View commit details
    Browse the repository at this point in the history
  7. TODOs

    benjamn committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    7f98827 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6540b23 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a90922c View commit details
    Browse the repository at this point in the history
  10. Fix faulty skip tests.

    benjamn committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    95a1749 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9b03177 View commit details
    Browse the repository at this point in the history
  12. Support WatchQueryOptions.fetchBlockingPromise.

    This option allows delaying/canceling any/all network traffic for the
    given query, and should prevent making stray network requests on behalf
    of useQuery queries whose useEffect callbacks never fire.
    benjamn committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    7e723db View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    7b80c93 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    db0bd4b View commit details
    Browse the repository at this point in the history
  15. Correct the frame test.

    This removes the UNNEEDED_FRAME from the second test added in PR #9508,
    which currently causes the test to fail, though the version without the
    UNNEEDED_FRAME is how we ultimately want useQuery to behave.
    
    I believe the other test is correct to have the repeated frame:
    #9508 (comment)
    benjamn committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    85ae61f View commit details
    Browse the repository at this point in the history
  16. Make the corrected frame test pass.

    Closes #9508, now that its tests are both accurate and passing.
    benjamn committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    655fe74 View commit details
    Browse the repository at this point in the history
  17. Make other tests pass.

    benjamn committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    2101a72 View commit details
    Browse the repository at this point in the history
  18. Remove UNNEEDED_FRAME from useQuery tests.

    Final cleanup to address #9508.
    benjamn committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    e94b545 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    d0265d4 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    a506feb View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d047ab1 View commit details
    Browse the repository at this point in the history
  22. Silently discard blocked fetches after five seconds without useEffect.

    TODO Make the 5000 constant configurable.
    benjamn committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    6033827 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    7331572 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    4ba569e View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2022

  1. Configuration menu
    Copy the full SHA
    b992e37 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2022

  1. Configuration menu
    Copy the full SHA
    c402dd4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    241f6ee View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    58cab4e View commit details
    Browse the repository at this point in the history
  4. Merge pull request #9599 from apollographql/fix-extra-useQuery-result…

    …-frame
    
    Fix extra `useQuery` result frames (as demonstrated by #9508).
    benjamn authored Apr 18, 2022
    Configuration menu
    Copy the full SHA
    59e12ca View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3b137b5 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2022

  1. Configuration menu
    Copy the full SHA
    e272ee9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    24b52b7 View commit details
    Browse the repository at this point in the history
  3. Use transformed options.query document to match watch.query.

    I noticed while updating an internal application that sometimes the
    observableQuery.options.query document could be !== watch.query, so
    there were cases where the watched query had already been updated and
    was even included in updatedQuerySet, but we (harmlessly/needlessly)
    call reobserveCacheFirst again in the finally block, just because
    options.query !== watch.query.
    
    This commit reinforces observableQuery.options.query as the source of
    truth for the transformed query document, while also providing the same
    object as observableQuery.query, a TypedDocumentNode<TData, TVariables>
    which should always be === observableQuery.queryInfo.document.
    benjamn committed Apr 19, 2022
    Configuration menu
    Copy the full SHA
    56390e4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f57ec30 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    de39845 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2022

  1. Configuration menu
    Copy the full SHA
    85e8fc3 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2022

  1. Configuration menu
    Copy the full SHA
    95ec974 View commit details
    Browse the repository at this point in the history
  2. Mention PR #9561 in CHANGELOG.md.

    benjamn committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    6b0fe24 View commit details
    Browse the repository at this point in the history
  3. Publish to npm with next rather than beta dist-tag.

    We will remove the tag once branch release-3.6 is merged into main.
    benjamn committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    e082176 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    04a35d5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    39b31d1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3980bfa View commit details
    Browse the repository at this point in the history