Skip to content

Commit

Permalink
also followed eslint suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
duckki committed Apr 3, 2024
1 parent 1bf2877 commit 1a5211e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion internals-js/src/__tests__/operations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3127,7 +3127,7 @@ describe('named fragment selection set restrictions at type', () => {

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

let { selectionSet, validator } = expandAtType(frag, schema, 'T1');
const { selectionSet, validator } = expandAtType(frag, schema, 'T1');
expect(selectionSet.toString()).toBe('{ x y }');
expect(validator?.toString()).toBeUndefined();
});
Expand Down
18 changes: 9 additions & 9 deletions query-planner-js/src/__tests__/buildPlan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5125,7 +5125,7 @@ describe('Named fragments preservation', () => {
{ reuseQueryFragments: true },
);

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

const plan = queryPlanner.buildQueryPlan(operation);
let validationErrors = validateSubFetches(plan.node, subgraph2);
const validationErrors = validateSubFetches(plan.node, subgraph2);
expect(validationErrors).toHaveLength(0);
});
});
Expand All @@ -5172,21 +5172,21 @@ function validateSubFetches(
if (!plan) {
return [];
}
let fetches = findFetchNodes(subgraphDef.name, plan);
var results: {
const fetches = findFetchNodes(subgraphDef.name, plan);
const results: {
errors: readonly GraphQLError[];
serviceName: string;
fetchNode: FetchNode;
}[] = [];
for (let fetch of fetches) {
let subgraphName: string = fetch.serviceName;
let operation: string = fetch.operation;
let subgraph = buildSubgraph(
for (const fetch of fetches) {
const subgraphName: string = fetch.serviceName;
const operation: string = fetch.operation;
const subgraph = buildSubgraph(
subgraphName,
'http://subgraph',
subgraphDef.typeDefs,
);
let gql_errors = validate(
const gql_errors = validate(
subgraph.schema.toGraphQLJSSchema(),
parse(operation),
);
Expand Down

0 comments on commit 1a5211e

Please sign in to comment.