-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
[Question] Does anybody use @semanticNonNull with a federated graph? Is it even possible? #2528
Comments
What exactly isn’t working for you? I don’t actually use it in any of our graphs, but it’s part of the compatibility check from Apollo for compliant subgraphs, so maybe the example here would help? https://github.com/apollographql/apollo-federation-subgraph-compatibility/blob/main/implementations/caliban/src/main/scala/models/package.scala |
Sorry, I could probably have expanded a bit in my post. What we do is this:
Now, we want to make The observed behaviour seems to be what we should expect, though. It seems we need to specify that the directive should be passed through to the supergraph with directive @semanticNonNull on FIELD_DEFINITION
schema
@link(url: "https://specs.apollo.dev/federation/v2.3", import: ["@key", "@requires", "@provides", "@external", "@shareable", "@tag", "@inaccessible", "@override", "@extends", "@composeDirective", "@interfaceObject"])
@link(url: "https://specs.apollo.dev/nullability/v0.2", import: ["@semanticNonNull"])
@composeDirective(name: "@semanticNonNull")
{
query: Query
mutation: Mutation
} We expected that this would make the directive visible for our frontends. It seems however that the directive does not become visible through introspection or the sdl. Today I investigated further and I notice that I know this is not a Caliban issue - I was just hoping that someone here might have experience with this and possibly an idea about where to read to understand the observed behaviour. Just to be clear, when testing the |
I'm working on a subgraph written with Caliban. It mostly works great.
Recently, we've started to test
@semanticNonNull
, and it also seems to work great when we test it only on the subgraph. However, it seems hard or impossible to actually pass the directive through the supergraph. We use Hive as the router, but I've also tested with Apollo rover. I've tried to use the@composeDirective
thing explained here, but it simply does not seem to work as expected.I'm just curious if anyone else have tried this before and/or if someone knows if this is even possible?
The text was updated successfully, but these errors were encountered: