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

Update Apollo GraphQL packages #5140

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hash-worker[bot]
Copy link
Contributor

@hash-worker hash-worker bot commented Sep 14, 2024

This PR contains the following updates:

Package Type Update Change
@apollo/client (source) dependencies minor 3.10.5 -> 3.12.8
apollo-server-core (source) dependencies minor 3.12.1 -> 3.13.0
apollo-server-errors (source) dependencies replacement 3.3.1 -> 4.0.0
apollo-server-express (source) dependencies minor 3.9.0 -> 3.13.0

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

This is a special PR that replaces apollo-server-errors with the community suggested minimal stable replacement version.


Release Notes

apollographql/apollo-client (@​apollo/client)

v3.12.8

Compare Source

Patch Changes

v3.12.7

Compare Source

Patch Changes

v3.12.6

Compare Source

Patch Changes

v3.12.5

Compare Source

Patch Changes
  • #​12252 cb9cd4e Thanks @​jerelmiller! - Changes the default behavior of the MaybeMasked type to preserve types unless otherwise specified. This change makes it easier to upgrade from older versions of the client where types could have unexpectedly changed in the application due to the default of trying to unwrap types into unmasked types. This change also fixes the compilation performance regression experienced when simply upgrading the client since types are now preserved by default.

    A new mode option has now been introduced to allow for the old behavior. See the next section on migrating if you wish to maintain the old default behavior after upgrading to this version.

Migrating from <= v3.12.4

If you've adopted data masking and have opted in to using masked types by setting the enabled property to true, you can remove this configuration entirely:

-declare module "@&#8203;apollo/client" {
-  interface DataMasking {
-    mode: "unmask"
-  }
-}

If you prefer to specify the behavior explicitly, change the property from enabled: true, to mode: "preserveTypes":

declare module "@&#8203;apollo/client" {
  interface DataMasking {
-    enabled: true
+    mode: "preserveTypes"
  }
}

If you rely on the default behavior in 3.12.4 or below and would like to continue to use unmasked types by default, set the mode to unmask:

declare module "@&#8203;apollo/client" {
  interface DataMasking {
    mode: "unmask";
  }
}

v3.12.4

Compare Source

Patch Changes
  • #​12236 4334d30 Thanks @​charpeni! - Fix an issue with refetchQueries where comparing DocumentNodes internally by references could lead to an unknown query, even though the DocumentNode was indeed an active query—with a different reference.

v3.12.3

Compare Source

Patch Changes

v3.12.2

Compare Source

Patch Changes

v3.12.1

Compare Source

Patch Changes

v3.12.0

Compare Source

Minor Changes
Data masking 🎭
  • #​12042 1c0ecbf Thanks @​jerelmiller! - Introduces data masking in Apollo Client.

    Data masking enforces that only the fields requested by the query or fragment is available to that component. Data masking is best paired with colocated fragments.

    To enable data masking in Apollo Client, set the dataMasking option to true.

    new ApolloClient({
      dataMasking: true,
      // ... other options
    });

    For detailed information on data masking, including how to incrementally adopt it in an existing applications, see the data masking documentation.

  • #​12131 21c3f08 Thanks @​jerelmiller! - Allow null as a valid from value in useFragment.

More Patch Changes

v3.11.10

Compare Source

Patch Changes
  • #​12093 1765668 Thanks @​mgmolisani! - Fixed a bug when evaluating the devtools flag with the new syntax devtools.enabled that could result to true when explicitly set to false.

v3.11.9

Compare Source

Patch Changes
  • #​12110 a3f95c6 Thanks @​jerelmiller! - Fix an issue where errors returned from a fetchMore call from a Suspense hook would cause a Suspense boundary to be shown indefinitely.

v3.11.8

Compare Source

Patch Changes

v3.11.7

Compare Source

Patch Changes
  • #​12052 e471cef Thanks @​jerelmiller! - Fixes a regression from where passing an invalid identifier to from in useFragment would result in the warning TypeError: Cannot read properties of undefined (reading '__typename').

v3.11.6

Compare Source

Patch Changes

v3.11.5

Compare Source

Patch Changes

v3.11.4

Compare Source

