Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using @semanticNonNullField without importing @semanticNonNull fails the codegen #5829

Open
BoD opened this issue Apr 18, 2024 · 1 comment

Comments

@BoD
Copy link
Contributor

BoD commented Apr 18, 2024

type Query {
  nullableField: String
}

extend schema @link(
    url: "https://specs.apollo.dev/nullability/v0.3",
    import: ["@catch", "CatchTo", "@semanticNonNullField"] # not importing @semanticNonNull here
)
extend schema @catch(to: THROW)

extend type Query @semanticNonNullField(name: "nullableField")

In ExtensionsMerger.mergeObjectOrInterfaceDirectives, @semanticNonNull is implicitly added to the field's type. Validation fails later when it's not imported.

@martinbonnin
Copy link
Contributor

Good catch 👍 We'll probably need to handle validation before the merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants