-
Notifications
You must be signed in to change notification settings - Fork 97
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
A way for plugins to manage library definitions #697
Comments
Hi @BoD! How will you provide a schema file in your plugin? Will you follow the same approach as the GraphQL plugin? |
This is to be determined - but I think the most flexible way would probably to have an API that takes a String as an input, so a plugin could programmatically build this String to handle different cases. To give your more context, in Apollo Kotlin (and other Apollo tools) we have a generic So for instance, in v4 we are adding a new directive extend schema @link(
url: "https://specs.apollo.dev/nullability/v0.1",
import: ["@catch", "CatchTo"]
) When doing this Apollo Kotlin will add the The ultimate goal for us would be to have support for this mechanism in the plugin. So when I hope this makes sense :) |
We are the maintainers of the Apollo Kotlin plugin, which depends on the GraphQL one.
The GraphQL plugin already supports Apollo Kotlin specific definitions from this file and through the
GraphQLLibraryManager
.When we've added new definitions in our library in the past we've opened PRs in this repo to update that file.
But a more dynamic mechanism (in
GraphQLLibraryManager
or a dedicated EP I suppose?) where our plugin could add/remove definitions on the fly would be great. We would be more autonomous and reactive when new definitions are added to our lib, and this would also enable the ability to have different versions of the definitions, depending on which version is used by the project, or which features are enabled in the lib's configuration.There is probably some overlap with #624, which is as I understand it essentially the same ask, but from an end-user point of view.
The text was updated successfully, but these errors were encountered: