Skip to content

[Shopify] Replace GraphQL query codeunits with resource files#7198

Open
onbuyuka wants to merge 9 commits intomainfrom
private/onbuyuka/shpfygqlrefactor
Open

[Shopify] Replace GraphQL query codeunits with resource files#7198
onbuyuka wants to merge 9 commits intomainfrom
private/onbuyuka/shpfygqlrefactor

Conversation

@onbuyuka
Copy link
Contributor

@onbuyuka onbuyuka commented Mar 17, 2026

Summary

  • Replace ~143 individual ShpfyGQL*.Codeunit.al files (pure data containers) with .graphql resource files in .resources/graphql/, organized by area (Customers, Orders, Products, etc.)
  • Each .graphql file contains a # cost: N header and the JSON query body, loaded at runtime via NavApp.GetResourceAsText()
  • Rename enum values with area prefixes (GetCustomerIdsCustomers_GetCustomerIds) for convention-based file path resolution
  • Remove the Shpfy IGraphQL interface and implements clause from the enum
  • Update all ~40 call sites and 2 test subscribers to use new enum names
  • Clean up PermissionSet references to deleted codeunits

Result: ~143 object IDs freed. Adding a new query is now 2 steps (create .graphql file + add enum value) instead of 4.

AB#625872

🤖 Generated with Claude Code

onbuyuka and others added 5 commits March 17, 2026 16:05
Move ~143 individual GraphQL query codeunits into .graphql resource
files organized by functional area (Customers, Orders, Products, etc.).
Each file contains a cost comment and the JSON query body, loaded at
runtime via NavApp.GetResourceAsText().

This eliminates ~143 object IDs, removes the IGraphQL interface, and
reduces adding a new query from 4 steps to 2 (create .graphql file +
add enum value).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Revert ShpfyBulkOperationMgt and ShpfyAuthenticationMgt to their
original state — those contained local-only modifications.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace direct codeunit references to deleted ShpfyGQL* codeunits
in test mock subscribers with GraphQLQueries.GetQueryWithCost() calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Mar 17, 2026
@github-actions github-actions bot added this to the Version 29.0 milestone Mar 17, 2026
onbuyuka and others added 4 commits March 17, 2026 22:09
…e tag

Create ObsoleteState = Pending stubs for 14 previously-public GQL
codeunits to avoid breaking dependent extensions (AS0088). Stubs
delegate to the new GraphQLQueries dispatcher.

Also fix obsolete tag on Inventory_GetLocationOfOrderLines from
28.0 to 29.0 (AS0072).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Lines)

Revert to original #if not CLEAN28 block — this value is already
pending removal and doesn't need changes from this refactor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@onbuyuka onbuyuka marked this pull request as ready for review March 18, 2026 09:19
@onbuyuka onbuyuka requested a review from a team as a code owner March 18, 2026 09:19
@onbuyuka onbuyuka enabled auto-merge (squash) March 18, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants