Skip to content

Commit

Permalink
chore: update name for graphql batch operations (#25610)
Browse files Browse the repository at this point in the history
* feat: update name for graphql batch operations

* Validate selection kind

* Update packages/data-context/src/sources/CloudDataSource.ts

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>

---------

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
  • Loading branch information
estrada9166 and tgriesser authored Jan 30, 2023
1 parent 86f92da commit 1f9ae86
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion packages/data-context/src/sources/CloudDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,26 @@ function namedExecutionDocument (document: DocumentNode) {
}

hasReplaced = true

const selectionSet = new Set()

op.selectionSet.selections.forEach((s) => {
if (s.kind === 'Field') {
selectionSet.add(s.name.value)
}
})

let operationName = 'batchTestRunnerExecutionQuery'

if (selectionSet.size > 0) {
operationName = `${operationName}_${Array.from(selectionSet).sort().join('_')}`
}

const namedOperationNode: OperationDefinitionNode = {
...op,
name: {
kind: 'Name',
value: 'batchTestRunnerExecutionQuery',
value: operationName,
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ async function makeE2ETasks () {

operationCount[operationName ?? 'unknown']++

if (operationName === 'batchTestRunnerExecutionQuery' && remoteGraphQLInterceptBatched) {
if (operationName?.startsWith('batchTestRunnerExecutionQuery') && remoteGraphQLInterceptBatched) {
const fn = remoteGraphQLInterceptBatched
const keys: string[] = []
const values: Promise<any>[] = []
Expand Down

9 comments on commit 1f9ae86

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1f9ae86 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/linux-arm64/develop-1f9ae86abe4ac088c470cf0d976e1de93e36067f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1f9ae86 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/linux-x64/develop-1f9ae86abe4ac088c470cf0d976e1de93e36067f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1f9ae86 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/linux-arm64/release/13.0.0-1f9ae86abe4ac088c470cf0d976e1de93e36067f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1f9ae86 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/linux-x64/release/13.0.0-1f9ae86abe4ac088c470cf0d976e1de93e36067f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1f9ae86 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/darwin-x64/develop-1f9ae86abe4ac088c470cf0d976e1de93e36067f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1f9ae86 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/darwin-x64/release/13.0.0-1f9ae86abe4ac088c470cf0d976e1de93e36067f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1f9ae86 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/win32-x64/develop-1f9ae86abe4ac088c470cf0d976e1de93e36067f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1f9ae86 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/darwin-arm64/release/13.0.0-1f9ae86abe4ac088c470cf0d976e1de93e36067f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1f9ae86 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/win32-x64/release/13.0.0-1f9ae86abe4ac088c470cf0d976e1de93e36067f/cypress.tgz

Please sign in to comment.