-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support reading multiple schema files (glob pattern) #264
Comments
Sadly this is also a blocker for me so I have to continue using classic code generation tools. |
At least when using GraphQLSP with Implementation PRs to land soon are:
Closing this in favour of 0no-co/gql.tada#248, since that tracks this. |
The multi-schema is not to merge schema's no, we have no glob support for now and atm I would encourage you if the endpoint has a merged schema to merge schemas or introspect the endpoint |
@JoviDeCroock I got really excited when I heard about multiple schema files being supported now. Then I saw that it doesn't support merged schema. We're pulling in our backend which contains the schema definitions simply as a submodule to our frontend codebase and then read the schema from there. The point of gql.tada would be to avoid some extra build steps like code generation but now require me to execute some script to prepare the schema files which kind of defeats the purpose of this IMO. I'll simply stay with code generation tools as I'm not seeing any advantage here. |
@levrik this is still an open-source repository, you are free to create RFC's and even contribute them. We have limited time and prioritise according to our own balance. I will re-open this issue as it's not solved but we might benefit from having a clearer description, which has been done by iterating |
Yep my bad, sorry @JoviDeCroock if it was not clear, thanks again for your nice package and for reopening the issue! |
@JoviDeCroock Sadly I won't have the time to contribute. If I sounded a bit too harsh I'm sorry for that. I just wanted to point out this use-case. I think such a setup might be not too uncommon and I only wanted to point out that by not supporting it you basically make your project unusable to many people. I'm fine with relying on alternatives. |
This is a bit besides the point, but let me take a larger circle into why we haven't added support for this yet. Creating multiple The key here to understand is that these For example, if you're using Say, for instance, you're using this: https://the-guild.dev/graphql/codegen/docs/guides/graphql-server-apollo-yoga-with-server-preset A lot of servers again also support writing a merged SDL file to disk in development to merge separate parts of the schema into one file. An alternative to this is also URL-introspection, which can either be done on every If we were to support Basically, there's a neverending list of creating GraphQL APIs and servers. A merged SDL/JSON schema file however is what we see as the best cross-over point for intercompatibility. In theory, code-first tools can achieve deeper integration than this, and we do have an issue related to this: 0no-co/gql.tada#10 |
@kitten The backend is written in Python and uses https://github.com/mirumee/ariadne. It directly consumes the schema spread over several files. While maybe the code-first generation approach is very popular in JS/TS it doesn't seem to be that much outside. |
Hey there,
As GQL support multiple schema files, I would like to know if you plan to support this kind of parsing method:
For know, I need to create a script that generates a single common schema file to make GraphqlSP working.
This is not a good developer experience because:
Let me know if it's unclear or if you know a workaround?
Thanks for you help!
The text was updated successfully, but these errors were encountered: