Skip to content

Boolean GraphQL types support#74

Merged
OlegoO merged 2 commits into
devfrom
feat/bool-type-support
Jul 8, 2026
Merged

Boolean GraphQL types support#74
OlegoO merged 2 commits into
devfrom
feat/bool-type-support

Conversation

@yuskithedeveloper

@yuskithedeveloper yuskithedeveloper commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds first-class support for boolean fields wrapped in Optional, closing a gap in xAPI's partial-update story. The Optional pattern lets mutation inputs distinguish "field not supplied" from "field explicitly set" — previously available for int, decimal, and string, but not bool. Without this, boolean flags in mutation inputs couldn't participate in the same conditional-mapping logic (if (input.Field.IsSpecified) ...) as other scalars.

This PR:

  • Adds two scalar graph types — OptionalBooleanGraphType (OptionalBoolean) and OptionalNullableBooleanGraphType (OptionalNullableBoolean) — mirroring the existing int/decimal implementations.
  • Registers the type mappings Optional → OptionalBooleanGraphType and Optional<bool?> → OptionalNullableBooleanGraphType in SchemaFactory.
  • Registers ValueConverter entries for bool → Optional, bool → Optional<bool?>, and bool? → Optional<bool?>.
    Additionally backfills previously missing converters for the numeric nullable variants: int → Optional<int?>, int? → Optional<int?>, decimal → Optional<decimal?>, and decimal? → Optional<decimal?>.

References

QA-test:

Jira-link:

Artifact URL:

https://vc3prerelease.blob.core.windows.net/packages/VirtoCommerce.Xapi_3.1013.0-pr-74-4c19.zip

@vc-ci

vc-ci commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review task created: https://virtocommerce.atlassian.net/browse/VCST-5291

@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@OlegoO OlegoO merged commit 7632b63 into dev Jul 8, 2026
10 checks passed
@OlegoO OlegoO deleted the feat/bool-type-support branch July 8, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants