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 ES6 Array method being used in populateExchange (#1009)

authored by

Phil Pluckthun and committed by
GitHub
a2c3a1f8 0c92e289

+1 -2
+1 -2
exchanges/populate/src/populateExchange.ts
··· 151 151 ) => { 152 152 const selections: SelectionNode[] = []; 153 153 const validTypes = (schema.getType(type) as GraphQLObjectType).getFields(); 154 - const validTypeProperties = Object.keys(validTypes); 155 154 156 155 selectionSet.selections.forEach(selection => { 157 156 if (selection.kind === Kind.FIELD) { 158 - if (validTypeProperties.includes(selection.name.value)) { 157 + if (validTypes[selection.name.value]) { 159 158 if (selection.selectionSet) { 160 159 selections.push({ 161 160 ...selection,