Skip to content

Gift Cards Balance Currency Code not correct GraphQL #1249

Description

@Fashionepaul

First thanks to you all, for your excellent work improving the Shopify integration.

I have been using the new query builders to get gift card information from Shopify.

The currencyCode returns 2 instead of GBP, which is incorrect.

Using what a third-party client matches the MoneyV2 reference.

    var builder = new GiftCardsOperationQueryBuilder()
      .Nodes(nodes =>
      {
        nodes.Id()
        .Enabled()
        .CreatedAt()
        .UpdatedAt()
        .ExpiresOn()
        .LastCharacters()
        .Balance(balance =>
        {
          balance.Amount()
          .CurrencyCode();
        });
      })
      .SetArguments(args => args.First(2).Query("12345678"));

Produces the following json:

query {
  giftCards(first: 2, query: "12345678") {
    nodes {
      id
      enabled
      createdAt
      updatedAt
      expiresOn
      lastCharacters
      balance {
        amount
        currencyCode
      }
    }
  }
}

Gift Cards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions