Skip to content

Implement Bulk Operations support (Shopify Admin API) #22

@mtylty

Description

@mtylty

Bulk Operations Implementation Plan

1. Support for Bulk Queries and Mutations

  • Implement Ruby methods to:
    • Submit bulk queries using bulkOperationRunQuery.
    • Submit bulk mutations using stagedUploadsCreate (for JSONL upload) and bulkOperationRunMutation.
  • Allow users to specify the GraphQL query/mutation and variables.

2. Status Tracking and Result Retrieval

  • Provide methods to:
    • Poll the status of the current bulk operation (currentBulkOperation).
    • Retrieve results (download and parse JSONL files).
    • Cancel in-progress operations (bulkOperationCancel).

3. Webhook and Callback Integration

  • Support subscribing to the bulk_operations/finish webhook for job completion.
  • Allow users to register Ruby callbacks for completion, failure, and progress.

4. Error Handling and Logging

  • Handle and log all user errors, API errors, and operation failures.
  • Expose error codes and messages to the user.

5. CLI Integration

  • Add CLI commands for:
    • Submitting bulk queries/mutations.
    • Checking status.
    • Downloading and parsing results.
    • Canceling operations.

6. Documentation and Examples

  • Add clear documentation and usage examples for all features.

References


This issue tracks the implementation of Bulk Operations as described in the project README and the Shopify Admin API documentation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions