Skip to content

Commit 1a5211e

Browse files
committed
also followed eslint suggestions
1 parent 1bf2877 commit 1a5211e

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

internals-js/src/__tests__/operations.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3127,7 +3127,7 @@ describe('named fragment selection set restrictions at type', () => {
31273127

31283128
const frag = operation.fragments?.get('FonT1')!;
31293129

3130-
let { selectionSet, validator } = expandAtType(frag, schema, 'T1');
3130+
const { selectionSet, validator } = expandAtType(frag, schema, 'T1');
31313131
expect(selectionSet.toString()).toBe('{ x y }');
31323132
expect(validator?.toString()).toBeUndefined();
31333133
});

query-planner-js/src/__tests__/buildPlan.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5125,7 +5125,7 @@ describe('Named fragments preservation', () => {
51255125
{ reuseQueryFragments: true },
51265126
);
51275127

5128-
let query = gql`
5128+
const query = gql`
51295129
query Search {
51305130
theEntity {
51315131
... on EntityTypeA {
@@ -5151,7 +5151,7 @@ describe('Named fragments preservation', () => {
51515151
const operation = operationFromDocument(api, query, { validate: true });
51525152

51535153
const plan = queryPlanner.buildQueryPlan(operation);
5154-
let validationErrors = validateSubFetches(plan.node, subgraph2);
5154+
const validationErrors = validateSubFetches(plan.node, subgraph2);
51555155
expect(validationErrors).toHaveLength(0);
51565156
});
51575157
});
@@ -5172,21 +5172,21 @@ function validateSubFetches(
51725172
if (!plan) {
51735173
return [];
51745174
}
5175-
let fetches = findFetchNodes(subgraphDef.name, plan);
5176-
var results: {
5175+
const fetches = findFetchNodes(subgraphDef.name, plan);
5176+
const results: {
51775177
errors: readonly GraphQLError[];
51785178
serviceName: string;
51795179
fetchNode: FetchNode;
51805180
}[] = [];
5181-
for (let fetch of fetches) {
5182-
let subgraphName: string = fetch.serviceName;
5183-
let operation: string = fetch.operation;
5184-
let subgraph = buildSubgraph(
5181+
for (const fetch of fetches) {
5182+
const subgraphName: string = fetch.serviceName;
5183+
const operation: string = fetch.operation;
5184+
const subgraph = buildSubgraph(
51855185
subgraphName,
51865186
'http://subgraph',
51875187
subgraphDef.typeDefs,
51885188
);
5189-
let gql_errors = validate(
5189+
const gql_errors = validate(
51905190
subgraph.schema.toGraphQLJSSchema(),
51915191
parse(operation),
51925192
);

0 commit comments

Comments
 (0)