File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package schemaloader
22
33import (
44 "fmt"
5- "strings"
65
76 "github.com/wundergraph/graphql-go-tools/v2/pkg/ast"
87 "github.com/wundergraph/graphql-go-tools/v2/pkg/engine/jsonschema"
@@ -48,8 +47,12 @@ func (b *SchemaBuilder) buildSchemaForOperation(operation *Operation) error {
4847 }
4948 operation .JSONSchema = s
5049
51- // Merge descriptions (operation takes priority)
52- operation .Description = strings .TrimSpace (operation .Description + " " + schema .Description )
50+ // Use operation description if provided, otherwise fall back to schema description
51+ // This ensures user-provided descriptions take absolute priority
52+ if operation .Description == "" {
53+ operation .Description = schema .Description
54+ }
55+ // If operation.Description is not empty, keep it as-is (don't merge with schema description)
5356 }
5457
5558 return nil
You can’t perform that action at this time.
0 commit comments