Skip to content

Use config parameter descriptions in GraphQL stored procedure args - #3733

Merged
Anusha Kolan (anushakolan) merged 12 commits into
mainfrom
dev/anushakolan/issue-3500-param-descriptions
Aug 6, 2026
Merged

Use config parameter descriptions in GraphQL stored procedure args#3733
Anusha Kolan (anushakolan) merged 12 commits into
mainfrom
dev/anushakolan/issue-3500-param-descriptions

Conversation

@anushakolan

Copy link
Copy Markdown
Contributor

Why make this change?

What is this change?

  • Updated stored-procedure GraphQL argument description resolution to use this precedence:
    • source.parameters[].description from runtime config (when present)
    • database parameter description (when present)
    • fallback text (parameters for <stored-procedure> stored-procedure)
  • Added regression tests to verify config-description precedence and fallback behavior.

How was this tested?

  • Integration Tests
  • Unit Tests

Focused unit test run:

dotnet test .\src\Service.Tests\Azure.DataApiBuilder.Service.Tests.csproj --filter "StoredProcedure_ParameterDescription_UsesConfigDescription|StoredProcedure_ParameterDescription_FallsBackToDatabaseDescription|StoredProcedure_RequiredWithDefault_KeepsDefaultValue|StoredProcedure_RequiredFlag_ProducesNonNullType"

Sample Request(s)

  • Example GraphQL introspection request:
query {
  __type(name: "Mutation") {
    fields {
      name
      args {
        name
        description
      }
    }
  }
}
  • Example CLI usage:
dotnet "src/out/engine/net10.0/Azure.DataApiBuilder.Service.dll" --ConfigFileName "dab-config.verify-3500.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.

Pull request overview

Updates GraphQL stored-procedure argument description generation so schema docs prefer runtime config parameter descriptions, improving introspection/docs quality for API consumers (per #3500).

Changes:

  • Updated GraphQLStoredProcedureBuilder to resolve argument descriptions with precedence: config description → DB/definition description → default fallback text.
  • Added unit tests validating config-description precedence and DB-description fallback for stored-procedure args.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Service.GraphQLBuilder/GraphQLStoredProcedureBuilder.cs Applies new description precedence logic when building stored-procedure GraphQL argument definitions.
src/Service.Tests/GraphQLBuilder/Sql/StoredProcedureBuilderTests.cs Adds regression tests for config-vs-DB description precedence on stored-procedure arguments.

Comment thread src/Service.Tests/GraphQLBuilder/Sql/StoredProcedureBuilderTests.cs
Comment thread src/Service.Tests/GraphQLBuilder/Sql/StoredProcedureBuilderTests.cs Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved, but left some questions.

Comment thread src/Service.Tests/GraphQLBuilder/Sql/StoredProcedureBuilderTests.cs Outdated
Comment thread src/Service.GraphQLBuilder/GraphQLStoredProcedureBuilder.cs
Comment thread src/Service.Tests/GraphQLBuilder/Sql/StoredProcedureBuilderTests.cs

@aaronburtle aaronburtle 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.

Looks good, just a couple final comments.

@anushakolan
Anusha Kolan (anushakolan) merged commit 7600de6 into main Aug 6, 2026
14 checks passed
@anushakolan
Anusha Kolan (anushakolan) deleted the dev/anushakolan/issue-3500-param-descriptions branch August 6, 2026 18:11
@github-project-automation github-project-automation Bot moved this from Todo to Done in Data API builder Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Param descriptions not surfaced in GraphQL

4 participants