graphql-java-servlet icon indicating copy to clipboard operation
graphql-java-servlet copied to clipboard

Servlet endpoint for GraphQL Java

Results 26 graphql-java-servlet issues
Sort by recently updated
recently updated
newest added

This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more.[View this repository on the Mend.io Web Portal](https://developer.mend.io/github/graphql-java-kickstart/graphql-java-servlet). ## Open These updates have all been...

Support of graphql-transport-ws GraphQL subscription protocol

[{"_id":"635078b1ea01ec786e748e17","body":"Definitely, not sure yet when we'll be able to have it ready though.","issue_id":1660627225497,"origin_id":1218409524,"user_origin_id":13518144,"create_time":1660764642,"update_time":1660764642,"id":1666218161318,"updated_at":"2022-10-19T22:22:41.317000Z","created_at":"2022-10-19T22:22:41.317000Z"},{"_id":"635078b1ea01ec786e748e19","body":"Any update on when graphql-transport-ws will be supported?","issue_id":1660627225497,"origin_id":1240915423,"user_origin_id":17554674,"create_time":1662652833,"update_time":1662658601,"id":1666218161322,"updated_at":"2022-10-19T22:22:41.322000Z","created_at":"2022-10-19T22:22:41.322000Z"},{"_id":"664a89984ecfda50de15d47c","body":"Are there major changes required to support the sub-protocol? Or is it possible to just override method (possibly **modifyHandshake**) in `GraphQLWebsocketServlet` in the meantime, @oliemansm ? \r\n\r\n\r\nThe existing graphql-ws protocol has been unmaintained for ~5 years. So we're concerned about moving forward without a workaround. ","issue_id":1660627225497,"origin_id":1488688243,"user_origin_id":13663810,"create_time":1680098772,"update_time":1680099355,"id":1716160920023,"updated_at":"2024-05-19T23:22:00.023000Z","created_at":"2024-05-19T23:22:00.023000Z"},{"_id":"664a89984ecfda50de15d47d","body":"@oliemansm Do you start working for the temporary fix as @sgrannan proposed or you are starting to implement the graphql-transport-ws specs?\r\n\r\nIf it is the former one I can start (in my free time) to work on it","issue_id":1660627225497,"origin_id":1545776986,"user_origin_id":44871614,"create_time":1683899178,"update_time":1683899210,"id":1716160920027,"updated_at":"2024-05-19T23:22:00.027000Z","created_at":"2024-05-19T23:22:00.027000Z"},{"_id":"664a89984ecfda50de15d47e","body":"I've started to work on the actual implementation. Hope to make some good progress and be able to merge early next week. Will keep you posted. ","issue_id":1660627225497,"origin_id":1545779066,"user_origin_id":13518144,"create_time":1683899271,"update_time":1683899271,"id":1716160920029,"updated_at":"2024-05-19T23:22:00.029000Z","created_at":"2024-05-19T23:22:00.029000Z"},{"_id":"664a89984ecfda50de15d47f","body":"There is a rather \"slim\" implementation of the `graphql-transport-ws` protocol in Kotlin...\r\n\r\nhttps:\/\/github.com\/Netflix\/dgs-framework\/blob\/master\/graphql-dgs-subscriptions-websockets\/src\/main\/kotlin\/com\/netflix\/graphql\/dgs\/subscriptions\/websockets\/WebsocketGraphQLTransportWSProtocolHandler.kt\r\n\r\n@oliemansm do you have some news? wdyt of making it work with annotated `@ServerEndpoint` classes?\r\n\r\nLike this...\r\n\r\n```java\r\n@ServerEndpoint(value = \"\/graphql\", subprotocols = \"graphql-transport-ws\")\r\npublic class MyGraphlWs extends BaseGraphQLTransportWs {\r\n\r\n @Inject private GraphQLConfiguration configuration;\r\n\r\n @OnOpen\r\n public void onOpen(Session session, EndpointConfig endpointConfig) {\r\n super.onOpen(session, endpointConfig);\r\n }\r\n\r\n @OnMessage \/\/ call super.onMessage\r\n @OnClose \/\/ call super.onClose\r\n @OnError \/\/ call super.onError\r\n\r\n}\r\n\r\n\r\n```","issue_id":1660627225497,"origin_id":1568224636,"user_origin_id":901354,"create_time":1685444237,"update_time":1685444237,"id":1716160920034,"updated_at":"2024-05-19T23:22:00.033000Z","created_at":"2024-05-19T23:22:00.033000Z"},{"_id":"664a89984ecfda50de15d480","body":"Hi, is there any update or ETA on this?\r\nThanks :) ","issue_id":1660627225497,"origin_id":1686135311,"user_origin_id":32073610,"create_time":1692616574,"update_time":1692616574,"id":1716160920039,"updated_at":"2024-05-19T23:22:00.038000Z","created_at":"2024-05-19T23:22:00.038000Z"},{"_id":"664a89984ecfda50de15d481","body":"@oliemansm May I ask if there's any update on this?\r\nThank you so much!!!","issue_id":1660627225497,"origin_id":1709224045,"user_origin_id":7764707,"create_time":1694040397,"update_time":1694040397,"id":1716160920043,"updated_at":"2024-05-19T23:22:00.043000Z","created_at":"2024-05-19T23:22:00.043000Z"},{"_id":"664a89984ecfda50de15d482","body":"Any update on this @oliemansm ?","issue_id":1660627225497,"origin_id":1847394494,"user_origin_id":4223434,"create_time":1702049716,"update_time":1702049716,"id":1716160920048,"updated_at":"2024-05-19T23:22:00.047000Z","created_at":"2024-05-19T23:22:00.047000Z"},{"_id":"664a89984ecfda50de15d483","body":"Hate to be that guy but could we get an update? @oliemansm \r\n\r\nThe library we use for the current protocol is heavily outdated and we are looking to move to graphql-transport-ws protocol.","issue_id":1660627225497,"origin_id":2009376631,"user_origin_id":4223434,"create_time":1710934995,"update_time":1710934995,"id":1716160920052,"updated_at":"2024-05-19T23:22:00.052000Z","created_at":"2024-05-19T23:22:00.052000Z"},{"_id":"664a89984ecfda50de15d484","body":"@ItsNoHax the maintainers have given up on this project as a whole unfortunately. It is scrapped in favor or letting the Spring team take the lead on GQL implementations. \r\n\r\nSo my team moved over to `spring-graphql` and it was painful at first but mostly just for graphql subscriptions and the re-writing of unit tests. Took me about 2 weeks. I am not a fan of how opinionated the Spring GQL folks are in terms of negating some Spring Conventions \/ Mantras, but it works and is being improved. ","issue_id":1660627225497,"origin_id":2010180090,"user_origin_id":13663810,"create_time":1710955831,"update_time":1710955831,"id":1716160920056,"updated_at":"2024-05-19T23:22:00.055000Z","created_at":"2024-05-19T23:22:00.055000Z"}] comment

Hello! Are there plans to implement [graphql-transport-ws](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md) GraphQL subscription protocol? The existing `graphql-ws` protocol is no longer maintained and even not supported in some products (for example, Tyk Gateway).

enhancement

GraphQLServletListener.RequestCallback.onError not being called even though an exception throws

[{"_id":"635070c3ea01ec786e74875a","body":"Do you have an example project or even better a unit test in a fork of this project reproducing this issue?","issue_id":1660627225500,"origin_id":1218318817,"user_origin_id":13518144,"create_time":1660758309,"update_time":1660758309,"id":1666216131859,"updated_at":"2022-10-19T21:48:51.858000Z","created_at":"2022-10-19T21:48:51.858000Z"},{"_id":"664a89944a8e87d14e1a554b","body":"I think we can close this bug since the code is changed and now the `handle` method calls the `listenerHandler.onError` when an exception is catched.\r\n\r\nSee: https:\/\/github.com\/graphql-java-kickstart\/graphql-java-servlet\/pull\/442\/files#diff-a166ddb02fc54c24bbd3a3759107eebb065981ac3824adf877c1e134afd1a3ccR107-R118","issue_id":1660627225500,"origin_id":1594847966,"user_origin_id":44871614,"create_time":1686928159,"update_time":1686928179,"id":1716160916412,"updated_at":"2024-05-19T23:21:56.411000Z","created_at":"2024-05-19T23:21:56.411000Z"}] comment

**Describe the bug** I should be able to handle the Exception from the GraphQLServletListener **To Reproduce** Steps to reproduce the behavior: In Asynchronus Excecution, Even there are exception in the...

bug

Modularize project

[{"_id":"63506a573056137e2656fc9d","body":"@oliemansm \r\nTo continue our discussion from the other thread about the jar issue:\r\nIf i create a new maven project and add this as the only dependency:\r\n\r\n```\r\n<dependency>\r\n <groupId>com.graphql-java-kickstart<\/groupId>\r\n <artifactId>graphql-java-servlet<\/artifactId>\r\n <version>9.1.0<\/version>\r\n<\/dependency>\r\n```\r\n\r\nThen i end up with this:\r\n![image](https:\/\/user-images.githubusercontent.com\/38980218\/79699216-60d8a880-828e-11ea-9887-3438a4a8ea4b.png)\r\nYou can see here that servlet drags with it the other kickstart project jar, and together they create a conflict as they both have the same packages.\r\n\r\nIf i understood your point correctly, you said that servlet is the \"leaf project\", meaning projects will only add and use this as dependency, then it shouldn't matter whatever that project is using further down.\r\nIn practice this doesn't seems to work as it is configured now, Projects that add this dependency gets both projects and conflicting packages with it.\r\n\r\nThe bnd file change fixes this issue","issue_id":1660627225506,"origin_id":616222110,"user_origin_id":38980218,"create_time":1587328963,"update_time":1587329110,"id":1666214487649,"updated_at":"2022-10-19T21:21:27.649000Z","created_at":"2022-10-19T21:21:27.649000Z"},{"_id":"63506a573056137e2656fc9e","body":"I don't get that... graphql-java-servlet is a multi-module gradle project consisting of two modules. That's because the kickstart module contains some shared code that's used by other libraries too. the graphql-java-servlet module does not contain a `graphql.kickstart.execution` package (look at the code). graphql-java-servlet does depend on graphql-java-kickstart module, so it does indeed pull that in. But then I'd expect just the top part of your screenshot to be visible, not the bottom part. So I don't get where those packages come from in this screenshot.\r\n\r\nOn another note... The main issue is that these project don't play nice in a Java 9 modular setup and the idea is to make it compatible with it so it can be used in those projects. However the way it's being made compatible now is by upgrading the entire thing to Java 9 making it incompatible with anyone still using Java 8. Java 8 is still the most widely used version of Java today, so we can't make this library incompatible with that.","issue_id":1660627225506,"origin_id":616328131,"user_origin_id":13518144,"create_time":1587362276,"update_time":1587362276,"id":1666214487652,"updated_at":"2022-10-19T21:21:27.652000Z","created_at":"2022-10-19T21:21:27.652000Z"},{"_id":"63506a573056137e2656fc9f","body":"> the graphql-java-servlet module does not contain a graphql.kickstart.execution package (look at the code). \r\n\r\nYou are correct here, the graphql-java-servlet does indeed NOT contain the graphql.kickstart.execution package, but even so... it does copy this package into the output jar.\r\nI have never used bnd before so i cannot make an explanation for why it does this.\r\nIt was mostly by pure chance that i tried to edit the bnd file and got a configuration where graphql-java-servlet did not copy the execution package.\r\nI suspect this may simply have been an error in the configuration (?)\r\n\r\nAs for java 8 compatibility i will look into a solution for this.\r\nhttps:\/\/dzone.com\/articles\/how-to-create-modular-jars-that-target-a-java-rele\r\nBased on this link it looks like it may be possible to compile with java 8 and then insert the module-info file into the jar after.\r\n\r\n","issue_id":1660627225506,"origin_id":616355341,"user_origin_id":38980218,"create_time":1587366599,"update_time":1587366599,"id":1666214487654,"updated_at":"2022-10-19T21:21:27.654000Z","created_at":"2022-10-19T21:21:27.654000Z"},{"_id":"63506a573056137e2656fca0","body":"Nice catch for the bnd module! That's something specific for OSGi (which I don't use myself). I'm actually not sure if that's an error in the configuration or not, but it does sound like it.","issue_id":1660627225506,"origin_id":616356934,"user_origin_id":13518144,"create_time":1587366816,"update_time":1587366816,"id":1666214487656,"updated_at":"2022-10-19T21:21:27.656000Z","created_at":"2022-10-19T21:21:27.656000Z"},{"_id":"63506a573056137e2656fca1","body":"Hi @IceBlizz6. Did you find any time to look into that Java 8 plugin solution to make it backwards compatible?","issue_id":1660627225506,"origin_id":629649942,"user_origin_id":13518144,"create_time":1589637449,"update_time":1589637449,"id":1666214487659,"updated_at":"2022-10-19T21:21:27.659000Z","created_at":"2022-10-19T21:21:27.659000Z"},{"_id":"63506a573056137e2656fca2","body":"@IceBlizz6 There have been some updates to the bnd configuration too in the meantime. Does the latest released version of this library still cause problems with modularized projects requiring these changes or is this no longer relevant?","issue_id":1660627225506,"origin_id":730173058,"user_origin_id":13518144,"create_time":1605769280,"update_time":1605769289,"id":1666214487662,"updated_at":"2022-10-19T21:21:27.661000Z","created_at":"2022-10-19T21:21:27.661000Z"},{"_id":"664a899e2cfd0d66a810a1db","body":"@IceBlizz6 Is this still necessary?","issue_id":1660627225506,"origin_id":1862530773,"user_origin_id":44871614,"create_time":1702982856,"update_time":1702982856,"id":1716160926973,"updated_at":"2024-05-19T23:22:06.973000Z","created_at":"2024-05-19T23:22:06.973000Z"},{"_id":"664a899e2cfd0d66a810a1dc","body":"> @IceBlizz6 Is this still necessary?\r\n\r\nWe are not using this project anymore,\r\nI'm closing it.","issue_id":1660627225506,"origin_id":1863271140,"user_origin_id":38980218,"create_time":1703010039,"update_time":1703010039,"id":1716160926976,"updated_at":"2024-05-19T23:22:06.976000Z","created_at":"2024-05-19T23:22:06.976000Z"}] comment

Now introducing java modules. 1. Added java modularity plugin to gradle - as gradle doesn't support modules by default 2. Updated to java 9 3. Added module-info files to both...

SDL support for OSGi servlet

[{"_id":"635078f73056137e265708a7","body":"@sergehuber Not sure I quite follow you here. This servlet is a wrapper around `graphql-java` and therefore provides support for this. When used in combination with `graphql-java-tools` you get automatic parsing of SDL found on the class path. So what it is exactly that you would like to be able to do which you can't right now?","issue_id":1660627225508,"origin_id":464319103,"user_origin_id":13518144,"create_time":1550307415,"update_time":1550307415,"id":1666218231242,"updated_at":"2022-10-19T22:23:51.242000Z","created_at":"2022-10-19T22:23:51.242000Z"},{"_id":"635078f73056137e265708a8","body":"I wasn't aware this was possible. So basically I need to provide a schema Provider that uses graphql-java-tools?\r\n\r\nI thought SDL was directly supported by graphql-java or did I misunderstand there? it seems they have a SchemaParser available ? https:\/\/www.graphql-java.com\/tutorials\/getting-started-with-spring-boot\/#schema\r\n\r\nRegards,\r\n Serge... ","issue_id":1660627225508,"origin_id":464335376,"user_origin_id":736584,"create_time":1550313836,"update_time":1550313836,"id":1666218231246,"updated_at":"2022-10-19T22:23:51.245000Z","created_at":"2022-10-19T22:23:51.245000Z"},{"_id":"635078f73056137e265708a9","body":"Well you don't have to use graphql-java-tools, you can use the SchemaParser from graphql-java directly. So the way to use it in combination with graphql-java-servlet would be to first create a `GraphQLSchema` with that `SchemaParser` from graphql-java and then pass that in to create the servlet using `GraphQLHttpServlet.with(schema)`.\r\n\r\nDoes that answer your question?\r\n\r\n","issue_id":1660627225508,"origin_id":464335797,"user_origin_id":13518144,"create_time":1550314221,"update_time":1550314221,"id":1666218231249,"updated_at":"2022-10-19T22:23:51.248000Z","created_at":"2022-10-19T22:23:51.248000Z"},{"_id":"635078f73056137e265708aa","body":"Almost, I'm using the OSGi servlet right now, which seems to lack an extension point for that. Maybe I will need to contribute it if my understanding is correct ?","issue_id":1660627225508,"origin_id":464335973,"user_origin_id":736584,"create_time":1550314373,"update_time":1550314373,"id":1666218231251,"updated_at":"2022-10-19T22:23:51.251000Z","created_at":"2022-10-19T22:23:51.251000Z"},{"_id":"635078f73056137e265708ab","body":"Right, I don't have any experience with OSGi unfortunately. There's a `GraphQLSchemaProvider` in the `OsgiGraphQLHttpServlet` that's responsible for providing the `GraphQLSchema`. Can't you use that somehow?","issue_id":1660627225508,"origin_id":464336788,"user_origin_id":13518144,"create_time":1550315046,"update_time":1550315046,"id":1666218231253,"updated_at":"2022-10-19T22:23:51.253000Z","created_at":"2022-10-19T22:23:51.253000Z"},{"_id":"635078f73056137e265708ac","body":"Actually that schemaProvider is initialized this way : \r\n\r\n this.schemaProvider = new DefaultGraphQLSchemaProvider(newSchema().query(queryTypeBuilder.build())\r\n .mutation(mutationType)\r\n .subscription(subscriptionType)\r\n .additionalTypes(types)\r\n .build());\r\n\r\nso it's not pluggeable (yet) and can't hook a parser to generate it. I could provide a patch to do this but I need to get around to implementing and testing that.","issue_id":1660627225508,"origin_id":464799986,"user_origin_id":736584,"create_time":1550507393,"update_time":1550507393,"id":1666218231256,"updated_at":"2022-10-19T22:23:51.255000Z","created_at":"2022-10-19T22:23:51.255000Z"}] comment

It would be nice to add SDL (https://www.graphql-java.com/documentation/v11/schema/) support to the GraphQL Java Servlet project. But this might also imply having a way to provide "parts" of SDL as well...

help wanted
question
osgi

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.spockframework:spock-core](https://spockframework.org) ([source](https://github.spockframework.org/spock)) | `2.1-groovy-3.0` -> `2.3-groovy-4.0` |...

dependencies

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | biz.aQute.bnd.builder | `6.4.0` -> `7.0.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/biz.aQute.bnd.builder/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)...

dependencies
keep-open

**Describe the bug** When using `OsgiGraphQLHttpServlet`, a new thread pool (of 1 thread) is created on every request, and never shut down. The thread pool is created when creating a...

bug

Despite the work in #439 , we see `InvocationInputParseException` errors caused by client disconnects that are logged as ERROR by `AbstractGraphQLHttpServlet`. We can provide our own `GraphQLHttpServlet` that stops this,...

bug