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

fix: extendSchema for federation #262

Closed

Conversation

PacoDu
Copy link
Contributor

@PacoDu PacoDu commented Aug 24, 2020

This PR fixes an issue with extendSchema that wasn't working correctly with federated schema if we tried to extend the schema with an external type reference.

@PacoDu
Copy link
Contributor Author

PacoDu commented Aug 24, 2020

Do not merge !

service resolver sdl is not properly updated

@mcollina
Copy link
Collaborator

Any update on this?

@PacoDu
Copy link
Contributor Author

PacoDu commented Aug 31, 2020

We need a function to remove the federation metadata from the sdl (this is related to mercurius-js/mercurius-gateway#21). I tried to remove the directives from the schema before using printSchema but this also removes the directive statement from the type definition (which we need to keep for the sdl). I don't have the time to investigate this right now (I'm merging my schemas before as a workaround for now).

Also, I think this part is wrong: https://github.com/mcollina/fastify-gql/pull/262/files#diff-d9185daf57698ed90d572d1966e61b16R235

If anyone wants to fix the issue feel free to use this PR or start over. I'll try to fix this later if it's not resolved.

@mcollina
Copy link
Collaborator

Closing for now.

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

Successfully merging this pull request may close these issues.

2 participants