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

Incompatible with Apollo Federation #51

Closed
jasonav opened this issue Oct 7, 2023 · 4 comments
Closed

Incompatible with Apollo Federation #51

jasonav opened this issue Oct 7, 2023 · 4 comments

Comments

@jasonav
Copy link

jasonav commented Oct 7, 2023

When using Apollo Federation, you need this at the top of your schema file:

extend schema 
@link(url: "https://specs.apollo.dev/federation/v2.0", 
import: ["@key", "https://github.com/Shareable", "@inaccessible"])

GraphQXL balked at this. I worked around it by storing this in a different file and writing a small script to generate and then concatenate, but it would be better if GraphQXL just recognized this and left it alone.

@gabotechs
Copy link
Owner

I suppose that you are referring to something like this:

extend schema 
@link(url: "https://specs.apollo.dev/federation/v2.0", 
import: ["@key", "https://github.com/Shareable", "@inaccessible"])

I think it's doable, I can have a PR prepared in some days for this

@jasonav
Copy link
Author

jasonav commented Oct 7, 2023

Yes, sorry, the copy-paste munged it. Edited to fix.

@gabotechs
Copy link
Owner

This PR that was just merged added support for the extend keyword as defined in the formal graphql specification, so you should be able to use it not only on the schema but also in types, inputs, enums, etc...

It was released under the 0.40.0 tag, which is currently available in npm (npm install node-graphqxl), and it will soon be available in the oficial brew repositories.

Let me know if you find any problems

@jasonav
Copy link
Author

jasonav commented Nov 17, 2023

Works great. Thanks!

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

2 participants