Patch Changes
  • #​11994 41b17e5 Thanks @​jerelmiller! - Update the Modifier function type to allow cache.modify to return deeply partial data.

  • #​11989 e609156 Thanks @​phryneas! - Fix a potential crash when calling clearStore while a query was running.

    Previously, calling client.clearStore() while a query was running had one of these results:

    • useQuery would stay in a loading: true state.
    • useLazyQuery would stay in a loading: true state, but also crash with a "Cannot read property 'data' of undefined" error.

    Now, in both cases, the hook will enter an error state with a networkError, and the promise returned by the useLazyQuery execute function will return a result in an error state.

  • #​11994 41b17e5 Thanks @​jerelmiller! - Prevent accidental distribution on cache.modify field modifiers when a field is a union type array.

v3.11.3

Compare Source

Patch Changes
Potentially disruptive change

When calling fetchMore with a query that has a no-cache fetch policy, fetchMore will now throw if an updateQuery function is not provided. This provides a mechanism to merge the results from the fetchMore call with the query's previous result.

v3.11.2

Compare Source

Patch Changes

v3.11.1

Compare Source

Patch Changes
  • #​12093 1765668 Thanks @​mgmolisani! - Fixed a bug when evaluating the devtools flag with the new syntax devtools.enabled that could result to true when explicitly set to false.

v3.11.0

Compare Source

Potentially Breaking Fixes
  • #​11789 5793301 Thanks @​phryneas! - Changes usages of the GraphQLError type to GraphQLFormattedError.

    This was a type bug - these errors were never GraphQLError instances
    to begin with, and the GraphQLError class has additional properties that can
    never be correctly rehydrated from a GraphQL result.
    The correct type to use here is GraphQLFormattedError.

    Similarly, please ensure to use the type FormattedExecutionResult
    instead of ExecutionResult - the non-"Formatted" versions of these types
    are for use on the server only, but don't get transported over the network.

  • #​11626 228429a Thanks @​phryneas! - Call nextFetchPolicy with "variables-changed" even if there is a fetchPolicy specified.

    Previously this would only be called when the current fetchPolicy was equal to the fetchPolicy option or the option was not specified. If you use nextFetchPolicy as a function, expect to see this function called more often.

    Due to this bug, this also meant that the fetchPolicy might be reset to the initial fetchPolicy, even when you specified a nextFetchPolicy function. If you previously relied on this behavior, you will need to update your nextFetchPolicy callback function to implement this resetting behavior.

    As an example, if your code looked like the following:

    useQuery(QUERY, {
      nextFetchPolicy(currentFetchPolicy, info) {
        // your logic here
      }
    );

    Update your function to the following to reimplement the resetting behavior:

    useQuery(QUERY, {
      nextFetchPolicy(currentFetchPolicy, info) {
        if (info.reason === 'variables-changed') {
          return info.initialFetchPolicy;
        }
        // your logic here
      }
    );
Minor Changes
Patch Changes

v3.10.8

Compare Source

Patch Changes

v3.10.7

Compare Source

Patch Changes

v3.10.6

Compare Source

Patch Changes
apollographql/apollo-server (apollo-server-core)

v3.13.0

Compare Source

apollographql/apollo-server (apollo-server-express)

v3.13.0

Compare Source

v3.12.1

Compare Source

v3.12.0

Compare Source

v3.11.1

Compare Source

v3.11.0

Compare Source

v3.10.4

Compare Source

v3.10.3

Compare Source

v3.10.2

Compare Source

v3.10.1

Compare Source

v3.10.0

Compare Source


Configuration

📅 Schedule: Branch creation - "before 4am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@hash-worker hash-worker bot enabled auto-merge September 14, 2024 12:23
hashdotai
hashdotai previously approved these changes Sep 14, 2024
@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team type/eng > backend Owned by the @backend team area/apps labels Sep 14, 2024
@hash-worker hash-worker bot force-pushed the deps/js/apollo-graphql-packages branch from 5b21aa8 to c7f13cd Compare September 14, 2024 15:17
hashdotai
hashdotai previously approved these changes Sep 14, 2024
hashdotai
hashdotai previously approved these changes Jan 25, 2025
hashdotai
hashdotai previously approved these changes Jan 28, 2025
@hash-worker hash-worker bot force-pushed the deps/js/apollo-graphql-packages branch from 9fba921 to d74139c Compare January 30, 2025 16:41
Copy link
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

scaling_read_entity_complete_zero_depth

Function Value Mean Flame graphs
entity_by_id 25 entities $$3.44 \mathrm{ms} \pm 14.1 \mathrm{μs}\left({\color{gray}-0.851 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$2.01 \mathrm{ms} \pm 8.69 \mathrm{μs}\left({\color{gray}-0.757 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$2.03 \mathrm{ms} \pm 8.35 \mathrm{μs}\left({\color{gray}-0.333 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$2.13 \mathrm{ms} \pm 11.2 \mathrm{μs}\left({\color{gray}-3.843 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$4.11 \mathrm{ms} \pm 30.8 \mathrm{μs}\left({\color{gray}-0.730 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$17.0 \mathrm{ms} \pm 194 \mathrm{μs}\left({\color{lightgreen}-27.941 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$17.1 \mathrm{ms} \pm 171 \mathrm{μs}\left({\color{lightgreen}-27.898 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$16.9 \mathrm{ms} \pm 215 \mathrm{μs}\left({\color{gray}1.41 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$17.1 \mathrm{ms} \pm 221 \mathrm{μs}\left({\color{gray}3.71 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$16.7 \mathrm{ms} \pm 228 \mathrm{μs}\left({\color{gray}-2.658 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$16.9 \mathrm{ms} \pm 236 \mathrm{μs}\left({\color{gray}2.14 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$16.2 \mathrm{ms} \pm 254 \mathrm{μs}\left({\color{gray}1.75 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$16.3 \mathrm{ms} \pm 171 \mathrm{μs}\left({\color{gray}4.78 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$16.0 \mathrm{ms} \pm 189 \mathrm{μs}\left({\color{gray}1.62 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: d4e16033-c281-4cde-aa35-9085bf2e7579 $$2.15 \mathrm{ms} \pm 5.61 \mathrm{μs}\left({\color{gray}-0.324 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
link_by_source_by_property depths: DT=0, PT=2, ET=2, E=2 $$86.8 \mathrm{ms} \pm 374 \mathrm{μs}\left({\color{gray}-1.116 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=2, E=2 $$82.7 \mathrm{ms} \pm 298 \mathrm{μs}\left({\color{gray}-2.300 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=2 $$74.2 \mathrm{ms} \pm 351 \mathrm{μs}\left({\color{gray}-1.635 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=2, PT=2, ET=2, E=2 $$91.0 \mathrm{ms} \pm 388 \mathrm{μs}\left({\color{gray}-0.408 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=255, PT=255, ET=255, E=255 $$99.2 \mathrm{ms} \pm 406 \mathrm{μs}\left({\color{gray}-0.910 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=0 $$39.0 \mathrm{ms} \pm 237 \mathrm{μs}\left({\color{gray}-1.359 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=2, ET=2, E=2 $$53.1 \mathrm{ms} \pm 240 \mathrm{μs}\left({\color{gray}0.082 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=2, E=2 $$48.5 \mathrm{ms} \pm 189 \mathrm{μs}\left({\color{gray}-0.250 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=2 $$42.8 \mathrm{ms} \pm 104 \mathrm{μs}\left({\color{gray}-0.402 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=2, PT=2, ET=2, E=2 $$56.7 \mathrm{ms} \pm 254 \mathrm{μs}\left({\color{gray}-0.375 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=255, PT=255, ET=255, E=255 $$66.1 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}-0.342 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=0 $$39.0 \mathrm{ms} \pm 199 \mathrm{μs}\left({\color{gray}-4.385 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_one_depth

Function Value Mean Flame graphs
entity_by_id 25 entities $$83.6 \mathrm{ms} \pm 436 \mathrm{μs}\left({\color{lightgreen}-52.930 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$21.0 \mathrm{ms} \pm 80.1 \mathrm{μs}\left({\color{gray}-0.434 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$27.5 \mathrm{ms} \pm 273 \mathrm{μs}\left({\color{gray}1.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$58.0 \mathrm{ms} \pm 185 \mathrm{μs}\left({\color{red}81.4 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$5.40 \mathrm{s} \pm 541 \mathrm{ms}\left({\color{gray}0.496 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_linkless

Function Value Mean Flame graphs
entity_by_id 100 entities $$2.21 \mathrm{ms} \pm 12.8 \mathrm{μs}\left({\color{gray}3.29 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$3.18 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{red}7.34 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$13.8 \mathrm{ms} \pm 75.9 \mathrm{μs}\left({\color{gray}-1.277 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$2.02 \mathrm{ms} \pm 7.54 \mathrm{μs}\left({\color{gray}0.010 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$2.02 \mathrm{ms} \pm 8.00 \mathrm{μs}\left({\color{gray}-0.783 \mathrm{\%}}\right) $$ Flame Graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team
Development

Successfully merging this pull request may close these issues.

2 participants