Skip to content

Conversation

@ericlee878
Copy link
Contributor

@ericlee878 ericlee878 commented Nov 8, 2025

Summary
This PR lays the groundwork for the shopify app execute command in the Shopify CLI. It creates the minimal foundations of the BulkOps CLI that future PRs will build upon.

Implementation

  1. Bulk Operations Service Layer (packages/app/src/cli/services/bulk-operations.ts)
  • Handles authentication with Shopify Admin API
  • Wraps the bulkOperationRunQuery mutation
  • Provides type-safe interfaces for results and errors
  • Foundation for future bulk operation commands
  1. GraphQL API Integration (packages/app/src/cli/api/graphql/bulk_operation_run_query.ts)
  • Schemas for bulk operation responses
  1. Basic Execute Command (packages/app/src/cli/commands/app/execute.ts)
  • Accepts a GraphQL query via the --query flag
  • Requires app context and store selection

Testing

  1. Follow the instructions here to setup a test app
  2. Go here and create a store (if not already have one).
  3. Use the command pnpm shopify app execute --path <path to test app>
  4. Get the BulkOps id that is returned and run this query in Services Internal.
SELECT * from bulk_operations where id = <gid>;

Yours should pop up. Mine was in shard 239 (for reference).

Questions

  • In the documentation, there are two arguments we have to specify for the GraphQL call. We already have query, but do we want to add a flag for groupObjects? Or should we have it always have it be its default value?

NEED TO ADD UNIT TESTS

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

Unused types (3)

Filename types
packages/app/src/cli/services/bulk-operations.ts BulkOperationRunQueryOptions
BulkOperationResult
BulkOperationError

@ericlee878 ericlee878 changed the title app connection setup step 1 Connect app in BulkOperation CLI to BulkOperation API Nov 8, 2025
@ericlee878 ericlee878 changed the title Connect app in BulkOperation CLI to BulkOperation API Initial Setup: Bulk Operations Infrastructure for Shopify CLI Nov 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.14% (-0.09% 🔻)
13608/17194
🟡 Branches
73.05% (-0.07% 🔻)
6652/9106
🟡 Functions
79.29% (-0.05% 🔻)
3507/4423
🟡 Lines
79.5% (-0.1% 🔻)
12853/16167
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / bulk_operation_run_query.ts
0% 100% 100% 0%
🔴
... / bulk-operations.ts
0% 0% 0% 0%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / execute.ts
0%
0% (-100% 🔻)
0% 0%

Test suite run success

3358 tests passing in 1372 suites.

Report generated by 🧪jest coverage report action from 747c9e6

@ericlee878 ericlee878 force-pushed the 11-07-implement_simple_bulk_query branch from 2dfb843 to b8f02df Compare November 8, 2025 01:24
@ericlee878 ericlee878 force-pushed the 11-07-implement_simple_bulk_query branch from b8f02df to 747c9e6 Compare November 8, 2025 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant