Skip to content

fix(mapSchemaConfig): fix context for schema argument mapper#4829

Merged
yaacovCR merged 1 commit into
graphql:17.x.xfrom
yaacovCR:fix/map-schema-arg-parent-context
Jun 22, 2026
Merged

fix(mapSchemaConfig): fix context for schema argument mapper#4829
yaacovCR merged 1 commit into
graphql:17.x.xfrom
yaacovCR:fix/map-schema-arg-parent-context

Conversation

@yaacovCR

Copy link
Copy Markdown
Contributor

mapSchemaConfig is internal, so this bug has no direct public API surface by itself. The failure is in the context passed to SchemaElementKind.ARGUMENT mappers for field arguments: for type Query { user(id: ID): User }, the mapper received fieldOrDirectiveName = "Query" and parentTypeName = "user" instead of fieldOrDirectiveName = "user" and parentTypeName = "Query".

extendSchema and lexicographicSortSchema both traverse field arguments through mapSchemaConfig, but neither currently installs an ARGUMENT mapper, so their existing public behavior is not directly changed by the swapped parameters. The bug would surface if an internal schema utility used an ARGUMENT mapper while doing that traversal.

mapSchemaConfig is internal, so this bug has no direct public API surface by itself. The failure is in the context passed to SchemaElementKind.ARGUMENT mappers for field arguments: for type Query { user(id: ID): User }, the mapper received fieldOrDirectiveName = "Query" and parentTypeName = "user" instead of fieldOrDirectiveName = "user" and parentTypeName = "Query".

extendSchema and lexicographicSortSchema both traverse field arguments through mapSchemaConfig, but neither currently installs an ARGUMENT mapper, so their existing public behavior is not directly changed by the swapped parameters. The bug would surface if an internal schema utility used an ARGUMENT mapper while doing that traversal.
@yaacovCR yaacovCR added the PR: polish 💅 PR doesn't change public API or any observed behaviour label Jun 22, 2026
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

@yaacovCR is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@yaacovCR yaacovCR changed the title fix: pass field context to schema argument mapper fix(mapSchemaConfig): pass field context to schema argument mapper Jun 22, 2026
@yaacovCR yaacovCR changed the title fix(mapSchemaConfig): pass field context to schema argument mapper fix(mapSchemaConfig): fix context for schema argument mapper Jun 22, 2026
@yaacovCR yaacovCR merged commit 82da713 into graphql:17.x.x Jun 22, 2026
23 of 24 checks passed
@yaacovCR yaacovCR deleted the fix/map-schema-arg-parent-context branch June 22, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: polish 💅 PR doesn't change public API or any observed behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant