Skip to content

Bug fix for Entity description not surfaced in GraphQL.#3732

Open
anushakolan wants to merge 2 commits into
mainfrom
dev/anushakolan/issue-3499-graphql-entity-description
Open

Bug fix for Entity description not surfaced in GraphQL.#3732
anushakolan wants to merge 2 commits into
mainfrom
dev/anushakolan/issue-3499-graphql-entity-description

Conversation

@anushakolan

Copy link
Copy Markdown
Contributor

Why make this change?

  • Closes [Bug]: Entity description not surfaced in GraphQL #3499.
    • GraphQL stored-procedure fields were always published with a hardcoded description, even when an entity-level description was configured. This made schema docs inaccurate for users relying on config-provided descriptions.
    • Additional discussion threads: None.

What is this change?

  • Updated stored-procedure GraphQL field generation to prefer entity.Description when present, with the existing hardcoded text retained as a fallback.
  • Added a regression unit test to verify that stored-procedure execute fields use the configured entity description.

How was this tested?

  • Integration Tests
  • Unit Tests

Sample Request(s)

  • Example GraphQL request:
query {
  executeGetFullName(name: "Ada") {
    result
  }
}
  • Example CLI usage:
dab start --config "dab-config.json"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Ready to approve

The change is small, targeted, and includes a regression unit test that directly validates the reported behavior.

Note: this review does not count toward required approvals for merging.

Pull request overview

This PR fixes GraphQL schema documentation for stored-procedure execute* fields by using the configured entity description (when provided) instead of always emitting a hardcoded description string, aligning schema docs with runtime config and the GraphQL description spec.

Changes:

  • Updated stored-procedure GraphQL field generation to prefer entity.Description, with the previous hardcoded text as a fallback.
  • Added a unit test to prevent regressions by asserting the execute* field description matches the configured entity description.
File summaries
File Description
src/Service.GraphQLBuilder/GraphQLStoredProcedureBuilder.cs Uses entity.Description for the stored-procedure execute* field description, falling back to the previous hardcoded text when absent.
src/Service.Tests/GraphQLBuilder/Sql/StoredProcedureBuilderTests.cs Adds a regression test validating the execute* field description uses the entity-level description from config.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Low

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.

@anushakolan anushakolan changed the title Dev/anushakolan/issue 3499 graphql entity description Bug fix for Entity description not surfaced in GraphQL. Jul 21, 2026

@RubenCerna2079 RubenCerna2079 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a question to address

entityName: "SpDescription",
entityDescription: entityDescription);

Assert.AreEqual(entityDescription, field.Description?.Value);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there already a test that checks if the entityDescription is null it will use the hard coded value?

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

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

[Bug]: Entity description not surfaced in GraphQL

4 participants