Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(graphcache): Fix untranspiled class field initializer syntax in bundle (#3275)

authored by

Phil Pluckthun and committed by
GitHub
997ecf55 9ba41307

+19 -2
+5
.changeset/healthy-chefs-learn.md
··· 1 + --- 2 + '@urql/exchange-graphcache': patch 3 + --- 4 + 5 + Fix untranspiled class property initializer syntax being leftover in build output. (Regression in #3053)
+6 -2
exchanges/graphcache/src/store/store.ts
··· 106 106 } 107 107 } 108 108 109 - keyOfField = keyOfField; 109 + keyOfField(fieldName: string, fieldArgs?: FieldArgs) { 110 + return keyOfField(fieldName, fieldArgs); 111 + } 110 112 111 113 keyOfEntity(data: Entity) { 112 114 // In resolvers and updaters we may have a specific parent ··· 148 150 return link || null; 149 151 } 150 152 151 - resolveFieldByKey = this.resolve; 153 + resolveFieldByKey(entity: Entity, field: string, args?: FieldArgs) { 154 + return this.resolve(entity, field, args); 155 + } 152 156 153 157 invalidate(entity: Entity, field?: string, args?: FieldArgs) { 154 158 const entityKey = this.keyOfEntity(entity);
+8
scripts/eslint/preset.js
··· 76 76 '@typescript-eslint/array-type': 'off', 77 77 'import/no-internal-modules': 'off', 78 78 79 + 'no-restricted-syntax': [ 80 + "error", 81 + { 82 + "selector": "PropertyDefinition[value]", 83 + "message": "Property definitions with value initializers aren’t transpiled" 84 + }, 85 + ], 86 + 79 87 '@typescript-eslint/no-unused-vars': ['error', { 80 88 argsIgnorePattern: '^_', 81 89 }],