Skip to content

Commit 629fb7e

Browse files
nickwesselmanclaude
andcommitted
Fix knip unused exports and prettier formatting
Remove export from parseVariables and RunGraphQLExecutionInput since they are only used internally. Fix prettier multiline formatting in tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 550cead commit 629fb7e

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

packages/app/src/cli/services/execute-operation.test.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,7 @@ describe('runGraphQLExecution', () => {
392392
version: '2024-07',
393393
responseOptions: {handleErrors: false},
394394
})
395-
expect(renderSuccess).toHaveBeenCalledWith(
396-
expect.objectContaining({headline: 'Operation succeeded.'}),
397-
)
395+
expect(renderSuccess).toHaveBeenCalledWith(expect.objectContaining({headline: 'Operation succeeded.'}))
398396
})
399397

400398
test('parses variables from flag', async () => {
@@ -409,9 +407,7 @@ describe('runGraphQLExecution', () => {
409407
version: '2024-07',
410408
})
411409

412-
expect(adminRequestDoc).toHaveBeenCalledWith(
413-
expect.objectContaining({variables: {key: 'value'}}),
414-
)
410+
expect(adminRequestDoc).toHaveBeenCalledWith(expect.objectContaining({variables: {key: 'value'}}))
415411
})
416412

417413
test('writes output to file when outputFile specified', async () => {
@@ -442,9 +438,7 @@ describe('runGraphQLExecution', () => {
442438
version: '2024-07',
443439
})
444440

445-
expect(renderError).toHaveBeenCalledWith(
446-
expect.objectContaining({headline: 'GraphQL operation failed.'}),
447-
)
441+
expect(renderError).toHaveBeenCalledWith(expect.objectContaining({headline: 'GraphQL operation failed.'}))
448442
})
449443

450444
test('propagates non-ClientError errors', async () => {

packages/app/src/cli/services/execute-operation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface ExecuteOperationInput {
2525
version?: string
2626
}
2727

28-
export interface RunGraphQLExecutionInput {
28+
interface RunGraphQLExecutionInput {
2929
adminSession: AdminSession
3030
query: string
3131
variables?: string
@@ -34,7 +34,7 @@ export interface RunGraphQLExecutionInput {
3434
version: string
3535
}
3636

37-
export async function parseVariables(
37+
async function parseVariables(
3838
variables?: string,
3939
variableFile?: string,
4040
): Promise<{[key: string]: unknown} | undefined> {

0 commit comments

Comments
 (0)