Skip to content

Instantly share code, notes, and snippets.

View jbellenger's full-sized avatar

James Bellenger jbellenger

  • Oakland, CA
View GitHub Profile
@jbellenger
jbellenger / async-graphql-union-inline-fragment-bug.md
Created March 19, 2026 13:09
async-graphql bug: inline fragment with union type condition silently drops fields

async-graphql: Inline fragment with union type condition fails to match

Summary

When a query uses an inline fragment with a union type condition (e.g. ... on MyUnion), and the current runtime type is a member of that union, async-graphql fails to spread the fragment. The fields inside the fragment are silently dropped, resulting in empty data.

This affects both the dynamic schema API and macro-derived types.

Minimal reproduction