Open andimarek opened 11 months ago
@andimarek Hello! Thank you for considering this issue. The main difficulty with using the graphql-java library as is, lies in its design for very different use cases. From the IDE perspective, we need a library that can build a schema quickly and frequently. It should offer ways to extend types, fine-tune the schema-building and validation process, and crucially, handle schemas that are broken 90 percent of the time during editing in the editor.
The situation is further complicated because we use graphql-java not only for validation, but also for reference resolution, and completion. If a schema is not completely accurate, it can create various issues. For instance, all queries and types in the IDE might be marked as read, and there might be no autocompletion.
I have a list of the changes I've made over the past years. However, not all of these modifications have been implemented, or I may forget to mention some of them here:
AbstractNode
. Since additionalData
is a String map, it can't store IDE's data. Therefore, I've extended the constructor to accept a PSI node and a collection of other source nodes. This is useful when a node is built from multiple nodes with the same name. Additionally, I've overridden the method to calculate source location based on this information.type Query { id: ID name: <caret> }
should be a valid type in the schema with an id
field and a name
field without a type (and this also will cause an assertion in the current implementation of graphql-java).ProgressIndicator
, for instance, through a call like ProgressManager.checkCanceled()
. This function should be called frequently to cancel an ongoing schema building operation if the user changes a syntax tree concurrently and the schema is requested again.I'm eager to participate in this activity and contribute. However, I'm not sure if this aligns with your priorities and vision for the future of graphql-java. If not, my plan is to completely rewrite both the resolve and completion from scratch, using graphql-java solely for query validation, and finally remove it from the repository to be able to update it regularily.
Hi ... I am one of the GraphQL Java maintainer and I can see that GraphQL Java sources are copied and not a normal dependency.
I would love to know why and depending on the answer what we can do to make your life easier somehow and avoid coping sources.
Thanks, Andi