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

[federation] _resolve_reference field not removed from schema #77

Open
tristantreb opened this issue Mar 2, 2023 · 2 comments
Open

Comments

@tristantreb
Copy link
Contributor

Hi,

I have implemented a reference resolver using absinthe federation and noticed that the _resolve_reference field is not removed from the schema.
image

It looks like the behaviour is present in the library code (in the module Absinthe.Federation.Schema.Phase.RemoveResolveReferenceFields) but is not working.

Btw, I also implemented a reference resolver in node.js, and in this case the __resolve_reference field is indeed removed from the schema, which suggest that it's the right behaviour.

How can I remove the _reference_resolver field from my schema ?

@tristantreb tristantreb changed the title [federation] [federation] _resolve_reference field not removed from schema Mar 2, 2023
@kzlsakal
Copy link
Collaborator

kzlsakal commented Mar 3, 2023

I believe the RemoveResolveReferenceFields only runs for SDL generation which is used by the federated router/gateway and also the Mix task to print the subgraph's SDL.

This means that the _resolveReference fields don't make it to the supergraph schema, but it's in the subgraph's schema with the current implementation. @kdawgwilk may correct me if I'm wrong but we may need to change approach if we are to remove the _resolveReference field from the schema itself.

@kdawgwilk
Copy link
Collaborator

If we remove it from the schema absinthe might remove the field from the blueprint altogether so maybe a good medium would be to just hide it from introspection.

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

No branches or pull requests

3 participants