Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,8 @@ jobs:
# ========== Bit CI Jobs ==========
bit_pr:
# uncomment in case this job fails with "Killed".
# resource_class: 2xlarge
resource_class: xlarge
resource_class: 2xlarge
# resource_class: xlarge
<<: *defaults
environment:
# BIT_FEATURES: cloud-importer-v2
Expand Down
11 changes: 10 additions & 1 deletion scopes/harmony/graphql/graphql.ui.runtime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,16 @@ export class GraphqlUI {
}

private createCache({ state }: { state?: NormalizedCacheObject } = {}) {
const cache = new InMemoryCache();
const cache = new InMemoryCache({
typePolicies: {
// The Aspect type has an `id` field (the aspect ID, e.g. "teambit.envs/envs").
// Without this, Apollo normalizes all Aspect objects by __typename:id, causing
// every component to share a single cache entry per aspect ID. This means the
// last-written aspect data overwrites all others (e.g. all components show the
// same env). Disabling normalization stores aspects inline per component.
Aspect: { keyFields: false },
},
});

if (state) cache.restore(state);

Expand Down