Skip to content

Use config parameter descriptions in GraphQL stored procedure args#3733

Open
anushakolan wants to merge 3 commits into
mainfrom
dev/anushakolan/issue-3500-param-descriptions
Open

Use config parameter descriptions in GraphQL stored procedure args#3733
anushakolan wants to merge 3 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
anushakolan and others added 2 commits July 21, 2026 14:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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]: Param descriptions not surfaced in GraphQL

4 participants