gabotechs / graphqxl

GraphQXL is a new language built on top of the GraphQL syntax that extends the original language with some additional features useful for creating scalable and big server side schemas. This repository contains the source code for the GraphQXL compiler.
https://gabotechs.github.io/graphqxl
MIT License
272 stars 8 forks source link

Incompatible with Apollo Federation #51

Closed jasonav closed 12 months ago

jasonav commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

gabotechs commented 12 months ago

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 commented 10 months ago

Works great. Thanks!